[U-Boot] [v3] arm: Fixed the offset for the no relocation.
Zhong Hongbo
bocui107 at gmail.com
Tue Sep 4 16:03:07 CEST 2012
On 03/09/12 08:14, Marek Vasut wrote:
> Dear Zhong Hongbo,
>
>> From: Zhong Hongbo <bocui107 at gmail.com>
>>
>> When the u-boot address of destination equal to __start,
>> no relocation. relocation offset(r9) = 0.
>
> Good, now what kind of issue does this patch fix?
Hi Marek
When you adopt CONFIG_SPL_BUILD framework, no CONFIG_NAND_SPL, if the
addr of destination is equal to _start, we should skip u-boot relocation.
In the last, u-boot will count the dest addr, see the below:
adr r1, _start
add lr, r0, r1
add lr, lr, r9
Here, lr = lr + r9, r9 is the offset of u-boot, So when it do not neet
to reolocat, we need to set the zero value for r9 register.
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r6 /* dest_addr */
/* jump to it ... */
mov pc, lr
Thanks,
hongbo
>
>> Signed-off-by: Zhong Hongbo <bocui107 at gmail.com>
>> ---
>> Change for V3:
>> - Drop the change of arm720t, It has already merge the change.
>> Change for V2:
>> - Clean a line for arm1176.
>
> [...]
>
> Best regards,
> Marek Vasut
>
More information about the U-Boot
mailing list