harmonize cache_flush in hal and also add rram module

This commit is contained in:
bunnie 2025-08-05 23:00:09 +08:00
parent 39beaba65f
commit da623ccd01

View file

@ -30,3 +30,21 @@ pub mod usb;
pub use shared_csr::*;
#[cfg(not(feature = "hosted-baosec"))]
pub mod mbox;
#[cfg(not(feature = "hosted-baosec"))]
pub mod rram;
#[inline(always)]
pub fn cache_flush() {
unsafe {
// cache flush
#[rustfmt::skip]
core::arch::asm!(
"fence.i",
".word 0x500F",
"nop",
"nop",
"nop",
"nop",
);
}
}