mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Make CPU-local and early ACPI initialization heap-less
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7496b24da1
commit
92bc8cbbf7
@ -22,23 +22,13 @@ pub(crate) fn init_cvm_guest() {
|
||||
// Unimplemented, no-op
|
||||
}
|
||||
|
||||
pub(crate) fn init_on_bsp() {
|
||||
pub(crate) unsafe fn late_init_on_bsp() {
|
||||
// SAFETY: this function is only called once on BSP.
|
||||
unsafe {
|
||||
trap::init(true);
|
||||
}
|
||||
irq::init();
|
||||
|
||||
// SAFETY: they are only called once on BSP and ACPI has been initialized.
|
||||
unsafe {
|
||||
crate::cpu::init_num_cpus();
|
||||
crate::cpu::set_this_cpu_id(0);
|
||||
}
|
||||
|
||||
// SAFETY: no CPU local objects have been accessed by this far. And
|
||||
// we are on the BSP.
|
||||
unsafe { crate::cpu::local::init_on_bsp() };
|
||||
|
||||
crate::boot::smp::boot_all_aps();
|
||||
|
||||
timer::init();
|
||||
|
Reference in New Issue
Block a user