2 #include <../hal/halx86/include/halirq.h>
11 movl $KGDT_R0_DATA,%eax
15 movl $KGDT_R0_PCR,%eax
19 call _KiInterruptDispatch
31 #define BUILD_INTERRUPT_HANDLER(intnum) \
32 .global _KiUnexpectedInterrupt##intnum; \
33 _KiUnexpectedInterrupt##intnum:; \
35 movl $0x##intnum, %ebx; \
36 jmp _KiCommonInterrupt;
38 /* Interrupt handlers and declarations */
41 BUILD_INTERRUPT_HANDLER(x##y)
44 B(x,0) B(x,1) B(x,2) B(x,3) \
45 B(x,4) B(x,5) B(x,6) B(x,7) \
46 B(x,8) B(x,9) B(x,A) B(x,B) \
47 B(x,C) B(x,D) B(x,E) B(x,F)
49 B16(3) B16(4) B16(5) B16(6)
50 B16(7) B16(8) B16(9) B16(A)
51 B16(B) B16(C) B16(D) B16(E)
56 #undef BUILD_INTERRUPT_HANDLER
58 #else /* CONFIG_SMP */
60 #define BUILD_INTERRUPT_HANDLER(intnum) \
61 .global _irq_handler_##intnum; \
62 _irq_handler_##intnum:; \
64 movl $(##intnum + IRQ_BASE), %ebx; \
65 jmp _KiCommonInterrupt;
67 /* Interrupt handlers and declarations */
70 BUILD_INTERRUPT_HANDLER(x)
75 B(12) B(13) B(14) B(15)
78 #undef BUILD_INTERRUPT_HANDLER
80 #endif /* CONFIG_SMP */
82 .intel_syntax noprefix
83 .globl _KiUnexpectedInterrupt@0
84 _KiUnexpectedInterrupt@0:
86 /* Bugcheck with invalid interrupt code */