mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
create the SwapSpec structure and mappings
This commit is contained in:
parent
cd43157d1e
commit
67685db741
1 changed files with 23 additions and 0 deletions
|
|
@ -39,3 +39,26 @@ pub struct RawPage {
|
|||
}
|
||||
|
||||
pub const SWAP_PT_VADDR: usize = 0xE000_0000;
|
||||
// E000_0000 - E100_0000 => 16 MiB of vaddr space for page tables; should be more than enough
|
||||
pub const SWAP_CFG_VADDR: usize = 0xE100_0000;
|
||||
pub const SWAP_RPT_VADDR: usize = 0xE100_1000;
|
||||
|
||||
/// Structure passed by the loader into this process at SWAP_RPT_VADDR
|
||||
#[cfg(feature = "swap")]
|
||||
#[repr(C)]
|
||||
pub struct SwapSpec {
|
||||
pub key: [u8; 32],
|
||||
/// Count of PIDs in the system. Could be a u8, but, make it a u32 because we have
|
||||
/// the space and word alignment is good for stuff being tossed through unsafe pointers.
|
||||
pub pid_count: u32,
|
||||
pub rpt_len_bytes: u32,
|
||||
/// Base address of swap memory. If swap is memory-mapped, this is a virtual address.
|
||||
/// If swap is device-mapped, it's the physical offset in the device.
|
||||
pub swap_base: u32,
|
||||
/// Length of swap region in bytes
|
||||
pub swap_len: u32,
|
||||
/// Base of the message authentication code (MAC) region
|
||||
pub mac_base: u32,
|
||||
/// LENGTH of the MAC region in bytes
|
||||
pub mac_len: u32,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue