2 #include <../hal/halx86/include/halirq.h>
12 /* Load DS/ES (with override) */
13 .intel_syntax noprefix
14 mov eax, KGDT_R3_DATA + RPL_MASK
25 movl $KGDT_R0_PCR,%eax
29 call _KiInterruptDispatch3
41 #define BUILD_INTERRUPT_HANDLER(intnum) \
42 .global _KiUnexpectedInterrupt##intnum; \
43 _KiUnexpectedInterrupt##intnum:; \
45 movl $0x##intnum, %ebx; \
46 jmp _KiCommonInterrupt;
48 /* Interrupt handlers and declarations */
51 BUILD_INTERRUPT_HANDLER(x##y)
54 B(x,0) B(x,1) B(x,2) B(x,3) \
55 B(x,4) B(x,5) B(x,6) B(x,7) \
56 B(x,8) B(x,9) B(x,A) B(x,B) \
57 B(x,C) B(x,D) B(x,E) B(x,F)
59 B16(3) B16(4) B16(5) B16(6)
60 B16(7) B16(8) B16(9) B16(A)
61 B16(B) B16(C) B16(D) B16(E)
66 #undef BUILD_INTERRUPT_HANDLER
68 #else /* CONFIG_SMP */
70 #define BUILD_INTERRUPT_HANDLER(intnum) \
71 .global _irq_handler_##intnum; \
72 _irq_handler_##intnum:; \
74 movl $(##intnum + IRQ_BASE), %ebx; \
75 jmp _KiCommonInterrupt;
77 /* Interrupt handlers and declarations */
80 BUILD_INTERRUPT_HANDLER(x)
85 B(12) B(13) B(14) B(15)
88 #undef BUILD_INTERRUPT_HANDLER
90 #endif /* CONFIG_SMP */
92 .intel_syntax noprefix
93 .globl _KiUnexpectedInterrupt@0
94 _KiUnexpectedInterrupt@0:
96 /* Bugcheck with invalid interrupt code */