硬件中断程序——linux 0.12
时间:2009-06-02 来源:walker_wu
asm.s该文件主要是定义了CPU异常产生的中断函数的调用分成2类:
1. 带返回错误码的中断调用
2. 不带返回错误码的中断调用
分别对应的符号为:
1. error_code:
2. no_error_code:
以下寄存器入栈保存
pushl %ebx
pushl %ecx
pushl %edx
pushl %edi
pushl %esi
pushl %ebp
push %ds
push %es
push %fs
intel 保留中断号含义
中断号 名称 类型 信号
0 Device error 故障 SIGFPE
1 Debug 陷阱 SIGTRAP
故障
2 nmi 硬件
3 Breakpoint 陷阱 SIGTRAP
4 Overflow 陷阱 SIGSEGV
5 Bounds check 故障 SIGSEGV
6 Invalid Opcode 故障 SIGILL
7 Device not available 故障 SIGSEGV
8 Double fault 异常中断 SIGSEGV
9 Coprocessor segment overrun 异常中断 SIGFPE
10 Invalid TSS 故障 SIGSEGV
11 Segment not present 故障 SIGBUS
12 Stack segment 故障 SIGBUS
13 General protection 故障 SIGSEGV
14 Page fault 故障 SIGSEGV
15 Reserved
16 Coprocessor error 故障 SIGFPE