|
PatchworkOS
966e257
A non-POSIX operating system.
|
Interrupt Descriptor Table. More...
Interrupt Descriptor Table.
The Interrupt Descriptor Table tells a CPU what to do when it receives an interrupt or exception.
Data Structures | |
| struct | idt_desc_t |
| IDT descriptor structure. More... | |
| struct | idt_gate_t |
| IDT gate structure. More... | |
| struct | idt_t |
| IDT structure. More... | |
Macros | |
| #define | IDT_GATE_AMOUNT (UINT8_MAX + 1) |
| Number of IDT gates. | |
Enumerations | |
| enum | idt_attributes_t { IDT_ATTR_INTERRUPT = 0b1110 , IDT_ATTR_TRAP = 0b1111 , IDT_ATTR_RING0 = 0b00 , IDT_ATTR_RING1 = 0b01 , IDT_ATTR_RING2 = 0b10 , IDT_ATTR_RING3 = 0b11 , IDT_ATTR_PRESENT = 1 << 7 } |
| IDT gate attributes. More... | |
Functions | |
| void | idt_init (void) |
| Initialize the IDT structure in memory. | |
| void | idt_cpu_load (void) |
| Load the IDT on the current CPU. | |
| enum idt_attributes_t |
IDT gate attributes.
| void idt_init | ( | void | ) |
Initialize the IDT structure in memory.
This will setup the IDT structure in memory, but will not load it. Loading is done in idt_cpu_load().
The IDT is setup according to the values in irq_virt_t.
Definition at line 27 of file idt.c.
| void idt_cpu_load | ( | void | ) |
Load the IDT on the current CPU.
This will load the IDT using the lidt instruction.
Must be called after idt_init().
Definition at line 53 of file idt.c.