From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 14 Nov 2014 09:20:16 +0100 Subject: [U-Boot] Memory test post relocation In-Reply-To: <1415917160763-196088.post@n7.nabble.com> References: <1415917160763-196088.post@n7.nabble.com> Message-ID: <20141114092016.75296355@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Dave, On Thu, 13 Nov 2014 15:19:20 -0700 (MST), DaveKucharczyk wrote: > We have 2GB?s of RAM starting at 0x70000000 on our Freescale MX53 > based board. > > With old U-Boot we defined TEXT_BASE at the bottom of RAM at > 0x70600000 and CONFIG_SKIP_RELOCATE_UBOOT, presumably so that we can > run memory tests all the way to the top of RAM (this was brought over > from the mx53loco board and precedes me). Why else would > CONFIG_SKIP_RELOCATE_UBOOT be set? CONFIG_SKIP_RELOCATE_UBOOT is not used in U-Boot nowadays [but is still defined by target snapper9260, which means either that target is utterly broken, or it does not actually need the option]. > In new U-Boot we are not skipping relocation. I define > CONFIG_SYS_TEXT_BASE = 0xeff89000 so that relocation offset is > 0x00000000. Baaad, bad. The first time you change something in your code, your relocation offset might change and this will make U-Boot crash and burn in interesting ways. Just define CONFIG_SYS_TEXT_BASE to some low address and let relocation happen. You can find your actual relocation address in the global data structure. > I run with DEBUG on to doublecheck where things get setup? (typically, builds with and without DEBUG will have differing relocation addresses) > I run a memory test from 0x70000000 to 0xefe88cb0, but I get a > mismatch fail at 0xefe88aa4. > > Shouldn?t I be able to run mem test all the way to the stack? I don?t > see anything else being setup under the stack. How do you know the lowest address used by your stack during your memory test? Amicalement, -- Albert.