[U-Boot] [PATCH] Added optional iteration limit for alternative memory test.
Wolfgang Denk
wd at denx.de
Sun Dec 14 11:22:50 CET 2008
Dear Dirk Eibach,
In message <1227791865-8843-1-git-send-email-eibach at gdsys.de> you wrote:
> We want to use mtest for production memory test. I implemented
> an iteration limit, so expect can parse the results.
mtest is definitely NOT a good enough memory test for any production
tests. You should rather use the much stronger POST memory tests (see
post/drivers/memory.c).
> The iteration limit is passed to mtest as a fourth parameter:
> [start [end [pattern [iterations]]]]
> If no fourth parameter is supplied, there is no iteration limit and the
> test will loop forever.
If you want to add this feature, then please do so for both
configuratione (with and without CONFIG_SYS_ALT_MEMTEST selected).
> #if defined(CONFIG_SYS_ALT_MEMTEST)
> + if (argc > 4) {
> + iteration_limit = (ulong)simple_strtoul(argv[4], NULL, 16);
> + } else {
> + iteration_limit = 0;
> + }
> +
This can then be moved up intot he generic part.
> U_BOOT_CMD(
> +#ifdef CONFIG_SYS_ALT_MEMTEST
> + mtest, 5, 1, do_mem_mtest,
> + "mtest - simple RAM test\n",
> + "[start [end [pattern [iterations]]]]\n"
> +#else
> mtest, 4, 1, do_mem_mtest,
> "mtest - simple RAM test\n",
> "[start [end [pattern]]]\n"
> +#endif /* CONFIG_SYS_ALT_MEMTEST */
And this #ifdef can be avoided alltogether.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Do you know the one -- "All I ask is a tall ship, and a star to steer
her by ..." You could feel the wind at your back, about you ... the
sounds of the sea beneath you. And even if you take away the wind and
the water, it's still the same. The ship is yours ... you can feel
her ... and the stars are still there.
-- Kirk, "The Ultimate Computer", stardate 4729.4
More information about the U-Boot
mailing list