File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 7
7
#include <generated/sdram_phy.h>
8
8
#include <generated/mem.h>
9
9
#include <hw/flags.h>
10
+ #include <system.h>
10
11
11
12
#include "sdram.h"
12
13
@@ -460,6 +461,8 @@ int memtest_silent(void)
460
461
array [i ] = ONEZERO ;
461
462
}
462
463
error_cnt = 0 ;
464
+ flush_cpu_dcache ();
465
+ flush_l2_cache ();
463
466
for (i = 0 ;i < 128 ;i ++ ) {
464
467
if (array [i ] != ONEZERO )
465
468
error_cnt ++ ;
@@ -469,6 +472,8 @@ int memtest_silent(void)
469
472
array [i ] = ZEROONE ;
470
473
}
471
474
error_cnt = 0 ;
475
+ flush_cpu_dcache ();
476
+ flush_l2_cache ();
472
477
for (i = 0 ;i < 128 ;i ++ ) {
473
478
if (array [i ] != ZEROONE )
474
479
error_cnt ++ ;
@@ -483,6 +488,8 @@ int memtest_silent(void)
483
488
484
489
seed_32 = 0 ;
485
490
error_cnt = 0 ;
491
+ flush_cpu_dcache ();
492
+ flush_l2_cache ();
486
493
for (i = 0 ;i < TEST_DATA_SIZE /4 ;i ++ ) {
487
494
seed_32 = seed_to_data_32 (seed_32 , TEST_DATA_RANDOM );
488
495
if (array [i ] != seed_32 )
@@ -498,6 +505,8 @@ int memtest_silent(void)
498
505
499
506
seed_16 = 0 ;
500
507
error_cnt = 0 ;
508
+ flush_cpu_dcache ();
509
+ flush_l2_cache ();
501
510
for (i = 0 ;i < TEST_ADDR_SIZE /4 ;i ++ ) {
502
511
seed_16 = seed_to_data_16 (seed_16 , TEST_ADDR_RANDOM );
503
512
if (array [(unsigned int ) seed_16 ] != i )
You can’t perform that action at this time.
0 commit comments