From 92523f45adae440214d456af825078dc06a3b390 Mon Sep 17 00:00:00 2001 From: ZhiyuanSue <2262387848@qq.com> Date: Fri, 16 Aug 2024 21:55:00 +0800 Subject: [PATCH] clean boot.bss problem --- kernel/src/boot/mm.rs | 4 ++-- kernel/src/interrupt/mod.rs | 2 +- kernel/src/kernel/boot.rs | 8 ++++---- sel4_task/src/scheduler.rs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/src/boot/mm.rs b/kernel/src/boot/mm.rs index 1a71ee6..a976fcf 100644 --- a/kernel/src/boot/mm.rs +++ b/kernel/src/boot/mm.rs @@ -16,10 +16,10 @@ static mut avail_reg: [region_t; MAX_NUM_FREEMEM_REG] = pub static mut res_reg: [region_t; NUM_RESERVED_REGIONS] = [region_t { start: 0, end: 0 }; NUM_RESERVED_REGIONS]; -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut avail_p_regs_size: usize = 0; -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut avail_p_regs_addr: usize = 0; pub fn rust_init_freemem( diff --git a/kernel/src/interrupt/mod.rs b/kernel/src/interrupt/mod.rs index 9687b86..af46410 100644 --- a/kernel/src/interrupt/mod.rs +++ b/kernel/src/interrupt/mod.rs @@ -22,7 +22,7 @@ pub static mut intStateIRQTable: [usize; maxIRQ + 1] = [0; maxIRQ + 1]; pub static mut intStateIRQNode: pptr_t = 0; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut active_irq: [usize; CONFIG_MAX_NUM_NODES] = [0; CONFIG_MAX_NUM_NODES]; #[cfg(feature = "ENABLE_SMP")] diff --git a/kernel/src/kernel/boot.rs b/kernel/src/kernel/boot.rs index 64d2748..8baf47a 100644 --- a/kernel/src/kernel/boot.rs +++ b/kernel/src/kernel/boot.rs @@ -10,17 +10,17 @@ use sel4_cspace::interface::cte_t; use crate::structures::{extra_caps_t, syscall_error_t}; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut current_lookup_fault: lookup_fault_t = lookup_fault_t { words: [0; 2] }; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut current_fault: seL4_Fault_t = seL4_Fault_t { words: [0; seL4_Fault_t::WIDTH], }; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut current_syscall_error: syscall_error_t = syscall_error_t { invalidArgumentNumber: 0, invalidCapNumber: 0, @@ -32,7 +32,7 @@ pub static mut current_syscall_error: syscall_error_t = syscall_error_t { }; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut current_extra_caps: extra_caps_t = extra_caps_t { excaprefs: [0; seL4_MsgMaxExtraCaps], }; diff --git a/sel4_task/src/scheduler.rs b/sel4_task/src/scheduler.rs index f402811..d694fea 100644 --- a/sel4_task/src/scheduler.rs +++ b/sel4_task/src/scheduler.rs @@ -104,10 +104,10 @@ pub static mut ksReadyQueuesL2Bitmap: [[usize; L2_BITMAP_SIZE]; CONFIG_NUM_DOMAI pub static mut ksReadyQueuesL1Bitmap: [usize; CONFIG_NUM_DOMAINS] = [0; CONFIG_NUM_DOMAINS]; #[no_mangle] -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut ksWorkUnitsCompleted: usize = 0; -#[link_section = ".boot.bss"] +// #[link_section = ".boot.bss"] pub static mut ksDomSchedule: [dschedule_t; ksDomScheduleLength] = [dschedule_t { domain: 0, length: 60,