From 0f2d971c6b99ea02bef4dcae3f6c0d3a57bdbc1a Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 19 Oct 2025 01:06:31 +0800 Subject: [PATCH] beginning of access control tests --- baremetal/src/repl.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/baremetal/src/repl.rs b/baremetal/src/repl.rs index 5206bd34e..6a5fb572f 100644 --- a/baremetal/src/repl.rs +++ b/baremetal/src/repl.rs @@ -196,7 +196,7 @@ impl Repl { ) }; let mut rram = bao1x_hal::rram::Reram::new(); - rram.write_slice(addr, poke_inner); + rram.write_slice(addr, poke_inner).ok(); crate::println!("RRAM written {:x} into {:x}, {} times", value, addr, count); } else { return Err(Error::help( @@ -1009,6 +1009,17 @@ impl Repl { "dbtest" => { crate::dabao_selftest::dabao_selftest(); } + "actest" => { + let slot_man = bao1x_hal::protected_rram::SlotManager::new(); + crate::println!( + "Slot 0(d): {:x?}", + slot_man.read(&bao1x_hal::protected_rram::SlotIndex::Data(0)) + ); + crate::println!( + "Slot 1(d): {:x?}", + slot_man.read(&bao1x_hal::protected_rram::SlotIndex::Data(1)) + ); + } "echo" => { for word in args { crate::print!("{} ", word);