IVT

解释中断向量、解释中断类型码

实模式下中断程序地址如何得到? ⇒ (intVec.Segment << 4) + intVec.Offset

中断向量的地址如何得到? ⇒ 0 + $(IDTR) * 4

实模式下如何根据中断向量的地址得到中断程序地址?


Interrupt Vector Table

On the x86 architecture, the Interrupt Vector Table (IVT) is a table that specifies the addresses of all the 256 interrupt handlers used in real mode.

The IVT is typically located at 0000:0000H, and is 400H bytes in size (4 bytes for each interrupt).

 +-----------+-----------+
 |  Segment  |  Offset   |
 +-----------+-----------+
 4           2           0

Address: 0 + $(IDTR) * 4

Interrupt Vector

Interrupt vector connects interrupt with interrupt handler.

Each int. has its int. number.

IDT

问题:

保护模式下中断程序地址如何得到? 保护模式下如何根据中断门得到中断处理程序地址?

保护模式下中断描述符表如何得到?

保护模式下中断门如何得到?

解释中断描述符

实模式和保护模式下的中断处理差别

IDT 是什么,有什么作用?

IDT 中有几种描述符?

中断向量表中,每个中断有几个字节?里面的结构是什么?


Interrupt Descriptor Table

The Interrupt Descriptor Table (IDT) is a binary data structure specific to the IA-32 and x86-64 architectures.

It is the Protected Mode and Long Mode counterpart to the Real Mode Interrupt Vector Table (IVT) telling the CPU where the Interrupt Service Routines (ISR) are located (one per interrupt vector).

It is similar to the Global Descriptor Table in structure.

IDTR Register