2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

kernel: flush cache before mod_init

This could be necessary as redirecting instructions from D$ directly to I$ as it seems.
Related: https://github.com/SpinalHDL/VexRiscv/issues/137
This commit is contained in:
occheung 2021-09-10 11:07:51 +08:00
parent d50e24acb1
commit b091d8cb66

View File

@ -498,6 +498,9 @@ pub unsafe fn main() {
ptr::write_bytes(__bss_start as *mut u8, 0, (_end - __bss_start) as usize);
board_misoc::cache::flush_cpu_dcache();
board_misoc::cache::flush_cpu_icache();
(mem::transmute::<u32, fn()>(__modinit__))();
if let Some(typeinfo) = typeinfo {