[PATCH v1] firmware: psci: Refactor EFI runtime PSCI reset handling

Tom Rini trini at konsulko.com
Thu Jan 8 15:37:42 CET 2026


On Thu, Jan 08, 2026 at 04:21:46PM +0530, Aswin Murugan wrote:

> Previously, U-Boot’s PSCI-based implementation of `efi_reset_system()`
> was always enabled when `CONFIG_PSCI_RESET` was set, but it did not
> handle additional arguments required for specialized reset modes. This
> caused issues where special reboot requests (e.g., bootloader, EDL)
> were ignored, resulting in a normal reboot.
> 
> This change introduces a new configuration option,
> `CONFIG_EFI_PSCI_RESET_RUNTIME`, to explicitly control whether the
> runtime PSCI-specific EFI reset implementation is enabled. By default,
> the PSCI EFI reset is disabled unless this config is selected, allowing
> the kernel to handle the reset logic and pass the necessary arguments
> for the intended reset mode correctly.
> 
> Signed-off-by: Aswin Murugan <aswin.murugan at oss.qualcomm.com>
> ---
>  drivers/firmware/psci.c |  4 ++--
>  lib/efi_loader/Kconfig  | 10 ++++++++++
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> index 2e3223e1c32..009c6153d0c 100644
> --- a/drivers/firmware/psci.c
> +++ b/drivers/firmware/psci.c
> @@ -244,7 +244,7 @@ static void __maybe_unused do_psci_probe(void)
>  	uclass_get_device_by_name(UCLASS_FIRMWARE, DRIVER_NAME, &dev);
>  }
>  
> -#if IS_ENABLED(CONFIG_EFI_LOADER) && IS_ENABLED(CONFIG_PSCI_RESET)
> +#if IS_ENABLED(CONFIG_EFI_PSCI_RESET_RUNTIME)
>  efi_status_t efi_reset_system_init(void)
>  {
>  	do_psci_probe();
> @@ -266,7 +266,7 @@ void __efi_runtime EFIAPI efi_reset_system(enum efi_reset_type reset_type,
>  	while (1)
>  		;
>  }
> -#endif /* IS_ENABLED(CONFIG_EFI_LOADER) && IS_ENABLED(CONFIG_PSCI_RESET) */
> +#endif /* IS_ENABLED(CONFIG_EFI_PSCI_RESET_RUNTIME) */
>  
>  #ifdef CONFIG_PSCI_RESET
>  void reset_misc(void)
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index 13e44be1d06..23c9e5cd1ea 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -106,6 +106,16 @@ config EFI_HAVE_RUNTIME_RESET
>  	depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \
>  		   SANDBOX || SYSRESET_SBI || SYSRESET_X86
>  
> +config EFI_PSCI_RESET_RUNTIME
> +	bool "EFI Runtime PSCI Reset Support"
> +	depends on ARM_PSCI_FW
> +	help
> +	  Enable PSCI-based reset implementation for EFI runtime services.
> +	  This allows the EFI runtime to perform system resets and power-off
> +	  operations using the ARM Power State Coordination Interface (PSCI)
> +	  firmware interface, providing a standardized method for system
> +	  power management across different ARM platforms.
> +
>  endmenu
>  
>  menu "UEFI Variables"

Using tools/qconfig.py we can see that 379 platforms today enable this
support:
$ ./tools/qconfig.py -f PSCI_RESET EFI_LOADER
379 matches
...

So we should make the new symbol be "default y if EFI_LOADER && PSCI_RESET"
so that platforms that want to behave differently still can but existing
functionality isn't removed.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260108/b39b186b/attachment.sig>


More information about the U-Boot mailing list