mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
handle return codes that include tags
This commit is contained in:
parent
69d81042b9
commit
3c341d0f8e
2 changed files with 16 additions and 4 deletions
|
|
@ -32,7 +32,11 @@ pub fn boot_or_die() -> ! {
|
|||
true,
|
||||
None,
|
||||
) {
|
||||
Ok(k) => crate::println!("**should be unreachable** Booted with key {}", k),
|
||||
Ok((k, tag)) => crate::println!(
|
||||
"**should be unreachable** Booted with key {}({})",
|
||||
k,
|
||||
core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag")
|
||||
),
|
||||
Err(e) => crate::println!("Image did not validate: {:?}", e),
|
||||
}
|
||||
crate::println!("No valid loader or baremetal image found. Halting!");
|
||||
|
|
|
|||
|
|
@ -266,7 +266,11 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32)
|
|||
false,
|
||||
None,
|
||||
) {
|
||||
Ok(k) => println!("*** Kernel signature check by key @ {} OK ***", k),
|
||||
Ok((k, tag)) => println!(
|
||||
"*** Kernel signature check by key @ {}({}) OK ***",
|
||||
k,
|
||||
core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag")
|
||||
),
|
||||
Err(e) => {
|
||||
println!("Kernel failed signature check. Dying: {:?}", e);
|
||||
bao1x_hal::sigcheck::die_no_std();
|
||||
|
|
@ -285,8 +289,12 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32)
|
|||
false,
|
||||
None,
|
||||
) {
|
||||
Ok(k) => {
|
||||
println!("*** Detached app signature check by key @ {} OK ***", k);
|
||||
Ok((k, tag)) => {
|
||||
println!(
|
||||
"*** Detached app signature check by key @ {}({}) OK ***",
|
||||
k,
|
||||
core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag")
|
||||
);
|
||||
true
|
||||
}
|
||||
Err(_e) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue