Skip to contentSkip to conversation

qcom: EFI PSCI runtime reset handling and config update

PATCH Applied Aswin Murugan 5 participants 9 messages Mar 24 – Apr 29

lore
Share & tools
lore
#0 lore raw

v4 cover qcom: EFI PSCI runtime reset handling and config update

From: Aswin Murugan <[email protected]>

With CONFIG_PSCI_RESET enabled, EFI runtime resets always use PSCI, but since it cannot pass the arguments needed for special reboot modes, requests like bootloader or EDL fall back to a normal reboot.

This version updates the earlier series that introduced configuration control over EFI PSCI-based runtime reset handling.

During review [1], it was pointed out that modifying only the Kconfig option was incomplete, as the EFI runtime configuration table in lib/efi_loader/efi_runtime.c also needs to be updated to reflect whether runtime reset support is enabled.

Additionally, the reviewer suggested that instead of introducing a new EFI_PSCI_RESET_RUNTIME option, we should reuse the existing EFI_HAVE_RUNTIME_RESET knob, making it user-configurable so platforms can opt out when the kernel must retain full control of specialized reboot modes.

This version implements that feedback:

1. EFI_HAVE_RUNTIME_RESET is now a proper Kconfig configurable option This allows individual platforms, such as Qualcomm boards, to explicitly disable U-Boot’s EFI runtime reset callbacks when required.

2. The Qualcomm defconfig disables EFI_HAVE_RUNTIME_RESET so that the kernel can manage advanced reboot flows (EDL, bootloader entry, etc.) without U-Boot overriding those reset modes through EFI runtime services.

3. The EFI runtime table is updated accordingly to conditionally advertise reset support only when EFI_HAVE_RUNTIME_RESET is enabled.

These changes maintain existing default behavior for platforms that rely on U-Boot’s EFI reset services, while enabling platforms with more complex reboot semantics to opt out cleanly.

[1] https://lore.kernel.org/all/CAC_iWjKZXsE86J_wJ=JTE0TGL=MqGm8YRYsq4BrkU2ba3me6OQ@mail.gmail.com/

---
Changes in v4:
- Made EFI_HAVE_RUNTIME_RESET user configurable & used it to disable U-Boot’s EFI runtime reset for qualcomm platforms
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Updated the commit message
- Changed 'CONFIG_EFI_PSCI_RESET_RUNTIME=n' to '# CONFIG_EFI_PSCI_RESET_RUNTIME is not set'
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
- Disabled the EFI_PSCI_RESET_RUNTIME config for qualcomm platforms
- Link to v1: https://lore.kernel.org/all/[email protected]/
---
Aswin Murugan (2):
efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option
qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

 configs/qcom_defconfig | 1 +
 lib/efi_loader/Kconfig | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/2 efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option

From: Aswin Murugan <[email protected]>

Expose EFI_HAVE_RUNTIME_RESET as a proper Kconfig boolean with a prompt so platforms can explicitly enable or disable advertising the EFI reset runtime service.

The current PSCI-based EFI runtime reset implementation is always enabled whenever CONFIG_PSCI_RESET is selected, but it does not support passing the additional arguments required for specialized reset modes. As a result, reboot requests such as bootloader mode or EDL mode cannot be propagated correctly and instead fall back to a normal reboot.

By making EFI_HAVE_RUNTIME_RESET user-configurable, platforms that depend on extended PSCI reset can now explicitly disable EFI runtime reset handling even when CONFIG_PSCI_RESET is enabled, ensuring that the kernel retains full control of advanced reboot paths.

Default behavior for existing platforms remains unchanged.

---
 lib/efi_loader/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/efi_loader/Kconfig +1 -2
index 13e44be1d06..31d1c4fc257 100644
@@ -100,8 +100,7 @@ config EFI_SET_TIME
 	  can be used by an EFI application to adjust the real time clock.
 
 config EFI_HAVE_RUNTIME_RESET
-	# bool "Reset runtime service is available"
-	bool
+	bool "Reset runtime service"
 	default y
 	depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \
 		   SANDBOX || SYSRESET_SBI || SYSRESET_X86
Signature · 1 line
2.34.1
Reviewed-by on v4 1/2
#2 lore raw

Re: [PATCH v4 1/2] efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option

Am 24. März 2026 18:59:12 MEZ schrieb Aswin Murugan <[email protected]>:

Quoted 12 lines

From: Aswin Murugan <[email protected]>

Expose EFI_HAVE_RUNTIME_RESET as a proper Kconfig boolean with a prompt so platforms can explicitly enable or disable advertising the EFI reset runtime service.

The current PSCI-based EFI runtime reset implementation is always enabled whenever CONFIG_PSCI_RESET is selected, but it does not support passing the additional arguments required for specialized reset modes. As a result, reboot requests such as bootloader mode or EDL mode cannot be propagated correctly and instead fall back to a normal reboot.

Quoted 8 lines

By making EFI_HAVE_RUNTIME_RESET user-configurable, platforms that depend on extended PSCI reset can now explicitly disable EFI runtime reset handling even when CONFIG_PSCI_RESET is enabled, ensuring that the kernel retains full control of advanced reboot paths.

