mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
use the correct session key for swap ram
and also call platform-specific swap init
This commit is contained in:
parent
085c31d378
commit
ef6a73d329
1 changed files with 4 additions and 1 deletions
|
|
@ -249,7 +249,7 @@ pub fn phase_2(cfg: &mut BootConfig, fs_prehash: &[u8; 64]) {
|
||||||
// - SwapSpec is a Repr(C), and every element of the struct is valid with a 0's initialization.
|
// - SwapSpec is a Repr(C), and every element of the struct is valid with a 0's initialization.
|
||||||
let swap_spec = unsafe { (swap_spec_ptr as *mut SwapSpec).as_mut().unwrap() };
|
let swap_spec = unsafe { (swap_spec_ptr as *mut SwapSpec).as_mut().unwrap() };
|
||||||
if let Some(desc) = cfg.swap {
|
if let Some(desc) = cfg.swap {
|
||||||
swap_spec.key.copy_from_slice(&desc.key);
|
swap_spec.key.copy_from_slice(&cfg.swap_hal.as_ref().unwrap().get_swap_key());
|
||||||
swap_spec.pid_count = cfg.init_process_count as u32 + 1;
|
swap_spec.pid_count = cfg.init_process_count as u32 + 1;
|
||||||
swap_spec.rpt_len_bytes = cfg.runtime_page_tracker.len() as u32;
|
swap_spec.rpt_len_bytes = cfg.runtime_page_tracker.len() as u32;
|
||||||
swap_spec.swap_base = desc.ram_offset;
|
swap_spec.swap_base = desc.ram_offset;
|
||||||
|
|
@ -287,6 +287,9 @@ pub fn phase_2(cfg: &mut BootConfig, fs_prehash: &[u8; 64]) {
|
||||||
dest[..rpt_page.len()].copy_from_slice(rpt_page);
|
dest[..rpt_page.len()].copy_from_slice(rpt_page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// map any hardware-specific pages into the userspace swapper
|
||||||
|
crate::platform::userspace_maps(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if VVDBG || SDBG {
|
if VVDBG || SDBG {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue