interrupt: move ReloadSegments before enabling interrupt

This commit is contained in:
Edgaru089 2021-11-07 17:55:43 +08:00
parent 3b9fc2f4d0
commit 9f757efa5e

View File

@ -93,10 +93,9 @@ void interrupt_Init() {
interrupt_LoadIDT(KERNEL_IDT_SIZE - 1, (void *)KERNEL_IDT_MAPPING); // set it! interrupt_LoadIDT(KERNEL_IDT_SIZE - 1, (void *)KERNEL_IDT_MAPPING); // set it!
io_WriteConsoleASCII("IDT OK\n"); io_WriteConsoleASCII("IDT OK\n");
interrupt_ReloadSegments();
io_WriteConsoleASCII("Segment Registers Reloaded\n");
interrupt_Enabled = true; interrupt_Enabled = true;
asm volatile("sti"); asm volatile("sti");
interrupt_ReloadSegments();
io_WriteConsoleASCII("Segment Registers Reloaded\n");
} }