[U-Boot] [PATCH] futile c relocation attempt

Graeme Russ graeme.russ at gmail.com
Wed Oct 6 11:43:16 CEST 2010


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


More information about the U-Boot mailing list