Default behavior for existing platforms remains unchanged.

Quoted 18 lines

---
lib/efi_loader/Kconfig | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)
lib/efi_loader/Kconfig +0 -0
index 13e44be1d06..31d1c4fc257 100644
@@ -100,8 +100,7 @@ config EFI_SET_TIME
 	  can be used by an EFI application to adjust the real time clock.
 

config EFI_HAVE_RUNTIME_RESET

lib/efi_loader/Kconfig +1 -2
-	# bool "Reset runtime service is available"
-	bool
+	bool "Reset runtime service"
	default y
	depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \
		   SANDBOX || SYSRESET_SBI || SYSRESET_X86
Reviewed-by on v4 1/2
#3 lore raw

Re: [PATCH v4 1/2] efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option

In reply to Aswin Murugan

Thanks Ashwin

Quoted 13 lines · Aswin Murugan

From: Aswin Murugan <[email protected]>

Expose EFI_HAVE_RUNTIME_RESET as a proper Kconfig boolean with a prompt so platforms can explicitly enable or disable advertising the EFI reset runtime service.

The current PSCI-based EFI runtime reset implementation is always enabled whenever CONFIG_PSCI_RESET is selected, but it does not support passing the additional arguments required for specialized reset modes. As a result, reboot requests such as bootloader mode or EDL mode cannot be propagated correctly and instead fall back to a normal reboot.

Quoted 8 lines

By making EFI_HAVE_RUNTIME_RESET user-configurable, platforms that depend on extended PSCI reset can now explicitly disable EFI runtime reset handling even when CONFIG_PSCI_RESET is enabled, ensuring that the kernel retains full control of advanced reboot paths.

Default behavior for existing platforms remains unchanged.

Quoted 21 lines
---
 lib/efi_loader/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/efi_loader/Kconfig +1 -3
index 13e44be1d06..31d1c4fc257 100644
@@ -100,8 +100,7 @@ config EFI_SET_TIME
          can be used by an EFI application to adjust the real time clock.
 
 config EFI_HAVE_RUNTIME_RESET
-       # bool "Reset runtime service is available"
-       bool
+       bool "Reset runtime service"
        default y
        depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \
                   SANDBOX || SYSRESET_SBI || SYSRESET_X86
--

2.34.1

#4 lore raw

PATCH v4 2/2 qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

In reply to Aswin Murugan

From: Aswin Murugan <[email protected]>

Qualcomm platforms rely on the kernel to manage specialized reboot modes such as EDL, bootloader entry, and other vendor-specific reset flows. Allowing U-Boot to override these via EFI runtime reset services leads to incorrect behavior when the kernel issues advanced reboot requests.

Now that EFI_HAVE_RUNTIME_RESET is exposed as a user-configurable Kconfig option, disable it for qcom_defconfig so that the kernel retains full control over reboot handling on Qualcomm SoCs.

This ensures that EFI runtime reboot callbacks are not registered on these platforms, preventing conflicts with kernel-managed PSCI reset paths.

---
 configs/qcom_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/qcom_defconfig +1 -0
index 314fc0c4903..8042855bae1 100644
@@ -6,6 +6,7 @@ CONFIG_ARCH_SNAPDRAGON=y
 CONFIG_NR_DRAM_BANKS=24
 CONFIG_DEFAULT_DEVICE_TREE="qcom/sdm845-db845c"
 CONFIG_SYS_LOAD_ADDR=0xA0000000
+# CONFIG_EFI_HAVE_RUNTIME_RESET is not set
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
 CONFIG_EFI_CAPSULE_ON_DISK=y
 CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
Acked-by on v4 2/2
#5 lore raw

Re: [PATCH v4 2/2] qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

Am 24. März 2026 18:59:13 MEZ schrieb Aswin Murugan <[email protected]>:

Quoted 11 lines

From: Aswin Murugan <[email protected]>

Qualcomm platforms rely on the kernel to manage specialized reboot modes such as EDL, bootloader entry, and other vendor-specific reset flows. Allowing U-Boot to override these via EFI runtime reset services leads to incorrect behavior when the kernel issues advanced reboot requests.

Now that EFI_HAVE_RUNTIME_RESET is exposed as a user-configurable Kconfig option, disable it for qcom_defconfig so that the kernel retains full control over reboot handling on Qualcomm SoCs.

Quoted 5 lines

This ensures that EFI runtime reboot callbacks are not registered on these platforms, preventing conflicts with kernel-managed PSCI reset paths.

Quoted 16 lines

---
configs/qcom_defconfig | 1 +

1 file changed, 1 insertion(+)
configs/qcom_defconfig +0 -0
index 314fc0c4903..8042855bae1 100644
@@ -6,6 +6,7 @@ CONFIG_ARCH_SNAPDRAGON=y

CONFIG_NR_DRAM_BANKS=24
CONFIG_DEFAULT_DEVICE_TREE="qcom/sdm845-db845c"
CONFIG_SYS_LOAD_ADDR=0xA0000000
+# CONFIG_EFI_HAVE_RUNTIME_RESET is not set
CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y

