diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-05-24 19:10:23 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-05-24 22:03:28 +0530 |
commit | c680eac8d940bc2e0c6fd1979e58148bfe99fcbb (patch) | |
tree | 71c612bcff199525498336348a57b15fd86c5e39 | |
parent | 2c6dfa021a7897bad3dc541ecfe449e2a7890994 (diff) |
interrupts: fix incorrect segment selector offset
IDT entry was setting the segment selector (GDT offset) to 0, which is
the NULL selector. Therefore, a general protection fault was triggered
crashing the kernel. This commit sets it to 0x08 (the first selector).
-rw-r--r-- | kernel/include/boot/idt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/include/boot/idt.h b/kernel/include/boot/idt.h index 2eda86c..bb424e9 100644 --- a/kernel/include/boot/idt.h +++ b/kernel/include/boot/idt.h @@ -25,7 +25,7 @@ #define IDT_ENTRY(isr, attributes) \ { \ (isr & 0xffff), /* isr_low */ \ - 0, /* segment_selector */ \ + 0x08, /* segment_selector */ \ 0, /* reserved */ \ attributes, /* attributes */ \ (isr >> 16) /* isr_high */ \ |