ArvernOS
|
#include <stdint.h>
Data Structures | |
struct | idt_gate_t |
struct | idt_register_t |
Macros | |
#define | IDT_ENTRIES 256 |
Functions | |
void | idt_load () |
void | idt_register_gate (uint16_t n, uint64_t handler, uint8_t type, uint8_t dpl) |
void | idt_register_interrupt (uint16_t n, uint64_t handler) |
#define IDT_ENTRIES 256 |
The number of entries in the Interrupt Descriptor Table.
There are 256 interrupts (0..255), so IDT should have 256 entries, each entry corresponding to a specific interrupt.
void idt_load | ( | ) |
Loads the Interrupt Descriptor Table. The table should be updated with idt_register_gate()
and/or idt_register_interrupt()
before calling this function.
void idt_register_gate | ( | uint16_t | n, |
uint64_t | handler, | ||
uint8_t | type, | ||
uint8_t | dpl ) |
Registers a gate in the IDT.
n | a gate number |
handler | the handler to register for the given gate |
type | the gate type |
dpl | the DPL value ("ring") |
void idt_register_interrupt | ( | uint16_t | n, |
uint64_t | handler ) |
Registers a an interrupt gate in the IDT.
n | a gate number |
handler | the handler to register for the given gate |