mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Fix safety reasoning about get_on_cpu
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
c17a3eaa0b
commit
396ead6fbd
@ -88,11 +88,7 @@ unsafe fn init() {
|
||||
// 1. They are only called once in the boot context of the BSP.
|
||||
// 2. The number of CPUs are available because ACPI has been initialized.
|
||||
// 3. No CPU-local objects have been accessed yet.
|
||||
unsafe {
|
||||
cpu::init_num_cpus();
|
||||
cpu::local::copy_bsp_for_ap();
|
||||
cpu::set_this_cpu_id(0);
|
||||
}
|
||||
unsafe { cpu::init_on_bsp() };
|
||||
|
||||
// SAFETY: We are on the BSP and APs are not yet started.
|
||||
let meta_pages = unsafe { mm::frame::meta::init() };
|
||||
|
Reference in New Issue
Block a user