Notes about IVT(Interrupt Vector Table)
本文将记录IVT(Interrupt Vector Table)相关笔记。
1. What
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.
2. IVT vs IDT
In the real addressing mode the structure just contains addresses of ISRs. This format of it is known as IVT. In the protected mode the structure is more complex and is called IDT. The CPU manual from Intel or AMD will tell you all the details about interrupt handling.
Modern OSes operate almost fully in protected mode and hence use the IDT. The IVT is only necessary when the OS boots, because that happens in real mode.
3. Usage
To access a BIOS function, you generally set the AH CPU register (or AX, or EAX) to a particular value, and then do an INT opcode. The value in AH (or AX, or EAX), combined with the particular interrupt number selected requests a specific BIOS function.
It is simplest to create a listing of BIOS functions by specifying the interrupt number, and the value of AH (or AX, or EAX) that selects the function. It is also easiest to refer to particular BIOS functions this way in discussions. For example, INT 0x13, AH=0 is a BIOS function that resets hard disks or floppy disks.
To an extent, the BIOS functions are organized by interrupt number:
- INT 0x10 = Video display functions (including VESA/VBE)
- INT 0x13 = mass storage (disk, floppy) access
- INT 0x15 = memory size functions
- INT 0x16 = keyboard functions
3.1 Common functions
3.2 e820
BIOS Function: INT 0x15, EAX = 0xE820
参考资料: