From: Joel Stanley Date: Wed, 10 Jun 2020 01:09:16 +0000 (+0930) Subject: microwatt: Add icache flush X-Git-Tag: 24jan2021_ls180~191^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68d2aa45fa90d3f3809e762ae575411d626bef1d;p=litex.git microwatt: Add icache flush --- diff --git a/litex/soc/cores/cpu/microwatt/system.h b/litex/soc/cores/cpu/microwatt/system.h index 941dc564..c8c4e41c 100644 --- a/litex/soc/cores/cpu/microwatt/system.h +++ b/litex/soc/cores/cpu/microwatt/system.h @@ -5,8 +5,11 @@ extern "C" { #endif -__attribute__((unused)) static void flush_cpu_icache(void){}; /* FIXME: do something useful here! */ -__attribute__((unused)) static void flush_cpu_dcache(void){}; /* FIXME: do something useful here! */ +static inline void flush_cpu_icache(void) +{ + __asm__ volatile ("icbi 0,0; isync" : : : "memory"); +} +static inline void flush_cpu_dcache(void){}; /* FIXME: do something useful here! */ void flush_l2_cache(void); void busy_wait(unsigned int ms);