* [PATCH v3 0/2] qcom: EFI PSCI runtime reset handling and config update
@ 2026-02-13 11:05 Aswin Murugan
2026-02-13 11:05 ` [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling Aswin Murugan
2026-02-13 11:05 ` [PATCH v3 2/2] qcom_defconfig: Disable CONFIG_EFI_PSCI_RESET_RUNTIME Aswin Murugan
0 siblings, 2 replies; 9+ messages in thread
From: Aswin Murugan @ 2026-02-13 11:05 UTC (permalink / raw)
To: u-boot, sumit.garg, casey.connolly, u-boot-qcom
Cc: trini, xypron.glpk, ilias.apalodimas, sjg, michal.simek,
gabriel.dalimonte, jan.kiszka, paul.liu, j-humphreys,
neil.armstrong, me, marek.vasut+renesas, Aswin Murugan
This series refactors the EFI runtime PSCI reset handling:
1. Introduce EFI_PSCI_RESET_RUNTIME config to control PSCI-based EFI reset
logic in U-Boot. This allows platforms to disable U-Boot’s runtime reset
handling when the kernel needs to manage specialized reboot modes.
2. Enabled CONFIG_EFI_PSCI_RESET_RUNTIME by default in Kconfig as per the
discussion in this thread [1]
2. Disable CONFIG_EFI_PSCI_RESET_RUNTIME in qcom_defconfig so that the
kernel retains full control over reset modes (e.g., EDL, bootloader),
ensuring correct behavior for advanced reboot requests.
[1] https://lore.kernel.org/all/20260108143742.GT3416603@bill-the-cat/
Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
---
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/20260114111624.2321852-1-aswin.murugan@oss.qualcomm.com/
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/20260108105146.1285450-1-aswin.murugan@oss.qualcomm.com/
---
Aswin Murugan (2):
firmware: psci: Refactor EFI runtime PSCI reset handling
qcom_defconfig: Disable CONFIG_EFI_PSCI_RESET_RUNTIME
configs/qcom_defconfig | 1 +
drivers/firmware/psci.c | 4 ++--
lib/efi_loader/Kconfig | 8 ++++++++
3 files changed, 11 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-13 11:05 [PATCH v3 0/2] qcom: EFI PSCI runtime reset handling and config update Aswin Murugan
@ 2026-02-13 11:05 ` Aswin Murugan
2026-02-13 11:25 ` Ilias Apalodimas
2026-02-17 20:14 ` Heinrich Schuchardt
2026-02-13 11:05 ` [PATCH v3 2/2] qcom_defconfig: Disable CONFIG_EFI_PSCI_RESET_RUNTIME Aswin Murugan
1 sibling, 2 replies; 9+ messages in thread
From: Aswin Murugan @ 2026-02-13 11:05 UTC (permalink / raw)
To: u-boot, sumit.garg, casey.connolly, u-boot-qcom
Cc: trini, xypron.glpk, ilias.apalodimas, sjg, michal.simek,
gabriel.dalimonte, jan.kiszka, paul.liu, j-humphreys,
neil.armstrong, me, marek.vasut+renesas, Aswin Murugan
The current PSCI-based EFI runtime reset implementation is always enabled
when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
required for specialized reset modes. As a result, reboot requests such as
bootloader mode or EDL mode are ignored and fall back to a normal reboot.
Add CONFIG_EFI_PSCI_RESET_RUNTIME to give platforms explicit control over
the PSCI-specific EFI runtime reset path. This allows a platform to disable
U-Boot's PSCI reset handler when needed so that the kernel can perform the
reset with the correct arguments for special reboot modes.
The option defaults to enabled to maintain backward compatibility with the
existing behavior.
Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
---
Changes in v3:
- Commit message has been updated, no change in code
Changes in v2:
- As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
---
drivers/firmware/psci.c | 4 ++--
lib/efi_loader/Kconfig | 8 ++++++++
2 files changed, 10 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..3882de273bb 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -106,6 +106,14 @@ 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"
+ default y if EFI_LOADER && PSCI_RESET
+ depends on ARM_PSCI_FW
+ help
+ Enable PSCI-based reset implementation for EFI runtime services.
+ This allows the OS to reset the system through EFI runtime calls.
+
endmenu
menu "UEFI Variables"
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/2] qcom_defconfig: Disable CONFIG_EFI_PSCI_RESET_RUNTIME
2026-02-13 11:05 [PATCH v3 0/2] qcom: EFI PSCI runtime reset handling and config update Aswin Murugan
2026-02-13 11:05 ` [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling Aswin Murugan
@ 2026-02-13 11:05 ` Aswin Murugan
1 sibling, 0 replies; 9+ messages in thread
From: Aswin Murugan @ 2026-02-13 11:05 UTC (permalink / raw)
To: u-boot, sumit.garg, casey.connolly, u-boot-qcom
Cc: trini, xypron.glpk, ilias.apalodimas, sjg, michal.simek,
gabriel.dalimonte, jan.kiszka, paul.liu, j-humphreys,
neil.armstrong, me, marek.vasut+renesas, Aswin Murugan
Disable CONFIG_EFI_PSCI_RESET_RUNTIME in qcom_defconfig to let the kernel
manage reset modes and handle specialized reboot requests correctly.
Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
---
Changes in v3:
- Changed 'CONFIG_EFI_PSCI_RESET_RUNTIME=n' to '# CONFIG_EFI_PSCI_RESET_RUNTIME is not set'
---
configs/qcom_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig
index fe5880de1fd..32a37a06df6 100644
--- a/configs/qcom_defconfig
+++ b/configs/qcom_defconfig
@@ -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_PSCI_RESET_RUNTIME is not set
CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-13 11:05 ` [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling Aswin Murugan
@ 2026-02-13 11:25 ` Ilias Apalodimas
2026-02-17 19:06 ` Aswin Murugan
2026-02-17 20:14 ` Heinrich Schuchardt
1 sibling, 1 reply; 9+ messages in thread
From: Ilias Apalodimas @ 2026-02-13 11:25 UTC (permalink / raw)
To: Aswin Murugan
Cc: u-boot, sumit.garg, casey.connolly, u-boot-qcom, trini,
xypron.glpk, sjg, michal.simek, gabriel.dalimonte, jan.kiszka,
paul.liu, j-humphreys, neil.armstrong, me, marek.vasut+renesas
Hi Ashwin
On Fri, 13 Feb 2026 at 13:06, Aswin Murugan
<aswin.murugan@oss.qualcomm.com> wrote:
>
> The current PSCI-based EFI runtime reset implementation is always enabled
> when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
> required for specialized reset modes. As a result, reboot requests such as
> bootloader mode or EDL mode are ignored and fall back to a normal reboot.
>
> Add CONFIG_EFI_PSCI_RESET_RUNTIME to give platforms explicit control over
Is there anything missing and you can't use EFI_HAVE_RUNTIME_RESET?
> the PSCI-specific EFI runtime reset path. This allows a platform to disable
> U-Boot's PSCI reset handler when needed so that the kernel can perform the
> reset with the correct arguments for special reboot modes.
>
> The option defaults to enabled to maintain backward compatibility with the
> existing behavior.
>
> Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
> ---
> Changes in v3:
> - Commit message has been updated, no change in code
>
> Changes in v2:
> - As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
> ---
> drivers/firmware/psci.c | 4 ++--
> lib/efi_loader/Kconfig | 8 ++++++++
> 2 files changed, 10 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) */
You also have to adjust the RT config table in
lib/efi_loader/efi_runtime.c, but I really think we should reuse
EFI_HAVE_RUNTIME_RESET
Cheers
/Ilias
>
> #ifdef CONFIG_PSCI_RESET
> void reset_misc(void)
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index 13e44be1d06..3882de273bb 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -106,6 +106,14 @@ 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"
> + default y if EFI_LOADER && PSCI_RESET
> + depends on ARM_PSCI_FW
> + help
> + Enable PSCI-based reset implementation for EFI runtime services.
> + This allows the OS to reset the system through EFI runtime calls.
> +
> endmenu
>
> menu "UEFI Variables"
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-13 11:25 ` Ilias Apalodimas
@ 2026-02-17 19:06 ` Aswin Murugan
2026-02-18 7:36 ` Ilias Apalodimas
2026-02-20 9:22 ` Sumit Garg
0 siblings, 2 replies; 9+ messages in thread
From: Aswin Murugan @ 2026-02-17 19:06 UTC (permalink / raw)
To: Ilias Apalodimas
Cc: u-boot, sumit.garg, casey.connolly, u-boot-qcom, trini,
xypron.glpk, sjg, michal.simek, gabriel.dalimonte, jan.kiszka,
paul.liu, j-humphreys, neil.armstrong, me, marek.vasut+renesas
On 2/13/2026 4:55 PM, Ilias Apalodimas wrote:
> Hi Ashwin
>
> On Fri, 13 Feb 2026 at 13:06, Aswin Murugan
> <aswin.murugan@oss.qualcomm.com> wrote:
>> The current PSCI-based EFI runtime reset implementation is always enabled
>> when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
>> required for specialized reset modes. As a result, reboot requests such as
>> bootloader mode or EDL mode are ignored and fall back to a normal reboot.
>>
>> Add CONFIG_EFI_PSCI_RESET_RUNTIME to give platforms explicit control over
> Is there anything missing and you can't use EFI_HAVE_RUNTIME_RESET?
Thanks for the feedback, Ilias
This is a kernel‑level limitation based on drivers/firmware/efi/reboot.c
[1] implementation in Linux. The efi_reboot function intentionally
ignores the reboot data string and always passes NULL to ResetSystem. As
a result, special reboot modes like "bootloader" or "recovery" aren’t
forwarded through EFI_HAVE_RUNTIME_RESET.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/reboot.c?h=v6.13#n46
>
>> the PSCI-specific EFI runtime reset path. This allows a platform to disable
>> U-Boot's PSCI reset handler when needed so that the kernel can perform the
>> reset with the correct arguments for special reboot modes.
>>
>> The option defaults to enabled to maintain backward compatibility with the
>> existing behavior.
>>
>> Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
>> ---
>> Changes in v3:
>> - Commit message has been updated, no change in code
>>
>> Changes in v2:
>> - As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
>> ---
>> drivers/firmware/psci.c | 4 ++--
>> lib/efi_loader/Kconfig | 8 ++++++++
>> 2 files changed, 10 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) */
> You also have to adjust the RT config table in
> lib/efi_loader/efi_runtime.c, but I really think we should reuse
> EFI_HAVE_RUNTIME_RESET
EFI_HAVE_RUNTIME_RESET is enabled by default & depends on PSCI_RESET config,
So even if i disabled EFI_HAVE_RUNTIME_RESET on defconfig it was
overridden, since PSCI_RESET is enabled it was auto enabling it, hence
introduced a new config CONFIG_EFI_PSCI_RESET_RUNTIME to control psci
based EFI runtime reset control.
Thanks,
Aswin
>
> Cheers
> /Ilias
>> #ifdef CONFIG_PSCI_RESET
>> void reset_misc(void)
>> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
>> index 13e44be1d06..3882de273bb 100644
>> --- a/lib/efi_loader/Kconfig
>> +++ b/lib/efi_loader/Kconfig
>> @@ -106,6 +106,14 @@ 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"
>> + default y if EFI_LOADER && PSCI_RESET
>> + depends on ARM_PSCI_FW
>> + help
>> + Enable PSCI-based reset implementation for EFI runtime services.
>> + This allows the OS to reset the system through EFI runtime calls.
>> +
>> endmenu
>>
>> menu "UEFI Variables"
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-13 11:05 ` [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling Aswin Murugan
2026-02-13 11:25 ` Ilias Apalodimas
@ 2026-02-17 20:14 ` Heinrich Schuchardt
2026-02-18 6:29 ` Aswin Murugan
1 sibling, 1 reply; 9+ messages in thread
From: Heinrich Schuchardt @ 2026-02-17 20:14 UTC (permalink / raw)
To: Aswin Murugan, u-boot, sumit.garg, casey.connolly, u-boot-qcom
Cc: trini, ilias.apalodimas, sjg, michal.simek, gabriel.dalimonte,
jan.kiszka, paul.liu, j-humphreys, neil.armstrong, me,
marek.vasut+renesas
Am 13. Februar 2026 12:05:26 MEZ schrieb Aswin Murugan <aswin.murugan@oss.qualcomm.com>:
>The current PSCI-based EFI runtime reset implementation is always enabled
>when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
>required for specialized reset modes. As a result, reboot requests such as
>bootloader mode or EDL mode are ignored and fall back to a normal reboot.
Are the "specialized" reset modes defined in the PSCI specification or at least compliant to it? Where can I find the description of these reset modes.
If you don't want to use U-Boot's PSCI implementation, why don't you simply disable the PSCI driver?
>
>Add CONFIG_EFI_PSCI_RESET_RUNTIME to give platforms explicit control over
>the PSCI-specific EFI runtime reset path. This allows a platform to disable
>U-Boot's PSCI reset handler when needed so that the kernel can perform the
>reset with the correct arguments for special reboot modes.
>
>The option defaults to enabled to maintain backward compatibility with the
>existing behavior.
>
>Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
>---
>Changes in v3:
>- Commit message has been updated, no change in code
>
>Changes in v2:
>- As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
>---
> drivers/firmware/psci.c | 4 ++--
> lib/efi_loader/Kconfig | 8 ++++++++
> 2 files changed, 10 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..3882de273bb 100644
>--- a/lib/efi_loader/Kconfig
>+++ b/lib/efi_loader/Kconfig
>@@ -106,6 +106,14 @@ 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"
>+ default y if EFI_LOADER && PSCI_RESET
>+ depends on ARM_PSCI_FW
>+ help
>+ Enable PSCI-based reset implementation for EFI runtime services.
>+ This allows the OS to reset the system through EFI runtime calls.
>+
> endmenu
>
> menu "UEFI Variables"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-17 20:14 ` Heinrich Schuchardt
@ 2026-02-18 6:29 ` Aswin Murugan
0 siblings, 0 replies; 9+ messages in thread
From: Aswin Murugan @ 2026-02-18 6:29 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: trini, ilias.apalodimas, sjg, michal.simek, gabriel.dalimonte,
jan.kiszka, paul.liu, j-humphreys, neil.armstrong, me,
marek.vasut+renesas, u-boot-qcom, u-boot, sumit.garg,
casey.connolly
On 2/18/2026 1:44 AM, Heinrich Schuchardt wrote:
> Am 13. Februar 2026 12:05:26 MEZ schrieb Aswin Murugan <aswin.murugan@oss.qualcomm.com>:
>> The current PSCI-based EFI runtime reset implementation is always enabled
>> when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
>> required for specialized reset modes. As a result, reboot requests such as
>> bootloader mode or EDL mode are ignored and fall back to a normal reboot.
> Are the "specialized" reset modes defined in the PSCI specification or at least compliant to it? Where can I find the description of these reset modes.
The specialized reset modes are not defined as standard PSCI reset
modes, but they are supported through the *PSCI SYSTEM_RESET2* call [1],
which is explicitly designed for vendor‑specific reset types.
SYSTEM_RESET2 takes two parameters reset_type and cookie. Together,
these parameters enable platform firmware to handle specialized reset
behaviors modes such as bootloader, recovery, EDL, and others that are
defined by the SoC vendor.
> If you don't want to use U-Boot's PSCI implementation, why don't you simply disable the PSCI driver?
We still rely on the PSCI‑based reset flow in U‑Boot for normal
functionality, so disabling the PSCI driver entirely would not be
suitable for us. Our intention is only to avoid invoking the PSCI reset
path specifically during EFI runtime reboot requests, since those are
handled differently. Outside of the EFI runtime reboot case, U‑Boot
should continue to use its PSCI implementation as usual. [1]
https://developer.arm.com/documentation/den0022/fb/?lang=en Thanks, Aswin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-17 19:06 ` Aswin Murugan
@ 2026-02-18 7:36 ` Ilias Apalodimas
2026-02-20 9:22 ` Sumit Garg
1 sibling, 0 replies; 9+ messages in thread
From: Ilias Apalodimas @ 2026-02-18 7:36 UTC (permalink / raw)
To: Aswin Murugan
Cc: u-boot, sumit.garg, casey.connolly, u-boot-qcom, trini,
xypron.glpk, sjg, michal.simek, gabriel.dalimonte, jan.kiszka,
paul.liu, j-humphreys, neil.armstrong, me, marek.vasut+renesas
[...]
> >> Changes in v2:
> >> - As per review comments made default y for EFI_PSCI_RESET_RUNTIME config
> >> ---
> >> drivers/firmware/psci.c | 4 ++--
> >> lib/efi_loader/Kconfig | 8 ++++++++
> >> 2 files changed, 10 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) */
> > You also have to adjust the RT config table in
> > lib/efi_loader/efi_runtime.c, but I really think we should reuse
> > EFI_HAVE_RUNTIME_RESET
> EFI_HAVE_RUNTIME_RESET is enabled by default & depends on PSCI_RESET config,
> So even if i disabled EFI_HAVE_RUNTIME_RESET on defconfig it was
> overridden, since PSCI_RESET is enabled it was auto enabling it, hence
> introduced a new config CONFIG_EFI_PSCI_RESET_RUNTIME to control psci
> based EFI runtime reset control.
That's something we should change then. Having PSCI enabled doesn't
automatically mean you can have a runtime service for it.
Also this patch seems incorrect, since the EFI RT config table still
claims it support runtime resets, but it only uses the default
function.
In your setup should the firmware claim it supports runtime resets?
Thanks
/Ilias
>
> Thanks,
> Aswin
> >
> > Cheers
> > /Ilias
> >> #ifdef CONFIG_PSCI_RESET
> >> void reset_misc(void)
> >> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> >> index 13e44be1d06..3882de273bb 100644
> >> --- a/lib/efi_loader/Kconfig
> >> +++ b/lib/efi_loader/Kconfig
> >> @@ -106,6 +106,14 @@ 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"
> >> + default y if EFI_LOADER && PSCI_RESET
> >> + depends on ARM_PSCI_FW
> >> + help
> >> + Enable PSCI-based reset implementation for EFI runtime services.
> >> + This allows the OS to reset the system through EFI runtime calls.
> >> +
> >> endmenu
> >>
> >> menu "UEFI Variables"
> >> --
> >> 2.34.1
> >>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling
2026-02-17 19:06 ` Aswin Murugan
2026-02-18 7:36 ` Ilias Apalodimas
@ 2026-02-20 9:22 ` Sumit Garg
1 sibling, 0 replies; 9+ messages in thread
From: Sumit Garg @ 2026-02-20 9:22 UTC (permalink / raw)
To: Aswin Murugan
Cc: Ilias Apalodimas, u-boot, casey.connolly, u-boot-qcom, trini,
xypron.glpk, sjg, michal.simek, gabriel.dalimonte, jan.kiszka,
paul.liu, j-humphreys, neil.armstrong, me, marek.vasut+renesas
On Wed, Feb 18, 2026 at 12:36:51AM +0530, Aswin Murugan wrote:
>
> On 2/13/2026 4:55 PM, Ilias Apalodimas wrote:
> > Hi Ashwin
> >
> > On Fri, 13 Feb 2026 at 13:06, Aswin Murugan
> > <aswin.murugan@oss.qualcomm.com> wrote:
> > > The current PSCI-based EFI runtime reset implementation is always enabled
> > > when CONFIG_PSCI_RESET is set, but it does not support the extra arguments
> > > required for specialized reset modes. As a result, reboot requests such as
> > > bootloader mode or EDL mode are ignored and fall back to a normal reboot.
> > >
> > > Add CONFIG_EFI_PSCI_RESET_RUNTIME to give platforms explicit control over
> > Is there anything missing and you can't use EFI_HAVE_RUNTIME_RESET?
> Thanks for the feedback, Ilias
> This is a kernel‑level limitation based on drivers/firmware/efi/reboot.c [1]
> implementation in Linux. The efi_reboot function intentionally ignores the
> reboot data string and always passes NULL to ResetSystem. As a result,
> special reboot modes like "bootloader" or "recovery" aren’t forwarded
> through EFI_HAVE_RUNTIME_RESET.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/reboot.c?h=v6.13#n46
>
Yeah I know about that limitation for which the right EFI approach to
use is EFI_RESET_PLATFORM_SPECIFIC. I tried to implement it here [1] but
looks like needs a bit more testing from UEFI implementations. Would you
be able to give that approach a try?
Having EFI runtime reset service exposed to OS is certainely better than
OS trying to rely on platform/PSCI specific reset approaches.
[1] https://lore.kernel.org/all/20251114085058.2195900-1-sumit.garg@kernel.org/
-Sumit
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-02-20 9:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13 11:05 [PATCH v3 0/2] qcom: EFI PSCI runtime reset handling and config update Aswin Murugan
2026-02-13 11:05 ` [PATCH v3 1/2] firmware: psci: Refactor EFI runtime PSCI reset handling Aswin Murugan
2026-02-13 11:25 ` Ilias Apalodimas
2026-02-17 19:06 ` Aswin Murugan
2026-02-18 7:36 ` Ilias Apalodimas
2026-02-20 9:22 ` Sumit Garg
2026-02-17 20:14 ` Heinrich Schuchardt
2026-02-18 6:29 ` Aswin Murugan
2026-02-13 11:05 ` [PATCH v3 2/2] qcom_defconfig: Disable CONFIG_EFI_PSCI_RESET_RUNTIME Aswin Murugan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox