Fix both the preempt count atomicity and the CPU-local init problem

This commit is contained in:
Zhang Junyang
2024-07-19 13:23:28 +00:00
committed by Tate, Hongliang Tian
parent 00b9bf9610
commit 3ae884081f
6 changed files with 173 additions and 49 deletions

View File

@ -59,6 +59,9 @@ pub use self::{cpu::cpu_local::CpuLocal, error::Error, prelude::Result};
pub fn init() {
arch::before_all_init();
// SAFETY: This function is called only once and only on the BSP.
unsafe { cpu::cpu_local::early_init_bsp_local_base() };
mm::heap_allocator::init();
boot::init();