]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/lib/interrupts_64.c
3 * David Feng <fenghua@phytium.com.cn>
5 * SPDX-License-Identifier: GPL-2.0+
9 #include <linux/compiler.h>
10 #include <efi_loader.h>
13 int interrupt_init(void)
18 void enable_interrupts(void)
23 int disable_interrupts(void)
28 void show_regs(struct pt_regs
*regs
)
32 printf("ELR: %lx\n", regs
->elr
);
33 printf("LR: %lx\n", regs
->regs
[30]);
34 for (i
= 0; i
< 29; i
+= 2)
35 printf("x%-2d: %016lx x%-2d: %016lx\n",
36 i
, regs
->regs
[i
], i
+1, regs
->regs
[i
+1]);
41 * do_bad_sync handles the impossible case in the Synchronous Abort vector.
43 void do_bad_sync(struct pt_regs
*pt_regs
, unsigned int esr
)
46 printf("Bad mode in \"Synchronous Abort\" handler, esr 0x%08x\n", esr
);
48 panic("Resetting CPU ...\n");
52 * do_bad_irq handles the impossible case in the Irq vector.
54 void do_bad_irq(struct pt_regs
*pt_regs
, unsigned int esr
)
57 printf("Bad mode in \"Irq\" handler, esr 0x%08x\n", esr
);
59 panic("Resetting CPU ...\n");
63 * do_bad_fiq handles the impossible case in the Fiq vector.
65 void do_bad_fiq(struct pt_regs
*pt_regs
, unsigned int esr
)
68 printf("Bad mode in \"Fiq\" handler, esr 0x%08x\n", esr
);
70 panic("Resetting CPU ...\n");
74 * do_bad_error handles the impossible case in the Error vector.
76 void do_bad_error(struct pt_regs
*pt_regs
, unsigned int esr
)
79 printf("Bad mode in \"Error\" handler, esr 0x%08x\n", esr
);
81 panic("Resetting CPU ...\n");
85 * do_sync handles the Synchronous Abort exception.
87 void do_sync(struct pt_regs
*pt_regs
, unsigned int esr
)
90 printf("\"Synchronous Abort\" handler, esr 0x%08x\n", esr
);
92 panic("Resetting CPU ...\n");
96 * do_irq handles the Irq exception.
98 void do_irq(struct pt_regs
*pt_regs
, unsigned int esr
)
101 printf("\"Irq\" handler, esr 0x%08x\n", esr
);
103 panic("Resetting CPU ...\n");
107 * do_fiq handles the Fiq exception.
109 void do_fiq(struct pt_regs
*pt_regs
, unsigned int esr
)
112 printf("\"Fiq\" handler, esr 0x%08x\n", esr
);
114 panic("Resetting CPU ...\n");
118 * do_error handles the Error exception.
119 * Errors are more likely to be processor specific,
120 * it is defined with weak attribute and can be redefined
121 * in processor specific code.
123 void __weak
do_error(struct pt_regs
*pt_regs
, unsigned int esr
)
126 printf("\"Error\" handler, esr 0x%08x\n", esr
);
128 panic("Resetting CPU ...\n");