[PATCH 4/4] efi_loader: call smp_kick_all_cpus()
Heinrich Schuchardt
xypron.glpk at gmx.de
Thu May 14 20:46:34 CEST 2020
On 5/14/20 2:38 PM, Michael Walle wrote:
> On some architectures, specifically the layerscape, the secondary cores
> wait for an interrupt before entering the spin-tables. This applies only
> to boards which doesn't have PSCI provided by TF-a and u-boot does the
%s/TF-a/TF-A/, %s/u-boot/U-Boot/
> secondary cores handling.
> bootm/booti already call that function for ARM architecture; also add it
> to bootelf before switching to EL2. Additionally, provide a weak noop
> function so we don't have to have "#ifdef CONFIG_ARM64" guards.
>
> Signed-off-by: Michael Walle <michael at walle.cc>
> ---
> common/bootm.c | 9 +++++++++
> lib/efi_loader/efi_setup.c | 6 ++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/common/bootm.c b/common/bootm.c
> index db4362a643..65adf29329 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -816,6 +816,15 @@ void __weak switch_to_non_secure_mode(void)
> {
> }
>
> +/**
> + * smp_kick_all_cpus() - kick all CPUs
> + *
> + * This routine is overridden by architectures requiring this feature.
> + */
> +void __weak smp_kick_all_cpus(void)
> +{
> +}
> +
> #else /* USE_HOSTCC */
>
> #if defined(CONFIG_FIT_SIGNATURE)
> diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
> index 26a7423203..7e5364adc5 100644
> --- a/lib/efi_loader/efi_setup.c
> +++ b/lib/efi_loader/efi_setup.c
> @@ -132,6 +132,12 @@ efi_status_t efi_init_obj_list(void)
> /* Allow unaligned memory access */
> allow_unaligned();
>
> + /*
> + * Some architectures need to kick secondary cores to enter their
> + * spin table.
> + */
> + smp_kick_all_cpus();
This will not compile with
CONFIG_CMD_BOOTI=n
CONFIG_CMD_BOOTM=n
CONFIG_CMD_BOOTZ=n
Best regards
Heinrich
> +
> /* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */
> switch_to_non_secure_mode();
>
>
More information about the U-Boot
mailing list