All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] arm: EFI: Disallow EFI bootmgr when providing PSCI
@ 2021-01-22 12:04 Andre Przywara
  2021-01-24  2:03 ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Andre Przywara @ 2021-01-22 12:04 UTC (permalink / raw)
  To: u-boot

When "bootefi bootmgr" is run, it switches the CPU into non-secure
state. This breaks platforms like 32-bit Allwinner boards that rely on
running in secure state until late in the process, when they install
the PSCI handler in secure memory and drop into non-secure state.
They hang just before entering the kernel, after the "Starting the
kernel" message.

Commit f3866909e350 ("distro_bootcmd: call EFI bootmgr even without
having /EFI/boot") changed the order of EFI probing, so the EFI bootmgr
is now *always* run, resulting in the default distro boot commands now
*always* failing, even in the total absence of any UEFI directories or
boot files.

So use the newly added build option to disable the EFI bootmgr, which
makes those boards boot again using the distro boot commands.
Explicitly calling "bootefi bootmgr" still breaks the boot, though.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reported-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
Hi,

the above is the result of my analysis, happy to stand corrected in
case I missed something. I know that this is not a proper solution,
but it's an effective stop-gap measure to fix all those boards. It looks
like a proper solution would either be:
- Let the EFI bootmgr run in the current security state.
- Install the PSCI handlers early in U-Boot.

Both solutions sound rather involved, so probably require more time.
But we need to fix this breakage now.

Cheers,
Andre

 lib/efi_loader/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index e729f727df1..a1e453fa605 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -30,6 +30,7 @@ if EFI_LOADER
 config CMD_BOOTEFI_BOOTMGR
 	bool "UEFI Boot Manager"
 	default y
+	depends on !ARMV7_PSCI
 	help
 	  Select this option if you want to select the UEFI binary to be booted
 	  via UEFI variables Boot####, BootOrder, and BootNext. This enables the
-- 
2.17.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-24 23:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 12:04 [RFC PATCH] arm: EFI: Disallow EFI bootmgr when providing PSCI Andre Przywara
2021-01-24  2:03 ` Simon Glass
2021-01-24  8:27   ` Heinrich Schuchardt
2021-01-24  8:33     ` Jernej Škrabec
2021-01-24  8:47       ` [linux-sunxi] " Jernej Škrabec
2021-01-24 10:44         ` Heinrich Schuchardt
2021-01-24 13:07           ` Andre Przywara
2021-01-24 14:45             ` Heinrich Schuchardt
2021-01-24 23:24               ` Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.