The warm reboot requests are mapped to cold reboot as the power control
module was not capable of handling the warm reboot requests in the
legacy implementation. The support for warm reboot support is added into
the power control module. To support warm reset, update
ArmPsciResetSystemLib, and there by invoke the PSCI call with parameters
for warm reboot.

Signed-off-by: Pranav Madhu <pranav.ma...@arm.com>
---
 ArmPkg/Include/IndustryStandard/ArmStdSmc.h                  | 1 +
 ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

Changes since V1:
- Addressed comments from Ard

Link to github branch for this patch -
https://github.com/Pranav-Madhu/edk2/tree/topics/warm_reboot

diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
index 655edc21b205..90123efcbd56 100644
--- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
@@ -93,6 +93,7 @@
 #define ARM_SMC_ID_PSCI_MIGRATE_AARCH32        0x84000005
 #define ARM_SMC_ID_PSCI_SYSTEM_OFF             0x84000008
 #define ARM_SMC_ID_PSCI_SYSTEM_RESET           0x84000009
+#define ARM_SMC_ID_PSCI_SYSTEM_RESET2_AARCH32  0x84000012
 
 /* The current PSCI version is:  0.2 */
 #define ARM_SMC_PSCI_VERSION_MAJOR  0
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c 
b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
index 7bcd34849507..211941c57938 100644
--- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
+++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
@@ -45,10 +45,13 @@ LibResetSystem (
   ARM_SMC_ARGS  ArmSmcArgs;
 
   switch (ResetType) {
+    case EfiResetWarm:
+      ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET2_AARCH32;
+      ArmSmcArgs.Arg1 = 0;
+      ArmSmcArgs.Arg2 = 0;
+      break;
     case EfiResetPlatformSpecific:
     // Map the platform specific reset as reboot
-    case EfiResetWarm:
-    // Map a warm reset into a cold reset
     case EfiResetCold:
       // Send a PSCI 0.2 SYSTEM_RESET command
       ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET;
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87454): https://edk2.groups.io/g/devel/message/87454
Mute This Topic: https://groups.io/mt/89685482/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to