]>
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>
12 DECLARE_GLOBAL_DATA_PTR
;
14 int interrupt_init(void)
19 void enable_interrupts(void)
24 int disable_interrupts(void)
29 void show_regs(struct pt_regs
*regs
)
33 if (gd
->flags
& GD_FLG_RELOC
)
34 printf("elr: %016lx lr : %016lx (reloc)\n",
35 regs
->elr
- gd
->reloc_off
,
36 regs
->regs
[30] - gd
->reloc_off
);
37 printf("elr: %016lx lr : %016lx\n", regs
->elr
, regs
->regs
[30]);
39 for (i
= 0; i
< 29; i
+= 2)
40 printf("x%-2d: %016lx x%-2d: %016lx\n",
41 i
, regs
->regs
[i
], i
+1, regs
->regs
[i
+1]);
46 * do_bad_sync handles the impossible case in the Synchronous Abort vector.
48 void do_bad_sync(struct pt_regs
*pt_regs
, unsigned int esr
)
51 printf("Bad mode in \"Synchronous Abort\" handler, esr 0x%08x\n", esr
);
53 panic("Resetting CPU ...\n");
57 * do_bad_irq handles the impossible case in the Irq vector.
59 void do_bad_irq(struct pt_regs
*pt_regs
, unsigned int esr
)
62 printf("Bad mode in \"Irq\" handler, esr 0x%08x\n", esr
);
64 panic("Resetting CPU ...\n");
68 * do_bad_fiq handles the impossible case in the Fiq vector.
70 void do_bad_fiq(struct pt_regs
*pt_regs
, unsigned int esr
)
73 printf("Bad mode in \"Fiq\" handler, esr 0x%08x\n", esr
);
75 panic("Resetting CPU ...\n");
79 * do_bad_error handles the impossible case in the Error vector.
81 void do_bad_error(struct pt_regs
*pt_regs
, unsigned int esr
)
84 printf("Bad mode in \"Error\" handler, esr 0x%08x\n", esr
);
86 panic("Resetting CPU ...\n");
90 * do_sync handles the Synchronous Abort exception.
92 void do_sync(struct pt_regs
*pt_regs
, unsigned int esr
)
95 printf("\"Synchronous Abort\" handler, esr 0x%08x\n", esr
);
97 panic("Resetting CPU ...\n");
101 * do_irq handles the Irq exception.
103 void do_irq(struct pt_regs
*pt_regs
, unsigned int esr
)
106 printf("\"Irq\" handler, esr 0x%08x\n", esr
);
108 panic("Resetting CPU ...\n");
112 * do_fiq handles the Fiq exception.
114 void do_fiq(struct pt_regs
*pt_regs
, unsigned int esr
)
117 printf("\"Fiq\" handler, esr 0x%08x\n", esr
);
119 panic("Resetting CPU ...\n");
123 * do_error handles the Error exception.
124 * Errors are more likely to be processor specific,
125 * it is defined with weak attribute and can be redefined
126 * in processor specific code.
128 void __weak
do_error(struct pt_regs
*pt_regs
, unsigned int esr
)
131 printf("\"Error\" handler, esr 0x%08x\n", esr
);
133 panic("Resetting CPU ...\n");