2 #include <arch/x86/interrupts.h>
3 #include <lunaix/common.h>
4 #define __ASM_INTR_DIAGNOSIS
6 .macro isr_template vector, no_error_code=1
7 .global _asm_isr\vector
8 .type _asm_isr\vector, @function
17 #ifdef __ASM_INTR_DIAGNOSIS
25 isr_template FAULT_DIVISION_ERROR
26 isr_template FAULT_GENERAL_PROTECTION, no_error_code=0
27 isr_template FAULT_PAGE_FAULT, no_error_code=0
29 isr_template LUNAIX_SYS_PANIC
30 isr_template LUNAIX_SYS_CALL
32 isr_template APIC_ERROR_IV
33 isr_template APIC_LINT0_IV
34 isr_template APIC_TIMER_IV
35 isr_template APIC_SPIV_IV
36 isr_template RTC_TIMER_IV
37 isr_template PC_KBD_IV
48 vector > offset = 28 + 16 + 4 = 48
53 ds > offset = 7 * 4 = 28
62 las: Least Significant Address
63 msa: Most Significant Address
81 movl 60(%esp), %eax /* 取出 %cs */
82 andl $0x3, %eax /* 判断 RPL */
85 movw $KDATA_SEG, %ax /* 如果从用户模式转来,则切换至内核数据段 */
93 andl $0xfffffff0, %esp
122 #ifdef __ASM_INTR_DIAGNOSIS
125 movl %eax, debug_resv