mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
remove panic/resets on errors during secret erase
at the moment this runs a risk of boot-loops depending on the configuration of the device.
This commit is contained in:
parent
5e805196e6
commit
ff5cfa7b12
1 changed files with 3 additions and 3 deletions
|
|
@ -257,10 +257,12 @@ pub fn erase_secrets() {
|
|||
let check = unsafe { slot_mgr.read_data_slot(data_index) };
|
||||
if !check.iter().all(|&b| b == ERASE_VALUE) {
|
||||
crate::println!("Failed to erase key at {}: {:x?}", data_index, check);
|
||||
/* // commented out - can lead to boot loops
|
||||
// reboot on failure to erase
|
||||
let mut rcurst =
|
||||
utralib::CSR::new(utralib::utra::sysctrl::HW_SYSCTRL_BASE as *mut u32);
|
||||
rcurst.wo(utralib::utra::sysctrl::SFR_RCURST0, 0x55AA);
|
||||
*/
|
||||
} else {
|
||||
crate::println!("Key range at {} confirmed erased", slot.get_base());
|
||||
}
|
||||
|
|
@ -268,9 +270,7 @@ pub fn erase_secrets() {
|
|||
_ => {}
|
||||
}
|
||||
if zero_key_count > ZERO_ERR_THRESH {
|
||||
panic!(
|
||||
"Saw too many zero-keys. Insufficient privilege to erase keys, panicing instead of allowing a boot!"
|
||||
);
|
||||
crate::println!("Saw too many zero-keys. Insufficient privilege to erase keys!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue