aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ramtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ramtest.c')
-rw-r--r--src/lib/ramtest.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c
index 3457210735..e9173fa7e6 100644
--- a/src/lib/ramtest.c
+++ b/src/lib/ramtest.c
@@ -223,6 +223,31 @@ int ram_check_nodie(unsigned long start, unsigned long stop)
return ret;
}
+int ram_check_noprint_nodie(unsigned long start, unsigned long stop)
+{
+ unsigned long addr, value, value2;
+ unsigned short int idx;
+ unsigned char failed, failures;
+
+ for (idx=0; idx<0x400; idx+=4) {
+ test_pattern(idx, &addr, &value);
+ write_phys(start + addr, value);
+ }
+
+ /* Make sure we don't read before we wrote */
+ phys_memory_barrier();
+
+ failures = 0;
+ for (idx=0; idx<0x400; idx+=4) {
+ test_pattern(idx, &addr, &value);
+ value2 = read_phys(start + addr);
+
+ failed = (value2 != value);
+ failures |= failed;
+ }
+ return failures;
+}
+
void quick_ram_check(void)
{
int fail = 0;