This commit is contained in:
2026-09-28 17:46:45 +02:00
committed by Marvin Friedrich
parent 09926f45ee
commit 4a20a5b0af
62 changed files with 1266 additions and 554 deletions
+4 -2
View File
@@ -9,6 +9,7 @@
#include <x86_64/hpet.h>
#include <x86_64/idt.h>
#include <x86_64/percpu.h>
#include <x86_64/smp.h>
#include <x86_64/syscall.h>
#include <x86_64/tsc.h>
@@ -43,7 +44,7 @@ static_assert(sizeof(union ia32_star) == 8);
[[__percpu]]
struct arch_percpu arch_data = {0};
static void setup_cpu(struct percpu* cpu) {
void x86_64_cpu_setup(struct percpu* cpu) {
asm_wrmsr(MSR_KERNEL_GS_BASE, 0);
asm_wrmsr(MSR_GS_BASE, (uint64_t)cpu);
asm_wrmsr(MSR_FS_BASE, 0);
@@ -131,7 +132,8 @@ void arch_percpu_init() {
#endif
// Init the BSP.
setup_cpu(&percpu_bsp);
x86_64_cpu_setup(&percpu_bsp);
// Init any APs.
x86_64_smp_init();
}