From: Abraham vd M. <ab...@us...> - 2002-02-05 13:40:51
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv15305/src/blob Modified Files: chkmem.c Log Message: Added a printf()-like function for printing to the serial port. Also some minor code cleanup in the memory checking routines. Index: chkmem.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/chkmem.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- chkmem.c 2001/10/29 11:49:48 1.6 +++ chkmem.c 2002/02/05 13:40:46 1.7 @@ -57,7 +57,7 @@ /* more readable IMHO */ #define MEM( x ) (*((u32 *)x)) -#define MAKE32FROM8(X) (u32) (X | X << 8 | X << 16 | X << 24) +#define MAKE32FROM8(x) (u32) ((x) | ((x) << 8) | ((x) << 16) | ((x) << 24)) #define CHKMEM_ERR (-1) #define CHKMEM_OK (0) @@ -75,7 +75,7 @@ # define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); #endif -#define SKIPBLOBMEM( STARTADR ) while ( STARTADR < (BLOB_RAM_BASE + 0x00100000) ) STARTADR++; +#define SKIPBLOBMEM(x) if ((x) < BLOB_RAM_BASE + 0x00100000) x = BLOB_RAM_BASE + 0x00100000 #define CHKMEM_MAXERR 64 #define CHKMEM_PUSHERR( ADR ) { chkmem_errlist[ chkmem_errs % CHKMEM_MAXERR ] = ADR; \ @@ -222,7 +222,8 @@ return CHKMEM_OK; } -static char chkmemhelp[] = "chkmem [method] {verbosity:1..F} {repeat-count}\nmethod=0: move-inverse test\n" +static char chkmemhelp[] = "chkmem [method] {verbosity:1..F} {repeat-count}\n" +"method=0: move-inverse test\n" "method=1: address test\n" "method=2: hardcore test\n" "verbosity: display every 2^n address during test\n"; |