|
PatchworkOS
|
Interrupt Descriptor Table. More...
Data Structures | |
| struct | idt_desc_t |
| IDT descriptor structure. More... | |
| struct | idt_gate_t |
| IDT gate structure. More... | |
| struct | idt_t |
| IDT structure. More... | |
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. | |
Interrupt Descriptor Table.
The Interrupt Descriptor Table tells a CPU what to do when it receives an interrupt or exception.
| enum idt_attributes_t |
IDT gate attributes.
| 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 47 of file idt.c.
References idt_load_descriptor(), idt_desc_t::offset, and idt_desc_t::size.
Referenced by cpu_init().
| 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().
Definition at line 26 of file idt.c.
References EXCEPTION_AMOUNT, EXCEPTION_DOUBLE_FAULT, IDT_ATTR_INTERRUPT, IDT_ATTR_PRESENT, IDT_ATTR_RING0, idt_gate(), INTERRUPT_AMOUNT, TSS_IST_DOUBLE_FAULT, TSS_IST_EXCEPTION, TSS_IST_INTERRUPT, and vectorTable.
Referenced by init_early().