[U-Boot] [PATCH v2 5/6] ARMv8: Setup PSCI memory and dt

Hongbo Zhang macro.wave.z at gmail.com
Thu Nov 3 11:20:35 CET 2016


On Wed, Nov 2, 2016 at 10:27 PM, Tom Rini <trini at konsulko.com> wrote:
> On Tue, Nov 01, 2016 at 06:04:31PM +0800, macro.wave.z at gmail.com wrote:
>> From: Hongbo Zhang <hongbo.zhang at nxp.com>
>>
>> Newly add ARMv8 PSCI needs to be initialized, be copied or reserved in right
>> place, this patch does all the setup steps.
>>
>> Signed-off-by: Hongbo Zhang <hongbo.zhang at nxp.com>
> [snip]
>> diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
>> index 659ec27..753e21f 100644
>> --- a/arch/arm/cpu/armv8/cpu-dt.c
>> +++ b/arch/arm/cpu/armv8/cpu-dt.c
>> @@ -6,6 +6,7 @@
>>
>>  #include <common.h>
>>  #include <asm/psci.h>
>> +#include <asm/system.h>
>>  #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
>>  #include <asm/armv8/sec_firmware.h>
>>  #endif
>> @@ -27,5 +28,14 @@ int psci_update_dt(void *fdt)
>>       fdt_psci(fdt);
>>  #endif
>>  #endif
>> +
>> +#ifdef CONFIG_ARMV8_PSCI
>> +     fdt_psci(fdt);
>> +#ifndef CONFIG_ARMV8_SECURE_BASE
>> +     /* secure code lives in RAM, keep it alive */
>> +     fdt_add_mem_rsv(fdt, (unsigned long)__secure_start,
>> +                     __secure_end - __secure_start);
>> +#endif
>> +#endif
>>       return 0;
>
> Looking just above this context, I think we need to re-work the #if
> tests now when adding this in.
>

Yes, when the CONFIG_FSL_PPA_ARMV8_PSCI moved to Kconfig, there should
be less #if #else in the function psci_update_dt(), so I can add my
codes neatly.

> --
> Tom


More information about the U-Boot mailing list