quick memory test increasing by power-2 each time shows all 32 mbytes of
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 28 Mar 2022 14:16:45 +0000 (15:16 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 28 Mar 2022 14:16:45 +0000 (15:16 +0100)
hyperram ICs are accessible

coldboot/coldboot.c

index 8000d0540e6356a835a506538e87b5989f16562d..16b7780fdf778257dea49e9e4d75d11ec88fb3e9 100644 (file)
@@ -77,9 +77,11 @@ int main(void) {
         if (c == 13) { // if CR send LF
 
             // quick write/read
-            writel(0xDEAF0123+i, (unsigned long)&(hyperram[0]));
-            tmp = readl((unsigned long)&(hyperram[0]));
+            writel(0xDEAF0123+i, (unsigned long)&(hyperram[1<<i]));
+            tmp = readl((unsigned long)&(hyperram[1<<i]));
             puts("read ");
+            uart_writeuint32(1<<i);
+            puts(" ");
             uart_writeuint32(tmp);
             putchar(10);
             i++;