From 90e13613e49f98ae67ea32ba77d4df2e9509217e Mon Sep 17 00:00:00 2001 From: llh730 <2597763106@qq.com> Date: Mon, 19 Aug 2024 16:38:54 +0800 Subject: [PATCH] fix this problem by through lto = false --- src/arch/aarch64/boot.rs | 1 - src/boot/root_server.rs | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/arch/aarch64/boot.rs b/src/arch/aarch64/boot.rs index b5b3d8c..f643677 100644 --- a/src/arch/aarch64/boot.rs +++ b/src/arch/aarch64/boot.rs @@ -86,7 +86,6 @@ pub fn try_init_kernel( debug!("ERROR: free memory management initialization failed\n"); return false; } - if let Some((initial_thread, root_cnode_cap)) = root_server_init( it_v_reg, extra_bi_size_bits, diff --git a/src/boot/root_server.rs b/src/boot/root_server.rs index f05d336..66b8c32 100644 --- a/src/boot/root_server.rs +++ b/src/boot/root_server.rs @@ -115,7 +115,6 @@ pub fn root_server_init( ipcbuf_cap, ) }; - if initial as usize == 0 { debug!("ERROR: could not create initial thread"); return None; @@ -123,7 +122,7 @@ pub fn root_server_init( Some((initial, root_cnode_cap)) } -#[no_mangle] +// #[no_mangle] unsafe fn create_initial_thread( root_cnode_cap: &cap_t, it_pd_cap: &cap_t, @@ -169,11 +168,10 @@ unsafe fn create_initial_thread( tcb.tcbPriority = seL4_MaxPrio; set_thread_state(tcb, ThreadState::ThreadStateRunning); tcb.setup_reply_master(); - unsafe { - ksCurDomain = ksDomSchedule[ksDomScheduleIdx].domain; - ksDomainTime = ksDomSchedule[ksDomScheduleIdx].length; - } + ksCurDomain = ksDomSchedule[ksDomScheduleIdx].domain; + ksDomainTime = ksDomSchedule[ksDomScheduleIdx].length; tcb.domain = ksCurDomain; + // log::error!("tcb.domain:{:#x}", &tcb.domain as *const usize as usize); #[cfg(feature = "ENABLE_SMP")] { tcb.tcbAffinity = 0;