From: Florent Kermarrec Date: Tue, 23 Jun 2015 07:01:34 +0000 (+0200) Subject: software/bios/sdram: flush dcache and l2 in memtest (otherwise we are partially testi... X-Git-Tag: 24jan2021_ls180~2223 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=351e654e9d03d15a4820bd84b604d8e8bfae5978;p=litex.git software/bios/sdram: flush dcache and l2 in memtest (otherwise we are partially testing the cache) --- diff --git a/software/bios/sdram.c b/software/bios/sdram.c index b8c7262e..08f0162c 100644 --- a/software/bios/sdram.c +++ b/software/bios/sdram.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "sdram.h" @@ -460,6 +461,8 @@ int memtest_silent(void) array[i] = ONEZERO; } error_cnt = 0; + flush_cpu_dcache(); + flush_l2_cache(); for(i=0;i<128;i++) { if(array[i] != ONEZERO) error_cnt++; @@ -469,6 +472,8 @@ int memtest_silent(void) array[i] = ZEROONE; } error_cnt = 0; + flush_cpu_dcache(); + flush_l2_cache(); for(i=0;i<128;i++) { if(array[i] != ZEROONE) error_cnt++; @@ -483,6 +488,8 @@ int memtest_silent(void) seed_32 = 0; error_cnt = 0; + flush_cpu_dcache(); + flush_l2_cache(); for(i=0;i