adjust L2 cache flush region to 512k

although te cache is only 128k, experiments show that the cache
is not reliably flushed until 512k is written. Not sure why...
This commit is contained in:
bunnie 2021-08-29 18:28:25 +08:00
parent 4c05ee2fe6
commit dbab3d2b27
2 changed files with 4 additions and 1 deletions

View file

@ -242,9 +242,12 @@ mod implementation {
}
pub fn resume(&mut self) {
self.power_susres.resume();
// reset these to "on" in case the "off" value was captured and stored on suspend
// (these "should" be redundant)
self.power_csr.rmwf(utra::power::POWER_SELF, 1);
self.power_csr.rmwf(utra::power::POWER_STATE, 1);
self.event_susres.resume();
self.gpio_susres.resume();
// restore the UART mux setting after resume

View file

@ -225,7 +225,7 @@ mod implementation {
xous::syscall::map_memory(
None,
None,
256 * 1024, // bigger than 128k to flush the L1 dcache etc. as well
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??
xous::MemoryFlags::R | xous::MemoryFlags::W | xous::MemoryFlags::RESERVE,
).expect("couldn't allocate RAM for cache flushing")
);