|
|
|
@ -13,7 +13,7 @@ typedef struct { |
|
|
|
|
uint base; |
|
|
|
|
} __attribute__((packed)) idtr; |
|
|
|
|
|
|
|
|
|
__attribute__((aligned(4))) |
|
|
|
|
__attribute__((aligned(16))) |
|
|
|
|
static idt_entry IDT[IDT_MAX_DESCS]; |
|
|
|
|
static idtr IDTR; |
|
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ void idt_set_desc(uint8 idx, void* isr, uint8 flags) { |
|
|
|
|
idt_entry* desc = &IDT[idx]; // get descriptor
|
|
|
|
|
|
|
|
|
|
desc->offset_1 = (uint) isr & 0xffff; |
|
|
|
|
desc->selector = 0x05; // kernel code selector for the GDT (null is 0x0 - 0x4 => code is 0x05 to something...)
|
|
|
|
|
desc->selector = 0x08; // kernel code selector for the GDT (null is 0x0 - 0x4 => code is 0x05 to something...)
|
|
|
|
|
desc->reserved = 0;
|
|
|
|
|
desc->type_attr = flags; |
|
|
|
|
desc->offset_2 = (uint) isr >> 16; |
|
|
|
|