mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
xous: add cache_flush() call
This call is designed to flush the CPU caches by calling the `FENCE` instruction. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
c662ca7fdd
commit
6f77ab8344
7 changed files with 13 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -379,3 +379,11 @@ pub fn wait_process(_joiner: ProcessHandle) -> crate::SysCallResult {
|
||||||
crate::wait_event();
|
crate::wait_event();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
fn riscv_cache_flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn cache_flush() {
|
||||||
|
unsafe { riscv_cache_flush() };
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,3 +98,8 @@ vex_aes_dec_id_last_2:
|
||||||
vex_aes_dec_id_last_3:
|
vex_aes_dec_id_last_3:
|
||||||
.word 0x36b5050b // vex_aes_dec_id_last a0, a1, a0, #3
|
.word 0x36b5050b // vex_aes_dec_id_last a0, a1, a0, #3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.global riscv_cache_flush
|
||||||
|
riscv_cache_flush:
|
||||||
|
fence
|
||||||
|
ret
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue