[U-Boot] [PATCH 1/1] armv7: start.S: Fix relocation address caculation

Jason Liu liu.h.jason at gmail.com
Thu Dec 16 10:18:52 CET 2010


Hi, Albert,

2010/12/16 Albert ARIBAUD <albert.aribaud at free.fr>:
> Le 16/12/2010 04:04, Jason Liu a écrit :
>>
>> Hi, Albert,
>>
>> 2010/12/16 Albert ARIBAUD<albert.aribaud at free.fr>:
>>>
>>> Hi Jason,
>>>
>>> Le 15/12/2010 14:57, Jason Liu a écrit :
>>>>
>>>> There will have issue if the _start not equal TEXT_BASE
>>>> when enable relocation.
>>>
>>> In what case does this happen?
>>
>> Some ARM SOC ROM need run the plug-in code first in IRAM and the
>> plugin-in code need appear at the beginning of the u-boot. ROM will
>> check the plugin-in header to do security check and run the plug-in
>> code to init the DDR etc. In this case the _start will be not the same
>> as TEXT_BASE.
>
> I still don't see why u-boot would not end up where specified.
>
> The fact that there is a "plug-in" (I assume it's what I would call an IPL)
> does not change the fact that its payload (u-boot) can and will be loaded
> where specified, i.e. at TEXT_BASE -- and if it is loaded elsewhere, it is
> at a fixed address, so TEXT_BASE can be adjusted) All IPLs that I know of
> put their payload where specified.

It's not an IPL. The layout is that as the following,

---- ----- TEXT_BASE
plug-in
---------- _start

---------- _end

No matter what you adjusted the TEXT_BASE, the _star is not equal to it.

The fix doe not affect the original functionality but just make it
more flexible.

>
>> Thanks for your comments. Cheers,
>
> Amicalement,
> --
> Albert.
>


More information about the U-Boot mailing list