foo
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user