> From: Lukas Auer [mailto:lukas.a...@aisec.fraunhofer.de] > Sent: Saturday, October 20, 2018 6:08 AM > To: u-boot@lists.denx.de > Cc: Bin Meng; Lukas Auer; Greentime Hu; Alexander Graf; Rick Jian-Zhi > Chen(陳建志) > Subject: [PATCH 18/30] riscv: invalidate the instruction cache before jumping > to Linux > > Signed-off-by: Lukas Auer <lukas.a...@aisec.fraunhofer.de> > --- > > arch/riscv/lib/bootm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index > a7a9fb921b..bc1d4b2864 100644 > --- a/arch/riscv/lib/bootm.c > +++ b/arch/riscv/lib/bootm.c > @@ -38,6 +38,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], > bootm_headers_t *images) > return 1; > > kernel = (void (*)(ulong, void *))images->ep; > + invalidate_icache_all();
Hi Likas I wull use cleanup_before_linux() which is in cpu.c as below int cleanup_before_linux(void) { disable_interrupts(); /* turn off I/D-cache */ cache_flush(); icache_disable(); dcache_disable(); return 0; } and cache_flush() in cache.c as below void cache_flush(void) { invalidate_icache_all(); flush_dcache_all(); } Rick > > bootstage_mark(BOOTSTAGE_ID_RUN_OS); > > -- > 2.17.2 > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot