Date: Tue, 11 Apr 2006 04:43:26 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94969 for review Message-ID: <200604110443.k3B4hQce075585@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94969 Change 94969 by imp@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604110443.k3B4hQce075585>