[PATCH v2 5/6] arm: Use armv8_switch_to_el1 env to switch to EL1

Andre Przywara andre.przywara at arm.com
Fri Sep 3 01:07:20 CEST 2021


On Thu, 2 Sep 2021 18:42:05 -0400
Tom Rini <trini at konsulko.com> wrote:

Hi Tom,

> On Thu, Aug 19, 2021 at 04:53:13PM +0100, Peter Hoyes wrote:
> 
> > From: Peter Hoyes <Peter.Hoyes at arm.com>
> > 
> > Use the environment variable armv8_switch_to_el1 to determine whether
> > to switch to EL1 at runtime. This is an alternative to the
> > CONFIG_ARMV8_SWITCH_TO_EL1 compile-time option.
> > 
> > The environment variable will be ineffective if the ARMV8_MULTIENTRY
> > config is used.
> > 
> > This is required by the Armv8r64 architecture, which must be able to
> > boot at S-EL1 for Linux but may need to boot at other ELs for other
> > systems.
> > 
> > Signed-off-by: Peter Hoyes <Peter.Hoyes at arm.com>  
> 
> Applied to u-boot/next, thanks!

Sorry for keeping silent on this, we had some internal discussions
here, and we don't think this is the right approach.

This whole CONFIG_ARMV8_SWITCH_TO_EL1 solution is actually already
questionable, as it goes somewhat against the PSCI spec, which requires
secondaries to enter in the highest non-secure exception level (Section
6.1.3: "... As described in Figure 6, the return Exception level for a
CPU_ON call is the highest Non secure Exception level implemented.")

In any case the primary core must enter an the same exception level as
the secondaries, or all hell breaks loose. The current code violates
this bluntly when the dynamic method is used (as the spin table code
doesn't know about this variable).

So can you please revert this patch? We are looking into a different
solution for getting into EL2, which wouldn't involve U-Boot at all.
The other patches and the next one are fine, however we would need one
small change in the next patch to live with this patch removed.
If you like, I can send an amended version of 6/6 to accommodate this.

Thanks!
Andre


More information about the U-Boot mailing list