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

Albert ARIBAUD albert.aribaud at free.fr
Thu Dec 16 10:58:17 CET 2010


Le 16/12/2010 10:18, Jason Liu a écrit :
> 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.

This layout is not that of u-boot for ARM; the fix thus corrects a fault 
not inherent to u-boot but introduced by inserting this "plug-in" where 
it should not be.

Why must you modify the original layout?

Also, what is this 'plug-in' if it is not an IPL?

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list