diff options
author | Xander <xander@biltopia.org> | 2023-07-11 14:20:12 +0200 |
---|---|---|
committer | Xander <xander@biltopia.org> | 2023-07-11 14:20:12 +0200 |
commit | d7239440b314c3cfedc6fa840646698d4b30ee88 (patch) | |
tree | a3132f651df9f38ba7254149dba3c88a00d15766 /kernel/interrupts/idt.sats | |
parent | b14f83f53dfb1f4bf1b5eeb8162891a9aeeaff1c (diff) | |
download | ats-os-d7239440b314c3cfedc6fa840646698d4b30ee88.tar.xz ats-os-d7239440b314c3cfedc6fa840646698d4b30ee88.zip |
Some interrupt cleanup
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 |