diff options
Diffstat (limited to 'kernel/interrupts/idt.sats')
-rw-r--r-- | kernel/interrupts/idt.sats | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/interrupts/idt.sats b/kernel/interrupts/idt.sats index ce40cd8..b8ee06d 100644 --- a/kernel/interrupts/idt.sats +++ b/kernel/interrupts/idt.sats @@ -2,6 +2,9 @@ TRAP_GATE_FLAGS 0x8F // p=1, dpl=0b00, type=0b1111 #define INT_GATE_FLAGS 0x8E // p=1, dpl=0b00, type=0b1110 +#define +IDT_MAX_DESCRIPTORS 256 + typedef idt_entry_t = @{ isr_low = uint16, // The lower 16 bits of the ISR's address @@ -14,17 +17,17 @@ typedef idt_entry_t = @{ } typedef idtr_t = @{ - limit = uint16, + limit = uint16 (8 * IDT_MAX_DESCRIPTORS), base = [l : addr] ptr l } // Interrupt frame to pass to ISR -typedef int_frame = @{ - ip = uint64, // instruction pointer - cs = uint64, // code segment +typedef int_frame = @{ + ip = [l : agz] ptr l, // instruction pointer + cs = [l : agz] ptr l, // code segment rflags = uint64, - sp = uint64, // stack pointer - ss = uint64 // stack segment + sp = [l : agz] ptr l, // stack pointer + ss = [l : agz] ptr l // stack segment } fun idt_init() : void |