1
2
3
4
5
6
7
8
9
10
11#ifndef _ASM_EXCEPTIONS_H
12#define _ASM_EXCEPTIONS_H
13
14#include <linux/linkage.h>
15
16
17
18
19
20
21#define GDBSTUB_BKPT 0xFF
22
23#ifndef __ASSEMBLY__
24
25
26
27
28enum exception_code {
29 EXCEP_RESET = 0x000000,
30
31
32 EXCEP_ITLBMISS = 0x000100,
33 EXCEP_DTLBMISS = 0x000108,
34 EXCEP_IAERROR = 0x000110,
35 EXCEP_DAERROR = 0x000118,
36
37
38 EXCEP_TRAP = 0x000128,
39 EXCEP_ISTEP = 0x000130,
40 EXCEP_IBREAK = 0x000150,
41 EXCEP_OBREAK = 0x000158,
42 EXCEP_PRIVINS = 0x000160,
43 EXCEP_UNIMPINS = 0x000168,
44 EXCEP_UNIMPEXINS = 0x000170,
45 EXCEP_MEMERR = 0x000178,
46 EXCEP_MISALIGN = 0x000180,
47 EXCEP_BUSERROR = 0x000188,
48 EXCEP_ILLINSACC = 0x000190,
49 EXCEP_ILLDATACC = 0x000198,
50 EXCEP_IOINSACC = 0x0001a0,
51 EXCEP_PRIVINSACC = 0x0001a8,
52 EXCEP_PRIVDATACC = 0x0001b0,
53 EXCEP_DATINSACC = 0x0001b8,
54 EXCEP_DOUBLE_FAULT = 0x000200,
55
56
57 EXCEP_FPU_DISABLED = 0x0001c0,
58 EXCEP_FPU_UNIMPINS = 0x0001c8,
59 EXCEP_FPU_OPERATION = 0x0001d0,
60
61
62 EXCEP_WDT = 0x000240,
63 EXCEP_NMI = 0x000248,
64 EXCEP_IRQ_LEVEL0 = 0x000280,
65 EXCEP_IRQ_LEVEL1 = 0x000288,
66 EXCEP_IRQ_LEVEL2 = 0x000290,
67 EXCEP_IRQ_LEVEL3 = 0x000298,
68 EXCEP_IRQ_LEVEL4 = 0x0002a0,
69 EXCEP_IRQ_LEVEL5 = 0x0002a8,
70 EXCEP_IRQ_LEVEL6 = 0x0002b0,
71
72
73 EXCEP_SYSCALL0 = 0x000300,
74 EXCEP_SYSCALL1 = 0x000308,
75 EXCEP_SYSCALL2 = 0x000310,
76 EXCEP_SYSCALL3 = 0x000318,
77 EXCEP_SYSCALL4 = 0x000320,
78 EXCEP_SYSCALL5 = 0x000328,
79 EXCEP_SYSCALL6 = 0x000330,
80 EXCEP_SYSCALL7 = 0x000338,
81 EXCEP_SYSCALL8 = 0x000340,
82 EXCEP_SYSCALL9 = 0x000348,
83 EXCEP_SYSCALL10 = 0x000350,
84 EXCEP_SYSCALL11 = 0x000358,
85 EXCEP_SYSCALL12 = 0x000360,
86 EXCEP_SYSCALL13 = 0x000368,
87 EXCEP_SYSCALL14 = 0x000370,
88 EXCEP_SYSCALL15 = 0x000378,
89};
90
91extern void __set_intr_stub(enum exception_code code, void *handler);
92extern void set_intr_stub(enum exception_code code, void *handler);
93
94struct pt_regs;
95
96extern asmlinkage void __common_exception(void);
97extern asmlinkage void itlb_miss(void);
98extern asmlinkage void dtlb_miss(void);
99extern asmlinkage void itlb_aerror(void);
100extern asmlinkage void dtlb_aerror(void);
101extern asmlinkage void raw_bus_error(void);
102extern asmlinkage void double_fault(void);
103extern asmlinkage int system_call(struct pt_regs *);
104extern asmlinkage void nmi(struct pt_regs *, enum exception_code);
105extern asmlinkage void uninitialised_exception(struct pt_regs *,
106 enum exception_code);
107extern asmlinkage void irq_handler(void);
108extern asmlinkage void profile_handler(void);
109extern asmlinkage void nmi_handler(void);
110extern asmlinkage void misalignment(struct pt_regs *, enum exception_code);
111
112extern void die(const char *, struct pt_regs *, enum exception_code)
113 __noreturn;
114
115extern int die_if_no_fixup(const char *, struct pt_regs *, enum exception_code);
116
117#define NUM2EXCEP_IRQ_LEVEL(num) (EXCEP_IRQ_LEVEL0 + (num) * 8)
118
119#endif
120
121#endif
122