mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
upgrade the sigcheck boot routine to pass kernel arguments
all other boot modes would get an a0 with the address that the kernel is "supposed" to be located. this is neither security sensitive or problematic.
This commit is contained in:
parent
ec9aed29dd
commit
07e7197517
1 changed files with 8 additions and 2 deletions
|
|
@ -127,10 +127,16 @@ fn erase_secrets() {
|
|||
}
|
||||
|
||||
pub fn jump_to(target: usize) -> ! {
|
||||
// loader expects a0 to have the address of the kernel image pre-loaded
|
||||
let kernel_loc = bao1x_api::offsets::KERNEL_START;
|
||||
unsafe {
|
||||
core::arch::asm!(
|
||||
"jr {0}",
|
||||
in(reg) target,
|
||||
"mv t0, {target}",
|
||||
"mv a0, {kernel_loc}",
|
||||
"mv a1, x0",
|
||||
"jr t0",
|
||||
target = in(reg) target,
|
||||
kernel_loc = in(reg) kernel_loc,
|
||||
options(noreturn)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue