[PATCH 1/2] arm64: Add missing GD_FLG_SKIP_RELOC handling

Marek Vasut marex at denx.de
Fri Oct 15 16:00:25 CEST 2021


On 10/14/21 3:55 AM, Peng Fan (OSS) wrote:
[...]
>> diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
>> index 680e674fa3..28c8356aee 100644
>> --- a/arch/arm/lib/crt0_64.S
>> +++ b/arch/arm/lib/crt0_64.S
>> @@ -104,6 +104,10 @@ ENTRY(_main)
>>       bic    sp, x0, #0xf    /* 16-byte alignment for ABI compliance */
>>       ldr    x18, [x18, #GD_NEW_GD]        /* x18 <- gd->new_gd */
>> +    /* Skip relocation in case gd->gd_flags & GD_FLG_SKIP_RELOC */
>> +    ldr    x0, [x18, #GD_FLAGS]        /* x0 <- gd->flags */
> 
> You are using new_gd, that means bit 11 needs to be set after
> new_gd has been filled with gd.
> 
> I would prefer use gd, not new_gd.

Both gd and newgd have GD_FLG_SKIP_RELOC set very early on, in u-boot 
that's currently done by one board in mach_cpu_init, so that should be 
no problem. Moreover, both gd and newgd flags must be identical as far 
as I can tell.


More information about the U-Boot mailing list