diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-15 16:22:52 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-15 16:22:52 -0400 |
commit | 0f81f3e2adc1528e46ff8df7ef73281917df8adf (patch) | |
tree | 188219f5f2a14713c041db0baf7f4a1f67e12bdb /src/sys/arch/amd64/boot/boot_chip.c | |
parent | 02b1c2dcc955d103e326efd46cc1b529dcd5e3aa (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/arch/amd64/boot/boot_chip.c')
-rw-r--r-- | src/sys/arch/amd64/boot/boot_chip.c | 2 |
1 files changed, 0 insertions, 2 deletions
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 <sys/panic.h> #include <sys/cpuvar.h> #include <machine/uart.h> -#include <machine/gdt.h> #include <machine/boot.h> #include <machine/i8259.h> #include <machine/ioapic.h> @@ -75,7 +74,6 @@ platform_boot(void) panic("platform_boot: could not get core\n"); } - gdt_load(); init_tss(core); i8259_disable(); |