mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Refactor code related to CPU local memory
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
98619f3482
commit
0f8d8da372
@ -47,7 +47,7 @@ pub use ostd_macros::main;
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
use tdx_guest::init_tdx;
|
||||
|
||||
pub use self::{cpu::CpuLocal, error::Error, prelude::Result};
|
||||
pub use self::{cpu::cpu_local::CpuLocal, error::Error, prelude::Result};
|
||||
|
||||
/// Initializes OSTD.
|
||||
///
|
||||
@ -77,6 +77,9 @@ pub fn init() {
|
||||
mm::page::allocator::init();
|
||||
mm::kspace::init_boot_page_table();
|
||||
mm::kspace::init_kernel_page_table(mm::init_page_meta());
|
||||
// SAFETY: no CPU local objects have been accessed by this far. And
|
||||
// we are on the BSP.
|
||||
unsafe { cpu::cpu_local::init_on_bsp() };
|
||||
mm::misc_init();
|
||||
|
||||
trap::init();
|
||||
|
Reference in New Issue
Block a user