追踨法蘭克

顯示具有 IDT 標籤的文章。 顯示所有文章
顯示具有 IDT 標籤的文章。 顯示所有文章

2015年8月8日 星期六

中斷描述表 & 中斷服務程式(IDT & ISR )

中斷描述表 (Interrupt Descriptor Table, IDT) 是 用來定義 IA-32 的系統架構。它是Protected mode 對應 Real Mode 的中斷向量表 ,它表列了 中斷服務程式 (Interrupt Service Routines, ISR). 它有點類似,Global Descriptor Table結構. 
IDT的Entry稱作 Gates. 包含了Interrupt Gates, Task Gates, Trap Gates.

位置與大小
IDT位於在CPU的IDTR暫存器,它可以經由LIDT, SIDT指令用來讀取和存取。

IDTR
NameBitDescription
Limit0..15Defines the length of the IDT in bytes - 1 (minimum value is 100h, a value of 1000h means 200h interrupts).
Base16..47This 32 bits are the linear address where the IDT starts (INT 0)