Interrupt vector

The interrupt vector is the entry address of the interrupt service routine. The address of the interrupt vector in the computer stores a jump instruction to the interrupt service routine.

The interrupt address is the memory unit that stores the interrupt vector.

Interrupt vector table: used to store interrupt vectors (256 in total), its address range is 0~3FFH

The size of the interrupt vector in the arm processor is 4 bytes. In the interrupt vector, it is not the entry address of the stored interrupt service routine, but the executable code that jumps to the interrupt service routine.

Interrupt number:

The microcomputer corresponds to the interrupt vector value through the interrupt number, and then jumps to the interrupt service routine through the interrupt vector value.

Interrupt vector table:

The CPU needs to find the interrupt vector through the interrupt number, so an interrupt vector lookup table must be established in the memory. (This table is called interrupt descriptor table in 32-bit protection mode). Because there are 256 interrupt vectors in 32-bit microcomputers, each interrupt vector is 4Byte in size, so the entire table is 1KB in size. Because the interrupt vectors are arranged in the order of interrupt number starting from address 0, the address of any interrupt vector with interrupt number N is interrupt number N*4.

When the BIOS performs the initialization operation, it sets up 16 hardware interrupt vectors supported by the two 8259A chips and the interrupt call function vector provided by the BIOS with an interrupt number of 0x10 to 0x1f. For vectors that are not actually used, fill in the address of the temporary dummy interrupt service routine. In the future, when the system boots and loads the operating system, the value of some interrupt vectors will be modified according to actual needs. For example, for the DOS operating system, it will reset the interrupt vector value of interrupt 0x20~0x2f.

For LINUX systems, only the display and disk read and write interrupts provided by BIOS are used when the kernel is loaded. The 8259A chip will be reinitialized in the setup.s program before the kernel is started, and an interrupt vector table will be reset in head.s. . Abandon the BIOS interrupt vector table completely.

Guess you like

Origin blog.csdn.net/qq_36171263/article/details/89515165