Reviewed-by on v4 2/2
#6 lore raw

Re: [PATCH v4 2/2] qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

In reply to Aswin Murugan
Quoted 12 lines · Aswin Murugan

From: Aswin Murugan <[email protected]>

Qualcomm platforms rely on the kernel to manage specialized reboot modes such as EDL, bootloader entry, and other vendor-specific reset flows. Allowing U-Boot to override these via EFI runtime reset services leads to incorrect behavior when the kernel issues advanced reboot requests.

Now that EFI_HAVE_RUNTIME_RESET is exposed as a user-configurable Kconfig option, disable it for qcom_defconfig so that the kernel retains full control over reboot handling on Qualcomm SoCs.

Quoted 5 lines

This ensures that EFI runtime reboot callbacks are not registered on these platforms, preventing conflicts with kernel-managed PSCI reset paths.

Quoted 19 lines
---
 configs/qcom_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/qcom_defconfig +1 -1
index 314fc0c4903..8042855bae1 100644
@@ -6,6 +6,7 @@ CONFIG_ARCH_SNAPDRAGON=y
 CONFIG_NR_DRAM_BANKS=24
 CONFIG_DEFAULT_DEVICE_TREE="qcom/sdm845-db845c"
 CONFIG_SYS_LOAD_ADDR=0xA0000000
+# CONFIG_EFI_HAVE_RUNTIME_RESET is not set
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
 CONFIG_EFI_CAPSULE_ON_DISK=y
 CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
--

2.34.1

Reviewed-by on the v4 series
#7 lore raw
In reply to Aswin Murugan
Quoted 38 lines · Aswin Murugan

From: Aswin Murugan <[email protected]>

With CONFIG_PSCI_RESET enabled, EFI runtime resets always use PSCI, but since it cannot pass the arguments needed for special reboot modes, requests like bootloader or EDL fall back to a normal reboot.

This version updates the earlier series that introduced configuration control over EFI PSCI-based runtime reset handling.

During review [1], it was pointed out that modifying only the Kconfig option was incomplete, as the EFI runtime configuration table in lib/efi_loader/efi_runtime.c also needs to be updated to reflect whether runtime reset support is enabled.

Additionally, the reviewer suggested that instead of introducing a new EFI_PSCI_RESET_RUNTIME option, we should reuse the existing EFI_HAVE_RUNTIME_RESET knob, making it user-configurable so platforms can opt out when the kernel must retain full control of specialized reboot modes.

This version implements that feedback:

1. EFI_HAVE_RUNTIME_RESET is now a proper Kconfig configurable option This allows individual platforms, such as Qualcomm boards, to explicitly disable U-Boot’s EFI runtime reset callbacks when required.

2. The Qualcomm defconfig disables EFI_HAVE_RUNTIME_RESET so that the kernel can manage advanced reboot flows (EDL, bootloader entry, etc.) without U-Boot overriding those reset modes through EFI runtime services.

3. The EFI runtime table is updated accordingly to conditionally advertise reset support only when EFI_HAVE_RUNTIME_RESET is enabled.

These changes maintain existing default behavior for platforms that rely on U-Boot’s EFI reset services, while enabling platforms with more complex reboot semantics to opt out cleanly.

Quoted 8 lines

[1] https://lore.kernel.org/all/CAC_iWjKZXsE86J_wJ=JTE0TGL=MqGm8YRYsq4BrkU2ba3me6OQ@mail.gmail.com/

---
Changes in v4:
- Made EFI_HAVE_RUNTIME_RESET user configurable & used it to disable U-Boot’s EFI runtime reset for qualcomm platforms
- Link to v3: https://lore.kernel.org/all/[email protected]/

For the series:

-Sumit

Quoted 22 lines

Changes in v3:
- Updated the commit message
- Changed 'CONFIG_EFI_PSCI_RESET_RUNTIME=n' to '# CONFIG_EFI_PSCI_RESET_RUNTIME is not set'
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
- Disabled the EFI_PSCI_RESET_RUNTIME config for qualcomm platforms
- Link to v1: https://lore.kernel.org/all/[email protected]/
---
Aswin Murugan (2):
efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option
qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

 configs/qcom_defconfig | 1 +
 lib/efi_loader/Kconfig | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
#8 lore raw
In reply to Aswin Murugan
Quoted 9 lines · Aswin Murugan

qcom: EFI PSCI runtime reset handling and config update

From: Aswin Murugan <[email protected]>

With CONFIG_PSCI_RESET enabled, EFI runtime resets always use PSCI, but since it cannot pass the arguments needed for special reboot modes, requests like bootloader or EDL fall back to a normal reboot.

[...]

Applied, thanks!

(applied v3 not v4)

First and last time I use b4 review, the commit shas are wrong but you can find the patches in https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commits/casey/qcom-main-13Apr2026?ref_type=heads

Apologies

[1/2] efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option

      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/6e78ca4ce06f
[2/2] qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig
      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/f0f7134acb1b

Best regards,

Signature · 1 line
// Casey (she/they)