From: Zhong Hongbo <bocui107@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v3] arm: Fixed the offset for the no relocation.
Date: Tue, 04 Sep 2012 22:03:07 +0800 [thread overview]
Message-ID: <50460A1B.9040102@gmail.com> (raw)
In-Reply-To: <201209030214.32639.marek.vasut@gmail.com>
On 03/09/12 08:14, Marek Vasut wrote:
> Dear Zhong Hongbo,
>
>> From: Zhong Hongbo <bocui107@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@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
>
next prev parent reply other threads:[~2012-09-04 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 6:49 [U-Boot] [v3] arm: Fixed the offset for the no relocation Zhong Hongbo
2012-09-02 6:52 ` Zhong Hongbo
2012-09-03 0:14 ` Marek Vasut
2012-09-04 14:03 ` Zhong Hongbo [this message]
2012-09-04 15:57 ` Stefano Babic
2012-09-05 14:45 ` Zhong Hongbo
2012-09-05 19:22 ` Stefano Babic
2012-09-06 15:36 ` Zhong Hongbo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50460A1B.9040102@gmail.com \
--to=bocui107@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox