
On Mon, Jul 02, 2007 at 07:46:38PM -0600, Grant Likely wrote:
On 7/2/07, Sascha Hauer s.hauer@pengutronix.de wrote:
On Tue, Jul 03, 2007 at 01:39:29AM +0200, Wolfgang Denk wrote:
Do you mean you don't relocate the code any more?
It still gets copied from the address U-Boot starts (Flash) to RAM, but pointer offsets are not recalculated. This means that you must not use statically initialized pointers during startup since the code is not running at its link address.
And this is a bug. Statically initialized pointers are supposed to be fixed up during relocation. I've got a big patch set which I'll be posting this evening (and would have already posted if I wasn't having SMTP problems) that solves this for 5xx, 5xxx, 82xx & 83xx.
If you do not use statically initialized pointer on startup and running at the link address after startup, you do not need to fixup anything.
I think the intent of relocation is that the u-boot image can always put itself at the end of SDRAM, regardless of how much ram is on the board. Not important for ports that have soldered down chips, but useful if the board has expandable memory.
When you can make use of this additional memory, ok. But I think on U-Boot this is hardly the case.
Regards, Sascha