From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] Trying to understand ARM926EJS/start.S
Date: Sat, 30 Oct 2010 23:56:42 +0200 [thread overview]
Message-ID: <4CCC949A.2030208@free.fr> (raw)
In-Reply-To: <20101030192116.77E561522C0@gemini.denx.de>
Le 30/10/2010 21:21, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4CCC69E4.8090103@free.fr> you wrote:
>>
>>> ldr r0, _TEXT_BASE /* r0<- Text base */
>>> %%% why are we using _TEXT_BASE here and not _start?
>>
>> Because we're accessing the relocation tables in the FLASH (or freshly
>> NAND-loaded) "source" copy of u-boot, not in the RAM "target" copy (in
>> which the relocation tables won't exist).
>
> Sorry, but I don't understand this explanation.
>
> With the linker script we make sure that the symbol _start gets linked
> to the absolute address CONFIG_SYS_TEXT_BASE, right? And _TEXT_BASE
> is a storage that holds exactly the value CONFIG_SYS_TEXT_BASE, which
> should be identical to the address of _start ?
Somehow I thought the question was "why use the source location rather
than the target".
Yes, if we're still running from the "source" address at that point, the
value of _start and the content of _TEXT_BASE should be the same -- that
does change once we start the fixup loop, though; after the loop is
done, I think "adr r0, _start" will still give us the source start
address but _TEXT_BASE will contain the target start address -- though
at this time of the evening I'd want to be careful about that.
Tomorrow morning I'll run a step-by-step case on my ED Mini V2 and on my
OpenRD and see if / where we can use "adr rX, _start".
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-10-30 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 18:09 [U-Boot] Trying to understand ARM926EJS/start.S Reinhard Meyer
2010-10-30 18:54 ` Albert ARIBAUD
2010-10-30 19:21 ` Wolfgang Denk
2010-10-30 21:56 ` Albert ARIBAUD [this message]
2010-10-30 22:02 ` Albert ARIBAUD
2010-10-30 19:23 ` Reinhard Meyer
2010-10-30 19:30 ` Reinhard Meyer
2010-10-30 20:12 ` Wolfgang Denk
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=4CCC949A.2030208@free.fr \
--to=albert.aribaud@free.fr \
--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