mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
make swap resume-compatible
This commit is contained in:
parent
6bef111bf2
commit
9101abf2c4
2 changed files with 4 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ log-server = { package = "xous-api-log", version = "0.1.56" }
|
||||||
xous = "0.9.60"
|
xous = "0.9.60"
|
||||||
xous-ipc = "0.9.60"
|
xous-ipc = "0.9.60"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
|
loader = { path = "../../loader", default-features = false }
|
||||||
|
|
||||||
num-derive = { version = "0.3.3", default-features = false }
|
num-derive = { version = "0.3.3", default-features = false }
|
||||||
num-traits = { version = "0.2.14", default-features = false }
|
num-traits = { version = "0.2.14", default-features = false }
|
||||||
|
|
@ -30,7 +31,7 @@ utralib = { version = "0.1.24", optional = true, default-features = false }
|
||||||
precursor = ["utralib/precursor"]
|
precursor = ["utralib/precursor"]
|
||||||
hosted = ["utralib/hosted"]
|
hosted = ["utralib/hosted"]
|
||||||
renode = ["utralib/renode"]
|
renode = ["utralib/renode"]
|
||||||
swap = []
|
swap = ["loader/swap"]
|
||||||
sus_reboot = [
|
sus_reboot = [
|
||||||
] # when selected, suspend triggers an immediate reboot instead of suspend. For testing only.
|
] # when selected, suspend triggers an immediate reboot instead of suspend. For testing only.
|
||||||
debugprint = []
|
debugprint = []
|
||||||
|
|
|
||||||
|
|
@ -146,9 +146,7 @@ mod implementation {
|
||||||
// note that mapping a page zeroes it out. Plus, this should have been zero'd by the bootloader.
|
// note that mapping a page zeroes it out. Plus, this should have been zero'd by the bootloader.
|
||||||
#[cfg(not(feature = "swap"))]
|
#[cfg(not(feature = "swap"))]
|
||||||
let marker = xous::syscall::map_memory(
|
let marker = xous::syscall::map_memory(
|
||||||
xous::MemoryAddress::new(0x4100_0000 - 0x3000), /* this is a special, hard-coded location;
|
xous::MemoryAddress::new(0x4100_0000 - loader::GUARD_MEMORY_BYTES), // TODO: fix hard-coding of top of RAM
|
||||||
* 0x2000 is the size of the bootloader's
|
|
||||||
* stack area */
|
|
||||||
None,
|
None,
|
||||||
4096,
|
4096,
|
||||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||||
|
|
@ -156,7 +154,7 @@ mod implementation {
|
||||||
.expect("couldn't map clean suspend page");
|
.expect("couldn't map clean suspend page");
|
||||||
#[cfg(feature = "swap")]
|
#[cfg(feature = "swap")]
|
||||||
let marker = xous::syscall::map_memory(
|
let marker = xous::syscall::map_memory(
|
||||||
None, // map a dummy page -- we need this process for the preemption timer
|
xous::MemoryAddress::new(0x4080_0000 - loader::GUARD_MEMORY_BYTES), // TODO: fix hard-coding of top of RAM
|
||||||
None,
|
None,
|
||||||
4096,
|
4096,
|
||||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue