mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add stubs for lifecycle management and update checking in loader
this is just a reminder to me on how i was planning to implement this after going through a big side-quest to change other things.
This commit is contained in:
parent
6eca732043
commit
59b15541f3
3 changed files with 16 additions and 0 deletions
|
|
@ -93,6 +93,9 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32)
|
|||
#[cfg(feature = "cramium-soc")]
|
||||
crate::platform::early_init(); // sets up PLLs so we're not running at 16MHz...
|
||||
|
||||
#[cfg(feature = "cramium-soc")]
|
||||
crate::platform::process_update();
|
||||
|
||||
// initially validate the whole image on disk (including kernel args)
|
||||
// kernel args must be validated because tampering with them can change critical assumptions about
|
||||
// how data is loaded into memory
|
||||
|
|
|
|||
9
loader/src/platform/cramium/update.rs
Normal file
9
loader/src/platform/cramium/update.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/// Checks to see if the necessary conditions for an update are met
|
||||
pub fn process_update() {
|
||||
// Placeholder:
|
||||
// Remember to lock the root keys before processing any updates
|
||||
crate::platform::cramium::verifier::lifecycle_lock_root();
|
||||
{
|
||||
// update code here
|
||||
}
|
||||
}
|
||||
4
loader/src/platform/cramium/verifier.rs
Normal file
4
loader/src/platform/cramium/verifier.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
pub fn lifecycle_lock_root() {
|
||||
// placeholder to lock out access to root secrets due to the lifecycle being advanced past
|
||||
// signature verification
|
||||
}
|
||||
Loading…
Reference in a new issue