diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-15 13:01:37 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-15 13:02:17 -0400 |
commit | 76b4d4408ec450d8f8a3aee7223b67da1ce0e2cb (patch) | |
tree | 11217d920d871127d21ec50ae9b64c976264d3b4 /src/sys/include/arch/amd64/mdcpu.h | |
parent | 6bd92c969a6f4aefee258adc79a3ab0bde9443b2 (diff) |
kernel/amd64: Add task state segment logic
This commit implements the task state segment and splits up processor
initialization into two seperate stages. The cpu_conf() function is
apart of the first stage and sets up things that should be going by the
time the kernel is started / early init. The cpu_init() function runs
later functions that initialize further platform specific subsystems.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/arch/amd64/mdcpu.h')
-rw-r--r-- | src/sys/include/arch/amd64/mdcpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sys/include/arch/amd64/mdcpu.h b/src/sys/include/arch/amd64/mdcpu.h index 0a39eb4..1503adb 100644 --- a/src/sys/include/arch/amd64/mdcpu.h +++ b/src/sys/include/arch/amd64/mdcpu.h @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/cdefs.h> +#include <machine/tss.h> #define md_spinwait() __ASMV("pause") #define md_intoff() __ASMV("cli") @@ -46,12 +47,14 @@ * @cr3: CR3 register value (PML<n> phys) * @lapic_base: LAPIC register interface base * @x2apic: Has the x2APIC? Is 1 if true + * @tss: Task state segment for this core */ struct mdcore { uint32_t apic_id; uint64_t cr3; void *lapic_base; uint8_t x2apic : 1; + struct tss_entry tss; }; #endif /* !_MACHINE_MDCPU_H_ */ |