[kernel] Set process in cpu_early_init

Update the cpu data to point to the fake kernel process in
cpu_early_init so there can never be a race condition where the current
process may not be set.
This commit is contained in:
Justin C. Miller
2021-04-07 23:04:37 -07:00
parent 6190b05a13
commit e05e05b13a

View File

@@ -46,6 +46,10 @@ cpu_early_init(cpu_data *cpu)
// Install the GS base pointint to the cpu_data
wrmsr(msr::ia32_gs_base, reinterpret_cast<uintptr_t>(cpu));
// Set the initial process as the kernel "process"
extern process &g_kernel_process;
cpu->process = &g_kernel_process;
}
void