beautypg.com

1 exception- or interrupt-handler procedures – Intel IA-32 User Manual

Page 191

background image

Vol. 3A 5-15

INTERRUPT AND EXCEPTION HANDLING

through Section 4.8.6, “Returning from a Called Procedure”). If index points to a task gate, the
processor executes a task switch to the exception- or interrupt-handler task in a manner similar
to a CALL to a task gate (see Section 6.3, “Task Switching”).

5.12.1

Exception- or Interrupt-Handler Procedures

An interrupt gate or trap gate references an exception- or interrupt-handler procedure that runs
in the context of the currently executing task (see Figure 5-3). The segment selector for the gate
points to a segment descriptor for an executable code segment in either the GDT or the current
LDT. The offset field of the gate descriptor points to the beginning of the exception- or interrupt-
handling procedure.

Figure 5-3. Interrupt Procedure Call

IDT

Interrupt or

Code Segment

Segment Selector

GDT or LDT

Segment

Interrupt

Vector

Base
Address

Destination

Procedure

Interrupt

+

Descriptor

Trap Gate

Offset