function to invalidate l2cache
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user