MentOS
0.8.0
The Mentoring Operating System
|
Data structures concerning the Interrupt Descriptor Table (IDT). More...
Go to the source code of this file.
Classes | |
struct | idt_descriptor_t |
This structure describes one interrupt gate. More... | |
struct | idt_pointer_t |
A pointer structure used for informing the CPU about our IDT. More... | |
Macros | |
#define | IDT_SIZE 256 |
The maximum dimension of the IDT. | |
#define | TASK_GATE 0x5 |
When an exception occurs whose entry is a Task Gate, a task switch results. | |
#define | INT16_GATE 0x6 |
Used to specify an interrupt service routine (16-bit). | |
#define | TRAP16_GATE 0x7 |
Similar to an Interrupt gate (16-bit). | |
#define | INT32_GATE 0xE |
Used to specify an interrupt service routine (32-bit). | |
#define | TRAP32_GATE 0xF |
Similar to an Interrupt gate (32-bit). | |
Typedefs | |
typedef struct idt_descriptor_t | _syscall0 = _syscall0( (packed) )= _syscall1( (packed) )= _syscall2( (packed) )= _syscall3( (packed) )= idt_descriptor_t |
This structure describes one interrupt gate. More... | |
Functions | |
void | init_idt (void) |
Initialise the interrupt descriptor table. | |
Data structures concerning the Interrupt Descriptor Table (IDT).
The IDT is used to show the processor what Interrupt Service Routine (ISR) to call to handle an exception. IDT entries are also called Interrupt requests whenever a device has completed a request and needs to be serviced. ISRs are used to save the current processor state and set up the appropriate segment registers needed for kernel mode before the kernel’s C-level interrupt handler is called. To handle the right exception, the correct entry in the IDT should be pointed to the correct ISR.