From c680eac8d940bc2e0c6fd1979e58148bfe99fcbb Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sat, 24 May 2025 19:10:23 +0530 Subject: 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). --- kernel/include/boot/idt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/include') 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 */ \ -- cgit v1.2.3