[U-Boot] ARM relocation, probably trivial mistake

Reinhard Meyer u-boot at emk-elektronik.de
Fri Oct 1 08:39:26 CEST 2010


Dear Heiko Schocher,

>>>> In message<4CA4AEFF.3050101 at denx.de>   you wrote:
>>>>> If TEXT_BASE == relocation address it could be defined,
>>>>> never tested.

If I think right, relocation address would vary with u-boot size,
so there seems no really reliable way to ensure above "if" is true.
Even worse, when it happens to become untrue because the size
changed, it will try to relocate overlapping areas.

>> Actually CONFIG_SKIP_RELICATE_UBOOT should become unneeded once all
>> boards which use it are made to support relocation, as the code will
>> always check if it runs at its intended location and relocate only if
>> needed.

"intended location" == "relocation address based on ram size" ??

> If u-boot starts in RAM, then it is the task from the preloader
> where it copies u-boot code, and if there is somewhere in IRAM
> enough room for it, this would be an option. Otherwise it is a
> problem if relocation results in overlapping source and destination
> areas ... but you will fast detect this problem, when you see,
> that u-boot no longer works ;-)

I think it would be safe that a preloader loads u-boot to the very
bottom of SDRAM. If the SDRAM is not at least double the size of
u-boot, u-boot needs a diet ;)

Reinhard


More information about the U-Boot mailing list