[U-Boot] [PATCH] mx6qsabresd: Add basic support

stefano babic sbabic at denx.de
Sat Apr 14 18:00:59 CEST 2012


Am 14/04/2012 17:28, schrieb Fabio Estevam:
> On Sat, Apr 14, 2012 at 12:24 PM, Fabio Estevam <festevam at gmail.com> wrote:
> 
>> Something like the patch below? (Build tested only - no hardware handy
>> right now)
> 
> Sorry, I meant the patch below:
> 
> --- 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.
> @@ -656,8 +658,10 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, cha
> 
>         if (argc > 1)
>                 start = (ulong *)simple_strtoul(argv[1], NULL, 16);
> -       else
> +       else {
>                 start = (ulong *)CONFIG_SYS_MEMTEST_START;
> +               end = (ulong *)(gd->relocaddr -1 );

Something like this, but not exactly this. After sending my answer I
remembered that the stack is *before* u-boot code, and not after as I
wrote - using gd->relocaddr is wrong. We should subtract the memory
reserve for stack and heap from this value.

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list