Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5acb8043bf | |||
| a9c5c8de57 |
@@ -88,3 +88,10 @@ pub fn disable() {
|
||||
let mut l2c_mmio = unsafe { zynq7000::l2_cache::Registers::new_mmio_fixed() };
|
||||
l2c_mmio.write_control(Control::new_disabled());
|
||||
}
|
||||
|
||||
/// 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