mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add notes about making the cache flush loop more efficient on suspend
This commit is contained in:
parent
ce02d9ff50
commit
6418f8b54f
2 changed files with 9 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "xous-susres"
|
name = "xous-susres"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
authors = ["bunnie <bunnie@kosagi.com>"]
|
authors = ["bunnie <bunnie@kosagi.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Manager of suspend/resume operations implementation"
|
description = "Manager of suspend/resume operations implementation"
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,14 @@ mod implementation {
|
||||||
xous::syscall::map_memory(
|
xous::syscall::map_memory(
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
512 * 1024, // L2 cache is 128k, but emperically it doesn't fully flush until 512k is written. Maybe has to do with write-back behavior??
|
// L2 cache is 128k, but it takes 512k to flush it, because the L1 D$ has 4 ways
|
||||||
|
// If for some reason we can't allocate 512k we can re-write this to use
|
||||||
|
// unsafe { core::arch::asm!(".word 0x500F"); }
|
||||||
|
// to flush the L1 cache after every 4k of data written (one way size)
|
||||||
|
// however, the memory is de-allocated on resume, so this isn't
|
||||||
|
// a permanent penalty to pay, and changing this could would require
|
||||||
|
// a validation cycle that I don't want to go through right now.
|
||||||
|
512 * 1024,
|
||||||
xous::MemoryFlags::R | xous::MemoryFlags::W | xous::MemoryFlags::RESERVE,
|
xous::MemoryFlags::R | xous::MemoryFlags::W | xous::MemoryFlags::RESERVE,
|
||||||
).expect("couldn't allocate RAM for cache flushing")
|
).expect("couldn't allocate RAM for cache flushing")
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue