Hi Stefano, On Sat, Apr 14, 2012 at 11:41 AM, stefano babic <sba...@denx.de> wrote:
> Some considerations about this issue. hopefully I am not OT. The values > put in the configuration file are the default parameters taken by the > mtest command if no parameters are issued. I agree they must not be set > to wrong values (I mean, outside the adressable RAM), but in any case > mtest is not run automatically and the range can be adjusted in the > console. I can always send a "mtest 0x0x10000000 - 0x177fffff" even if a > restricted range is set in the config file, for example as it is set > now for the mx6qsabrelite (64k). Thanks for your and Dirk's explanations. Very helpful! > So I will be for a patch that changes the behavior of mtest and computes > automatically the last testable address if the second parameter is not > given, dropping CONFIG_SYS_MEMTEST_END - I know, this is not part of > your patch, I have already said I can be OT ;-) Something like the patch below? (Build tested only - no hardware handy right now) diff --git a/common/cmd_mem.c b/common/cmd_mem.c index fa6f599..fee1d27 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -40,6 +40,8 @@ #define PRINTF(fmt,args...) #endif +DECLARE_GLOBAL_DATA_PTR; + static int mod_mem(cmd_tbl_t *, int, int, int, char * const []); /* Display values from last command. @@ -662,7 +664,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char if (argc > 2) end = (ulong *)simple_strtoul(argv[2], NULL, 16); else - end = (ulong *)(CONFIG_SYS_MEMTEST_END); + end = (ulong *)(gd->relocaddr -1 ); if (argc > 3) pattern = (ulong)simple_strtoul(argv[3], NULL, 16); (END) _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot