From 0f81f3e2adc1528e46ff8df7ef73281917df8adf Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 15 Sep 2025 16:22:52 -0400 Subject: kern/amd64: gdt: Load GDT before setting GS_BASE If we update the GDTR after setting GS_BASE, we wont be referencing any valid data anymore. Switch out the GDTR early on. Signed-off-by: Ian Moffett --- src/sys/arch/amd64/boot/boot_chip.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/sys/arch/amd64/boot/boot_chip.c') diff --git a/src/sys/arch/amd64/boot/boot_chip.c b/src/sys/arch/amd64/boot/boot_chip.c index 8cefdac..2442bfb 100644 --- a/src/sys/arch/amd64/boot/boot_chip.c +++ b/src/sys/arch/amd64/boot/boot_chip.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -75,7 +74,6 @@ platform_boot(void) panic("platform_boot: could not get core\n"); } - gdt_load(); init_tss(core); i8259_disable(); -- cgit v1.2.3