|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "common/stdint.h"Go to the source code of this file.
Enumerations | |
| enum | idt_flags { IDT_FLAG_GATE_TASK = 0x05 , IDT_FLAG_GATE_16BIT_INT = 0x06 , IDT_FLAG_GATE_16BIT_TRAP = 0x07 , IDT_FLAG_GATE_32BIT_INT = 0x0E , IDT_FLAG_GATE_32BIT_TRAP = 0x0F , IDT_FLAG_RING0 = (0 << 5) , IDT_FLAG_RING1 = (1 << 5) , IDT_FLAG_RING2 = (2 << 5) , IDT_FLAG_RING3 = (3 << 5) , IDT_FLAG_PRESENT = 0x80 } |
| IDT gate type and attribute flags. More... | |
Functions | |
| void | idt_initialize (void) |
| initialize the Interrupt Descriptor Table (IDT) and load it into the IDTR register. | |
| void | idt_load_core (void) |
| load the IDT into the IDTR of the core that runs the call. | |
| void | idt_set_gate (int vector, void *base, uint16_t segment, uint8_t flags) |
| configure a single IDT gate entry. | |
| void | idt_enable_gate (int vector) |
| enable an IDT gate by setting its present bit. | |
| void | idt_disable_gate (int vector) |
| disable an IDT gate by clearing its present bit. | |
| enum idt_flags |
IDT gate type and attribute flags.
combine these with bitwise OR to build the flags byte for an IDT entry.
| void idt_initialize | ( | void | ) |
initialize the Interrupt Descriptor Table (IDT) and load it into the IDTR register.
| void idt_load_core | ( | void | ) |
load the IDT into the IDTR of the core that runs the call.
idt_initialize() does it for the boot core; each other core calls this when it starts.
configure a single IDT gate entry.
| vector | interrupt vector number (0–255). |
| base | pointer to the interrupt service routine. |
| segment | code segment selector for the ISR. |
| flags | gate type and attribute flags (see idt_flags). |
| void idt_enable_gate | ( | int | vector | ) |
enable an IDT gate by setting its present bit.
| vector | interrupt vector number (0–255). |
| void idt_disable_gate | ( | int | vector | ) |
disable an IDT gate by clearing its present bit.
| vector | interrupt vector number (0–255). |