mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add coreuser table setup to boot0
I think it belongs here, because this "should" be a "baked in" setting. Maybe I'll regret that, because it really enforces a hardware one-way door on changing/updating the coreuser maps, but also, I think it makes it a bit stronger if there is no easy way to bypass/override that setting.
This commit is contained in:
parent
0943b67972
commit
356ab47c3c
1 changed files with 7 additions and 0 deletions
|
|
@ -105,6 +105,13 @@ pub fn early_init() {
|
|||
// malleable (no hardware lock to prevent update), which is a potential vulnerability.
|
||||
init_hash();
|
||||
|
||||
// this is a security-critical initialization. Failure to do this correctly breaks
|
||||
// the hardware access control scheme for key/data slots.
|
||||
let mut cu = bao1x_hal::coreuser::Coreuser::new();
|
||||
// safety: this is safe because it's followed by a `protect()` call.
|
||||
unsafe { cu.set() };
|
||||
cu.protect();
|
||||
|
||||
// TxRx setup
|
||||
#[cfg(feature = "unsafe-dev")]
|
||||
let mut udma_uart = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue