census logo
[bootcensus] / src / intrtab.h
1 /*
2 pcboot - bootable PC demo/game kernel
3 Copyright (C) 2018  John Tsiombikas <nuclear@member.fsf.org>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY, without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <https://www.gnu.org/licenses/>.
17 */
18 #ifdef ASM
19 /* included from intr_asm.S */
20 #define INTR_ENTRY_EC(n, name)          ientry_err n, name
21 #define INTR_ENTRY_NOEC(n, name)        ientry_noerr n, name
22 #else
23 /* included from intr.c inside init_intr() */
24 #define INTR_ENTRY_EC(n, name)          \
25         void intr_entry_##name(void);   \
26         set_intr_entry(n, intr_entry_##name);
27 #define INTR_ENTRY_NOEC(n, name)        INTR_ENTRY_EC(n, name)
28 #endif  /* ASM */
29
30 /* faults/traps/aborts (plus NMI) */
31 INTR_ENTRY_NOEC(0, div)
32 INTR_ENTRY_NOEC(1, debug)
33 INTR_ENTRY_NOEC(2, nmi)
34 INTR_ENTRY_NOEC(3, bp)
35 INTR_ENTRY_NOEC(4, overflow)
36 INTR_ENTRY_NOEC(5, bound)
37 INTR_ENTRY_NOEC(6, ill)
38 INTR_ENTRY_NOEC(7, nodev)
39 INTR_ENTRY_EC(8, dfault)
40 INTR_ENTRY_NOEC(9, copseg)
41 INTR_ENTRY_EC(10, tss)
42 INTR_ENTRY_EC(11, segpres)
43 INTR_ENTRY_EC(12, stack)
44 INTR_ENTRY_EC(13, prot)
45 INTR_ENTRY_EC(14, page)
46 INTR_ENTRY_NOEC(15, reserved)
47 INTR_ENTRY_NOEC(16, fpu)
48 INTR_ENTRY_EC(17, align)
49 INTR_ENTRY_NOEC(18, mce)
50 INTR_ENTRY_NOEC(19, sse)
51 /* redirected IRQs */
52 INTR_ENTRY_NOEC(32, irq0)
53 INTR_ENTRY_NOEC(33, irq1)
54 INTR_ENTRY_NOEC(34, irq2)
55 INTR_ENTRY_NOEC(35, irq3)
56 INTR_ENTRY_NOEC(36, irq4)
57 INTR_ENTRY_NOEC(37, irq5)
58 INTR_ENTRY_NOEC(38, irq6)
59 INTR_ENTRY_NOEC(39, irq7)
60 INTR_ENTRY_NOEC(40, irq8)
61 INTR_ENTRY_NOEC(41, irq9)
62 INTR_ENTRY_NOEC(42, irq10)
63 INTR_ENTRY_NOEC(43, irq11)
64 INTR_ENTRY_NOEC(44, irq12)
65 INTR_ENTRY_NOEC(45, irq13)
66 INTR_ENTRY_NOEC(46, irq14)
67 INTR_ENTRY_NOEC(47, irq15)
68 /* system call interrupt */
69 INTR_ENTRY_NOEC(128, syscall)
70 /* default interrupt */
71 INTR_ENTRY_NOEC(255, default)