diff options
Diffstat (limited to 'src/kernel/interrupts/idt.c')
-rw-r--r-- | src/kernel/interrupts/idt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c index b06a52a..f405ca9 100644 --- a/src/kernel/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c @@ -2,11 +2,11 @@ #include <kernel/system.h> struct idt_entry { - unsigned short base_lo; - unsigned short sel; // Kernel segment - unsigned char always0; // Always 0 - unsigned char flags; - unsigned short base_hi; + uint16_t base_low; + uint16_t sel; // Kernel segment + uint8_t always0; // Always 0 + uint8_t flags; + uint16_t base_high; } __attribute__((packed)); struct idt_ptr { @@ -24,13 +24,13 @@ extern void idt_load(); void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags) { // Specify the interrupt routine's base address - idt[num].base_lo = (base & 0xFFFF); - idt[num].base_hi = (base >> 16) & 0xFFFF; + idt[num].base_low = (base & 0xFFFF); + idt[num].base_high = (base >> 16) & 0xFFFF; // Set selector/segment of IDT entry idt[num].sel = sel; idt[num].always0 = 0; - idt[num].flags = flags; + idt[num].flags = flags | 0x60; } // Install IDT |