From 8ae23738c78f58bea882dba11080d7052453e71d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 16 Sep 2025 23:18:03 -0400 Subject: kern/amd64: cpu: Make GDT per-cpu to match TSS Signed-off-by: Ian Moffett --- src/sys/include/arch/amd64/mdcpu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sys/include/arch/amd64/mdcpu.h') diff --git a/src/sys/include/arch/amd64/mdcpu.h b/src/sys/include/arch/amd64/mdcpu.h index 3fccc42..d72836a 100644 --- a/src/sys/include/arch/amd64/mdcpu.h +++ b/src/sys/include/arch/amd64/mdcpu.h @@ -33,6 +33,7 @@ #include #include #include +#include #define md_spinwait() __ASMV("pause") #define md_intoff() __ASMV("cli") @@ -57,6 +58,8 @@ struct mdcore { uint8_t x2apic : 1; struct tss_entry tss; size_t lapic_tmr_freq; + struct gdt_entry gdt[GDT_ENTRY_COUNT]; + struct gdtr gdtr; }; #endif /* !_MACHINE_MDCPU_H_ */ -- cgit v1.2.3