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

Reinhard Meyer u-boot at emk-elektronik.de
Wed Oct 6 11:48:32 CEST 2010


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



More information about the U-Boot mailing list