From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] futile c relocation attempt
Date: Wed, 06 Oct 2010 11:48:32 +0200 [thread overview]
Message-ID: <4CAC45F0.3040805@emk-elektronik.de> (raw)
In-Reply-To: <4CAC44B4.800@gmail.com>
Dear Graeme Russ,
> I had a quick look at this and nothing is jumping out at me. Of course I am
> not familiar with ARM asm...
>
> I don't see any reason why this ultimately will not work eventually. You
> may be having some issues with the transition from asm->C->asm through the
> relocation - This was an especially painful thing for me involving an
> intermediate trampoline which I have only recently figured out how to remove.
I think the relocation itself works fine, when looking at the debug output.
> Maybe some memory barriers are needed to stop the C optimiser mangling things?
It can't really optimize across the call to the (now wrongly named) reloc_code in
assembly.
> Interestingly, ARM is adding gd->reloc_off while x86 is subtracting
> gd->reloc_off. If this is correct, I need to change the calculation of
> gd_reloc_off to be consistent
It should always ADD it, when it is calculated as "Final Location" - "Current Location".
Note, of course, that the value itself might well be negative.
If, for example, the NOR Flash is at a higher address than RAM...
Best Regards
Reinhard
next prev parent reply other threads:[~2010-10-06 9:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 14:48 [U-Boot] [PATCH] futile c relocation attempt Reinhard Meyer
2010-10-05 13:30 ` Reinhard Meyer
2010-10-05 16:30 ` Albert ARIBAUD
2010-10-05 17:41 ` Reinhard Meyer
2010-10-05 19:29 ` Albert ARIBAUD
2010-10-06 9:43 ` Graeme Russ
2010-10-06 9:48 ` Reinhard Meyer [this message]
2010-10-06 10:20 ` Graeme Russ
2010-10-06 14:50 ` J. William Campbell
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=4CAC45F0.3040805@emk-elektronik.de \
--to=u-boot@emk-elektronik.de \
--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