From 0cbdf1e9f13261db7c31bee95982d19fa156fd2c Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 14 Aug 2025 02:04:39 +0800 Subject: [PATCH] fix "mysterious" BIO errors turns out...the memory test was subtly smashing stack. It made sense during early bring up to do this quick test but I should have retired it sooner. Keeping it around for a little bit longer because chips aren't fully brought-up and I could see this being a useful stub in case we find an outlier that actually has memory access problems. --- baremetal/src/platform/cramium/cramium.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/baremetal/src/platform/cramium/cramium.rs b/baremetal/src/platform/cramium/cramium.rs index 3c35dceaa..a78685f19 100644 --- a/baremetal/src/platform/cramium/cramium.rs +++ b/baremetal/src/platform/cramium/cramium.rs @@ -159,6 +159,8 @@ pub fn early_init() { let perclk = unsafe { init_clock_asic(SYSTEM_CLOCK_FREQUENCY) }; // test memory + // NOTE: this smashes stack - need adjustment if this is going to be a "fixture" + /* crate::println!("\ntest memory..."); let base = 0x6108_5000; let mem_range = unsafe { @@ -182,6 +184,7 @@ pub fn early_init() { } else { crate::println!("fast mem test passed"); } + */ crate::println!("scratch page: {:x}, heap start: {:x}", SCRATCH_PAGE, HEAP_START); // Define the .data region - bootstrap baremetal using these hard-coded parameters.