]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c
MdeModulePkg/ResetSystemRuntimeDxe: Remove DoS3 in warm reset
[mirror_edk2.git] / MdeModulePkg / Universal / ResetSystemRuntimeDxe / ResetSystem.c
index 2c795426f51475348199e5763a45f0892986ba22..36234f4d5b2ae2cb040265e5676409c77ac5ca25 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Reset Architectural and Reset Notification protocols implementation.\r
 \r
-  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -162,9 +162,9 @@ RESET_NOTIFICATION_INSTANCE mPlatformSpecificResetHandler = {
 \r
   It initializes the Reset Architectural Protocol.\r
 \r
-  @param[in] ImageHandle  The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable  A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS     The entry point is executed successfully.\r
   @retval other           Cannot install ResetArch protocol.\r
 \r
@@ -187,7 +187,7 @@ InitializeResetSystem (
   //\r
   // Hook the runtime service table\r
   //\r
-  gRT->ResetSystem = ResetSystem;\r
+  gRT->ResetSystem = RuntimeServiceResetSystem;\r
 \r
   //\r
   // Now install the Reset RT AP on a new handle\r
@@ -206,22 +206,6 @@ InitializeResetSystem (
   return Status;\r
 }\r
 \r
-/**\r
-  Put the system into S3 power state.                            \r
-**/\r
-VOID\r
-DoS3 (\r
-  VOID\r
-  )\r
-{\r
-  EnterS3WithImmediateWake ();\r
-\r
-  //\r
-  // Should not return\r
-  //\r
-  CpuDeadLoop ();\r
-}\r
-\r
 /**\r
   Resets the entire platform.\r
 \r
@@ -242,21 +226,18 @@ DoS3 (
 **/\r
 VOID\r
 EFIAPI\r
-ResetSystem (\r
+RuntimeServiceResetSystem (\r
   IN EFI_RESET_TYPE   ResetType,\r
   IN EFI_STATUS       ResetStatus,\r
   IN UINTN            DataSize,\r
   IN VOID             *ResetData OPTIONAL\r
   )\r
 {\r
-  EFI_STATUS          Status;\r
-  UINTN               Size;\r
-  UINTN               CapsuleDataPtr;\r
   LIST_ENTRY          *Link;\r
   RESET_NOTIFY_ENTRY  *Entry;\r
 \r
   //\r
-  // Only do REPORT_STATUS_CODE() on first call to ResetSystem()\r
+  // Only do REPORT_STATUS_CODE() on first call to RuntimeServiceResetSystem()\r
   //\r
   if (mResetNotifyDepth == 0) {\r
     //\r
@@ -266,7 +247,10 @@ ResetSystem (
   }\r
 \r
   mResetNotifyDepth++;\r
-  DEBUG ((DEBUG_INFO, "DXE ResetSystem2: Reset call depth = %d.\n", mResetNotifyDepth));\r
+  DEBUG ((\r
+    DEBUG_INFO, "DXE ResetSystem2: ResetType %s, Call Depth = %d.\n",\r
+    mResetTypeStr[ResetType], mResetNotifyDepth\r
+    ));\r
 \r
   if (mResetNotifyDepth <= MAX_RESET_NOTIFY_DEPTH) {\r
     if (!EfiAtRuntime ()) {\r
@@ -293,7 +277,7 @@ ResetSystem (
         Entry->ResetNotify (ResetType, ResetStatus, DataSize, ResetData);\r
       }\r
       //\r
-      // call reset notification functions registered through the \r
+      // call reset notification functions registered through the\r
       // EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL.\r
       //\r
       for ( Link = GetFirstNode (&mPlatformSpecificResetHandler.ResetNotifies)\r
@@ -312,25 +296,6 @@ ResetSystem (
   switch (ResetType) {\r
   case EfiResetWarm:\r
 \r
-    //\r
-    //Check if there are pending capsules to process\r
-    //\r
-    Size = sizeof (CapsuleDataPtr);\r
-    Status =  EfiGetVariable (\r
-                 EFI_CAPSULE_VARIABLE_NAME,\r
-                 &gEfiCapsuleVendorGuid,\r
-                 NULL,\r
-                 &Size,\r
-                 (VOID *) &CapsuleDataPtr\r
-                 );\r
-\r
-    if (Status == EFI_SUCCESS) {\r
-      //\r
-      //Process capsules across a system reset.\r
-      //\r
-      DoS3();\r
-    }\r
-\r
     ResetWarm ();\r
     break;\r
 \r