mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 01:43:22 +00:00
Add tdx early init and ve handler functions
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
d7710207bb
commit
4f0df44b29
@ -40,6 +40,8 @@ pub use self::prelude::Result;
|
||||
use alloc::vec::Vec;
|
||||
use arch::irq::{IrqCallbackHandle, IrqLine};
|
||||
use core::{mem, panic::PanicInfo};
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
use tdx_guest::tdx_early_init;
|
||||
use trapframe::TrapFrame;
|
||||
|
||||
static mut IRQ_CALLBACK_LIST: Vec<IrqCallbackHandle> = Vec::new();
|
||||
@ -47,6 +49,13 @@ static mut IRQ_CALLBACK_LIST: Vec<IrqCallbackHandle> = Vec::new();
|
||||
pub fn init() {
|
||||
arch::before_all_init();
|
||||
logger::init();
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
let td_info = tdx_early_init().unwrap();
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
println!(
|
||||
"td gpaw: {}, td attributes: {:?}\nTDX guest is initialized",
|
||||
td_info.gpaw, td_info.attributes
|
||||
);
|
||||
vm::heap_allocator::init();
|
||||
boot::init();
|
||||
vm::init();
|
||||
|
Reference in New Issue
Block a user