Index: common/cmd_mem.c =================================================================== RCS file: /home/cvsroot/Projects/u-boot/common/cmd_mem.c,v retrieving revision 1.1.1.1 diff -p -u -r1.1.1.1 cmd_mem.c --- common/cmd_mem.c 28 Jun 2005 17:32:26 -0000 1.1.1.1 +++ common/cmd_mem.c 13 Sep 2005 10:40:26 -0000 @@ -707,7 +707,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int #if defined(CFG_MEMTEST_SCRATCH) vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH; #else - vu_long *dummy = NULL; + vu_long *dummy; #endif int j; int iterations = 1; @@ -747,7 +747,17 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int } #if defined(CFG_ALT_MEMTEST) + +#if !defined(CFG_MEMTEST_SCRATCH) + /* if no fixed scratch area is defined use + * the last location of the test area + */ + end--; + dummy = end; +#endif + printf ("Testing %08x ... %08x:\n", (uint)start, (uint)end); + printf ("using address %08x as scratch\n",dummy); PRINTF("%s:%d: start 0x%p end 0x%p\n", __FUNCTION__, __LINE__, start, end);