From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano babic Date: Sat, 14 Apr 2012 18:00:59 +0200 Subject: [U-Boot] [PATCH] mx6qsabresd: Add basic support In-Reply-To: References: <1334158122-15219-1-git-send-email-festevam@gmail.com> <20120411194925.26CEC200239@gemini.denx.de> <20120411213625.3572A200239@gemini.denx.de> <4F8850CF.1010201@googlemail.com> <4F898CA5.8070308@denx.de> Message-ID: <4F899F3B.2080103@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 14/04/2012 17:28, schrieb Fabio Estevam: > On Sat, Apr 14, 2012 at 12:24 PM, Fabio Estevam 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 =====================================================================