Refactor the boot PT initialization for SMP

This commit is contained in:
Zhang Junyang
2024-08-22 18:48:33 +08:00
committed by Tate, Hongliang Tian
parent e04fa6c69d
commit 5feb8f5de8
7 changed files with 120 additions and 60 deletions

View File

@ -125,6 +125,11 @@ fn ap_early_entry(local_apic_id: u32) -> ! {
}
crate::arch::irq::enable_local();
// SAFETY: this function is only called once on this AP.
unsafe {
crate::mm::kspace::activate_kernel_page_table();
}
// Mark the AP as started.
let ap_boot_info = AP_BOOT_INFO.get().unwrap();
ap_boot_info