function to invalidate l2cache
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
ci / Check build (push) Has been cancelled

This commit is contained in:
2026-05-17 12:49:41 +02:00
parent f1312c1b17
commit a9c5c8de57
+7
View File
@@ -81,3 +81,10 @@ pub fn init(
}
l2c_mmio.write_control(Control::new_enabled());
}
/// Function to invalidate l2 cache
pub fn invalidate_all(l2c_mmio: &mut MmioRegisters<'static>) {
l2c_mmio.write_clean_invalidate_by_way(0xffff);
while l2c_mmio.read_cache_sync().busy() {}
compiler_fence(core::sync::atomic::Ordering::SeqCst);
}