1
2
3
4
5
6
7
8#include <common.h>
9#include <linux/compiler.h>
10
11
12int interrupt_init(void)
13{
14 return 0;
15}
16
17void enable_interrupts(void)
18{
19 return;
20}
21
22int disable_interrupts(void)
23{
24 return 0;
25}
26
27void show_regs(struct pt_regs *regs)
28{
29 int i;
30
31 printf("ELR: %lx\n", regs->elr);
32 printf("LR: %lx\n", regs->regs[30]);
33 for (i = 0; i < 29; i += 2)
34 printf("x%-2d: %016lx x%-2d: %016lx\n",
35 i, regs->regs[i], i+1, regs->regs[i+1]);
36 printf("\n");
37}
38
39
40
41
42void do_bad_sync(struct pt_regs *pt_regs, unsigned int esr)
43{
44 printf("Bad mode in \"Synchronous Abort\" handler, esr 0x%08x\n", esr);
45 show_regs(pt_regs);
46 panic("Resetting CPU ...\n");
47}
48
49
50
51
52void do_bad_irq(struct pt_regs *pt_regs, unsigned int esr)
53{
54 printf("Bad mode in \"Irq\" handler, esr 0x%08x\n", esr);
55 show_regs(pt_regs);
56 panic("Resetting CPU ...\n");
57}
58
59
60
61
62void do_bad_fiq(struct pt_regs *pt_regs, unsigned int esr)
63{
64 printf("Bad mode in \"Fiq\" handler, esr 0x%08x\n", esr);
65 show_regs(pt_regs);
66 panic("Resetting CPU ...\n");
67}
68
69
70
71
72void do_bad_error(struct pt_regs *pt_regs, unsigned int esr)
73{
74 printf("Bad mode in \"Error\" handler, esr 0x%08x\n", esr);
75 show_regs(pt_regs);
76 panic("Resetting CPU ...\n");
77}
78
79
80
81
82void do_sync(struct pt_regs *pt_regs, unsigned int esr)
83{
84 printf("\"Synchronous Abort\" handler, esr 0x%08x\n", esr);
85 show_regs(pt_regs);
86 panic("Resetting CPU ...\n");
87}
88
89
90
91
92void do_irq(struct pt_regs *pt_regs, unsigned int esr)
93{
94 printf("\"Irq\" handler, esr 0x%08x\n", esr);
95 show_regs(pt_regs);
96 panic("Resetting CPU ...\n");
97}
98
99
100
101
102void do_fiq(struct pt_regs *pt_regs, unsigned int esr)
103{
104 printf("\"Fiq\" handler, esr 0x%08x\n", esr);
105 show_regs(pt_regs);
106 panic("Resetting CPU ...\n");
107}
108
109
110
111
112
113
114
115void __weak do_error(struct pt_regs *pt_regs, unsigned int esr)
116{
117 printf("\"Error\" handler, esr 0x%08x\n", esr);
118 show_regs(pt_regs);
119 panic("Resetting CPU ...\n");
120}
121