mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
if swap is turned on bodge a extra page buffer on the memory clear
this prevents some key loader constants from being zeroed out
This commit is contained in:
parent
75fbcd5be8
commit
c8b3fa9aad
1 changed files with 3 additions and 0 deletions
|
|
@ -512,6 +512,9 @@ fn clear_ram(cfg: &mut BootConfig) {
|
||||||
// stay there forever, if not explicitly cleared. This clear adds a couple seconds
|
// stay there forever, if not explicitly cleared. This clear adds a couple seconds
|
||||||
// to a cold boot, but it's probably worth it. Note that it doesn't happen on a suspend/resume.
|
// to a cold boot, but it's probably worth it. Note that it doesn't happen on a suspend/resume.
|
||||||
let ram: *mut u32 = cfg.sram_start as *mut u32;
|
let ram: *mut u32 = cfg.sram_start as *mut u32;
|
||||||
|
#[cfg(feature = "swap")]
|
||||||
|
let clear_limit = ((2 * 4096 + core::mem::size_of::<BootConfig>()) + 4095) & !4095;
|
||||||
|
#[cfg(not(feature = "swap"))]
|
||||||
let clear_limit = ((4096 + core::mem::size_of::<BootConfig>()) + 4095) & !4095;
|
let clear_limit = ((4096 + core::mem::size_of::<BootConfig>()) + 4095) & !4095;
|
||||||
if VDBG {
|
if VDBG {
|
||||||
println!("Stack clearing limit: {:x}", clear_limit);
|
println!("Stack clearing limit: {:x}", clear_limit);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue