From 9f757efa5efec7f5b65bb0d4a8e6050ef9106d58 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Sun, 7 Nov 2021 17:55:43 +0800 Subject: [PATCH] interrupt: move ReloadSegments before enabling interrupt --- interrupt/init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/interrupt/init.c b/interrupt/init.c index 48a1945..c5980d5 100644 --- a/interrupt/init.c +++ b/interrupt/init.c @@ -93,10 +93,9 @@ void interrupt_Init() { interrupt_LoadIDT(KERNEL_IDT_SIZE - 1, (void *)KERNEL_IDT_MAPPING); // set it! io_WriteConsoleASCII("IDT OK\n"); + interrupt_ReloadSegments(); + io_WriteConsoleASCII("Segment Registers Reloaded\n"); interrupt_Enabled = true; asm volatile("sti"); - - interrupt_ReloadSegments(); - io_WriteConsoleASCII("Segment Registers Reloaded\n"); }