mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add adjustable signature block offsets based on the target
bao1x has a smaller, more efficient signature block that folds more data into the signed region.
This commit is contained in:
parent
4c84fc523d
commit
634ccd6c38
1 changed files with 6 additions and 1 deletions
|
|
@ -219,7 +219,12 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32)
|
|||
}
|
||||
|
||||
// the kernel arg buffer is SIG_BLOCK_SIZE into the signed region
|
||||
let arg_buffer = (signed_buffer as u32 + SIGBLOCK_SIZE as u32) as *const usize;
|
||||
#[cfg(not(feature = "bao1x"))]
|
||||
let signature_size = SIGBLOCK_SIZE;
|
||||
#[cfg(feature = "bao1x")]
|
||||
let signature_size = bao1x_api::signatures::SIGBLOCK_LEN;
|
||||
let arg_buffer = (signed_buffer as u32 + signature_size as u32) as *const usize;
|
||||
println!("arg_buffer: {:x}", arg_buffer as usize);
|
||||
|
||||
// perhaps later on in these sequences, individual sub-images may be validated
|
||||
// against sub-signatures; or the images may need to be re-validated after loading
|
||||
|
|
|
|||
Loading…
Reference in a new issue