[U-Boot] [RFC PATCH] arm: provide a CONFIG flag for disabling relocation

Albert ARIBAUD albert.u.boot at aribaud.net
Wed Sep 21 14:03:09 CEST 2011


Le 21/09/2011 13:20, Andreas Bießmann a écrit :
> Dear "GROYER, Anthony",
> Dear Albert,
>
> Am Mi 21 Sep 2011 12:51:33 CEST schrieb Albert ARIBAUD:
>> Le 21/09/2011 11:29, GROYER, Anthony a écrit :
>>
>
> <snip>
>
>> 3) replace use of r9-r10 with e.g. r10-r11 in the copy loop, to preserve
>> r9 during relocation.
>
> If one is changing this place I would like to discuss another point here.
> In my last changeset for relocation I found some implementation in
> a/a/c/pxa/start.S which do save the register to stack before copy_loop,
> use almost all registers (only r8 is not used which is gd_t for arm, but
> I think it could be used here too cause it is saved on the stack) and
> save the registers back later on.
> I guess this could fasten the copy_loop a bit but needs to be proven.
> Anthony, if you change all start.S could you consider this also?

I am not 100% sure I get your point, but I assume that you are asking 
for *removal* of the saving and restoring, right? I would tend to agree 
that saving and restoring registers in relocate_code is moot, as this 
function does not return in the usual sense.

As for r8, it should be preserved as it points to gd, but that is 
ensured by the C code already IIRC.

> best regards
>
> Andreas Bießmann

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list