Make if_tdx_enabled macro x86-specific

This commit is contained in:
Zejun Zhao
2025-03-25 14:17:18 +08:00
committed by Tate, Hongliang Tian
parent dd67a9a175
commit e4aa261c48
14 changed files with 80 additions and 104 deletions

View File

@ -76,11 +76,13 @@ unsafe fn init() {
unsafe {
mm::frame::allocator::init_early_allocator();
}
if_tdx_enabled!({
#[cfg(target_arch = "x86_64")]
arch::if_tdx_enabled!({
} else {
arch::serial::init();
});
#[cfg(not(target_arch = "x86_64"))]
arch::serial::init();
logger::init();
@ -107,7 +109,8 @@ unsafe fn init() {
unsafe { arch::late_init_on_bsp() };
if_tdx_enabled!({
#[cfg(target_arch = "x86_64")]
arch::if_tdx_enabled!({
arch::serial::init();
});