public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] futile c relocation attempt
Date: Wed, 06 Oct 2010 20:43:16 +1100	[thread overview]
Message-ID: <4CAC44B4.800@gmail.com> (raw)
In-Reply-To: <1286290132-2935-1-git-send-email-u-boot@emk-elektronik.de>

On 06/10/10 01:48, Reinhard Meyer wrote:
> ---
>  arch/arm/cpu/arm926ejs/start.S |    8 ++++-
>  arch/arm/lib/board.c           |   57 +++++++++++++++++++++++++++++++++++++++-
>  include/configs/top9000_9xe.h  |    1 +
>  3 files changed, 63 insertions(+), 3 deletions(-)
> 

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.

Maybe some memory barriers are needed to stop the C optimiser mangling things?

I am sure what you have is very close to the real solution :)

I do think the main relocation fixup loop can be moved into a common
library in which case we can add additional case statements. The nice thing
is that x86 as all Type 8 which is specifically allocated to x86 so my "if
> TEXT_BASE" checks can be kept. For size freaks, we could litter the code
with #ifdefs to remove un-needed cases ;)

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

Regards,

Graeme

  parent reply	other threads:[~2010-10-06  9:43 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 [this message]
2010-10-06  9:48   ` Reinhard Meyer
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=4CAC44B4.800@gmail.com \
    --to=graeme.russ@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