PERFORCE change 94969 for review
Warner Losh
imp at FreeBSD.org
Tue Apr 11 04:43:27 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94969
Change 94969 by imp at imp_hammer on 2006/04/11 04:43:14
Write a stupid memory test. It is so stupid that I would have
thought it impossible to fail. Our current board, alas, fails.
The KB9202 board doesn't.
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/kb920x/boot0/main.c#7 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/kb920x/boot0/main.c#7 (text+ko) ====
@@ -23,19 +23,40 @@
*/
#include "AT91RM9200.h"
-#include "at91rm9200_lowlevel.h"
+#include "lib.h"
typedef void fn_t(void);
int
main(void)
{
+#if 0
char *addr = (char *)0x20000000 + (1 << 20); /* Load to base + 1MB */
fn_t *fn = (fn_t *)addr;
- AT91C_BASE_PIOC->PIO_SODR = AT91C_PIO_PC10;
- xmodem_rx(addr);
+// AT91C_BASE_PIOC->PIO_SODR = AT91C_PIO_PC10;
+ while (xmodem_rx(addr) == -1)
+ continue;
+// AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10;
+ fn();
+#else
+ int *addr = (int *)0x20000000; /* Load to base + 1MB */
+ int i;
+
+ while (1) {
+ int sec = GetSeconds();
+ while (sec == GetSeconds())
+ continue;
+ putc('A');
+ for (i = 0; i < 1024; i++)
+ addr[i] = i * 2;
+ for (i = 0; i < 1024; i++)
+ if (addr[i] != i * 2) {
+ putc('N');
+ break;
+ }
+ }
AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10;
- fn();
+#endif
return (1);
}
More information about the p4-projects
mailing list