Hello Dave, On Fri, 14 Nov 2014 07:18:58 -0700 (MST), DaveKucharczyk <david.kucharc...@gmail.com> wrote: > Hi Albert, > Thanks for the great information. > > Albert ARIBAUD (U-Boot) wrote > > 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. > > If I set CONFIG_SYS_TEXT_BASE to a low address then I can't run a memory > test starting at the lowest address because that's where the U-Boot code > will be.
No, that's not where it'll be; it'll relocate as high as it can. > I think the best thing would be to run a memory test on the full 2GB before > relocation happens. Is that possible? Not with U-Boot in DDR. :) > Albert ARIBAUD (U-Boot) wrote > > How do you know the lowest address used by your stack during your memory > > test? > > I know the address of the stack pointer from DEBUG message... So you know it *at a given time*, but you have no assurance that it won't go further down. > I erroneously thought that was the beginning of the stack. The stack expands > down form that address, but how much? I don't see a global data stack size > variable. There is none physically, i.e. that's just the size you reserve for it, but it could grow beyond that, although it's not likely. Still, that means you don't test all DDR. > Before, we have #define CONFIG_STACKSIZE (128 * 1024) set in the header > file. > > Basically what is the best way to run the memory test? If I can run it > before relocation then it would make things very simple. If you happen to have an SPL running from some RAM and not from DDR, then you could perform the full DDR test there. Amicalement, -- Albert. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot