|
AquilaOS documentation
How it works, and its code
|
x86: the Interrupt Descriptor Table (IDT), which says where each interrupt and exception vector goes. More...
Go to the source code of this file.
Data Structures | |
| struct | idt_entry |
| struct | idt_ptr |
Macros | |
| #define | DPL0 0 |
| #define | DPL3 3 |
Functions | |
| void | x86_idt_gate_set (uint32_t id, uintptr_t offset) |
| Sets an interrupt gate that only the hardware (and the kernel) can raise: an exception or a device interrupt. | |
| void | x86_idt_gate_user_set (uint32_t id, uintptr_t offset) |
| Sets an interrupt gate that user mode may raise with int too: the system call vector. | |
| void | x86_idt_setup () |
| Loads the IDT on the running CPU. | |
Variables | |
| static struct idt_entry | idt [256] |
| struct idt_ptr | idt_pointer |
x86: the Interrupt Descriptor Table (IDT), which says where each interrupt and exception vector goes.
All CPUs share it.
Definition in file idt.c.
Sets an interrupt gate that only the hardware (and the kernel) can raise: an exception or a device interrupt.
The handler runs in the kernel's code segment, with interrupts disabled.
| id | the vector |
| offset | the handler's address |
Definition at line 45 of file idt.c.
References idt_entry::dpl, DPL0, idt_entry::flags, idt, idt_entry::offset_ext, idt_entry::offset_hi, idt_entry::offset_lo, idt_entry::p, idt_entry::selector, and x86_idt_gate_set().
Referenced by x86_idt_gate_set(), x86_irq_gates_setup(), and x86_isr_setup().
Sets an interrupt gate that user mode may raise with int too: the system call vector.
The handler still runs in the kernel's code segment.
| id | the vector |
| offset | the handler's address |
Definition at line 67 of file idt.c.
References idt_entry::dpl, DPL3, idt_entry::flags, idt, idt_entry::offset_ext, idt_entry::offset_hi, idt_entry::offset_lo, idt_entry::p, idt_entry::selector, and x86_idt_gate_user_set().
Referenced by x86_idt_gate_user_set(), and x86_isr_setup().
| void x86_idt_setup | ( | void | ) |
Loads the IDT on the running CPU.
Definition at line 82 of file idt.c.
References idt_ptr::base, idt, idt_pointer, idt_ptr::limit, x86_idt_setup(), and x86_lidt().
Referenced by x86_ap_start(), x86_cpu_init(), and x86_idt_setup().
|
static |
Referenced by x86_idt_gate_set(), x86_idt_gate_user_set(), and x86_idt_setup().
| struct idt_ptr idt_pointer |
Referenced by x86_idt_setup().