diff --git a/libs/bao1x-api/src/offsets.rs b/libs/bao1x-api/src/offsets.rs index b89ea4971..80cf1eac2 100644 --- a/libs/bao1x-api/src/offsets.rs +++ b/libs/bao1x-api/src/offsets.rs @@ -6,6 +6,10 @@ pub const BOOT1_START: usize = 0x6002_0000; pub const LOADER_START: usize = 0x6006_0000; pub const BAREMETAL_START: usize = LOADER_START; pub const KERNEL_START: usize = 0x6008_0000; + +// total storage area available in RRAM. Above this are reserved vectors for security apparatus. +pub const RRAM_STORAGE_LEN: usize = 0x3D_A000; + // loadable apps all "start" at this address for UF2 updates // however these are remapped into external flash based on a defragmentation table // and app ID. The app ID also has to get encoded into this offset, likely to be diff --git a/libs/bao1x-hal/src/rram.rs b/libs/bao1x-hal/src/rram.rs index d26c87e85..43bcd92a2 100644 --- a/libs/bao1x-hal/src/rram.rs +++ b/libs/bao1x-hal/src/rram.rs @@ -38,7 +38,7 @@ impl Reram { array: unsafe { core::slice::from_raw_parts_mut( utralib::HW_RERAM_MEM as *mut u32, - utralib::HW_RERAM_MEM_LEN / core::mem::size_of::(), + bao1x_api::RRAM_STORAGE_LEN / core::mem::size_of::(), ) }, }