]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuid
authorStar Zeng <star.zeng@intel.com>
Fri, 8 Dec 2017 09:36:09 +0000 (17:36 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 12 Dec 2017 10:30:05 +0000 (18:30 +0800)
Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuid as the GUID
may be used to install PPI in future to notify PEI phase code.

The references in UefiCpuPkg are also being updated.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
MdeModulePkg/Include/Guid/EndOfS3Resume.h [new file with mode: 0644]
MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h [deleted file]
MdeModulePkg/MdeModulePkg.dec
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf

index 4c1e3e7195241349b926d46d1fcc8a48b80d76fb..0b9c7958c75c0f27ae2980ad191571a62fd1cf2f 100644 (file)
@@ -81,7 +81,7 @@ SMM_CORE_SMI_HANDLERS  mSmmCoreSmiHandlers[] = {
   { SmmExitBootServicesHandler, &gEfiEventExitBootServicesGuid,      NULL, FALSE },\r
   { SmmReadyToBootHandler,      &gEfiEventReadyToBootGuid,           NULL, FALSE },\r
   { SmmEndOfDxeHandler,         &gEfiEndOfDxeEventGroupGuid,         NULL, TRUE },\r
-  { SmmEndOfS3ResumeHandler,    &gEdkiiSmmEndOfS3ResumeProtocolGuid, NULL, FALSE },\r
+  { SmmEndOfS3ResumeHandler,    &gEdkiiEndOfS3ResumeGuid,            NULL, FALSE },\r
   { NULL,                       NULL,                                NULL, FALSE }\r
 };\r
 \r
@@ -384,7 +384,7 @@ SmmEndOfDxeHandler (
 }\r
 \r
 /**\r
-  Software SMI handler that is called when the EndOfS3Resume event is trigged.\r
+  Software SMI handler that is called when the EndOfS3Resume signal is triggered.\r
   This function installs the SMM EndOfS3Resume Protocol so SMM Drivers are informed that\r
   S3 resume has finished.\r
 \r
@@ -417,19 +417,19 @@ SmmEndOfS3ResumeHandler (
   SmmHandle = NULL;\r
   Status = SmmInstallProtocolInterface (\r
              &SmmHandle,\r
-             &gEdkiiSmmEndOfS3ResumeProtocolGuid,\r
+             &gEdkiiEndOfS3ResumeGuid,\r
              EFI_NATIVE_INTERFACE,\r
              NULL\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
-  // Uninstall the protocol here because the comsume just hook the\r
+  // Uninstall the protocol here because the comsumer just hook the\r
   // installation event.\r
   //\r
   Status = SmmUninstallProtocolInterface (\r
            SmmHandle,\r
-           &gEdkiiSmmEndOfS3ResumeProtocolGuid,\r
+           &gEdkiiEndOfS3ResumeGuid,\r
            NULL\r
            );\r
   ASSERT_EFI_ERROR (Status);\r
index cdc491c324290cec80885ea9d2da40141d7fddcb..2729a434d8f88eca77685149fc7d4c76066e0238 100644 (file)
@@ -32,7 +32,6 @@
 #include <Protocol/SmmExitBootServices.h>\r
 #include <Protocol/SmmLegacyBoot.h>\r
 #include <Protocol/SmmReadyToBoot.h>\r
-#include <Protocol/SmmEndOfS3Resume.h>\r
 #include <Protocol/SmmMemoryAttribute.h>\r
 \r
 #include <Guid/Apriori.h>\r
@@ -41,6 +40,7 @@
 #include <Guid/MemoryProfile.h>\r
 #include <Guid/LoadModuleAtFixedAddress.h>\r
 #include <Guid/SmiHandlerProfile.h>\r
+#include <Guid/EndOfS3Resume.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index 01d706d0e312f36dac32cbb4787c26799c7112e4..de0037fe4a99533aee49bbe62718217a099a487d 100644 (file)
@@ -81,7 +81,6 @@
   gEdkiiSmmExitBootServicesProtocolGuid         ## SOMETIMES_PRODUCES\r
   gEdkiiSmmLegacyBootProtocolGuid               ## SOMETIMES_PRODUCES\r
   gEdkiiSmmReadyToBootProtocolGuid              ## PRODUCES\r
-  gEdkiiSmmEndOfS3ResumeProtocolGuid            ## SOMETIMES_PRODUCES\r
 \r
   gEfiSmmSwDispatch2ProtocolGuid                ## SOMETIMES_CONSUMES\r
   gEfiSmmSxDispatch2ProtocolGuid                ## SOMETIMES_CONSUMES\r
   ## SOMETIMES_PRODUCES   ## GUID # Install protocol\r
   ## SOMETIMES_PRODUCES   ## GUID # SmiHandlerRegister\r
   gSmiHandlerProfileGuid\r
+  gEdkiiEndOfS3ResumeGuid ## SOMETIMES_PRODUCES ## GUID # Install protocol\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   PiSmmCoreExtra.uni\r
diff --git a/MdeModulePkg/Include/Guid/EndOfS3Resume.h b/MdeModulePkg/Include/Guid/EndOfS3Resume.h
new file mode 100644 (file)
index 0000000..853aa1a
--- /dev/null
@@ -0,0 +1,26 @@
+/** @file\r
+  This GUID will be installed at the end of S3 resume phase as protocol in SMM environment. \r
+  It allows for SMM drivers to hook this point and do the required tasks.\r
+\r
+  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+**/\r
+\r
+#ifndef __END_OF_S3_RESUME_H__\r
+#define __END_OF_S3_RESUME_H__\r
+\r
+#define EDKII_END_OF_S3_RESUME_GUID \\r
+  { \\r
+    0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } \\r
+  }\r
+\r
+extern EFI_GUID gEdkiiEndOfS3ResumeGuid;\r
+\r
+#endif\r
diff --git a/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h b/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h
deleted file mode 100644 (file)
index 9716f6a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/** @file\r
-  This Protocol will be installed at the end of S3 resume phase in SMM environment. \r
-  It allows for smm drivers to hook this point and do the requried tasks.\r
-\r
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-**/\r
-\r
-#ifndef __SMM_END_OF_S3_RESUME_H__\r
-#define __SMM_END_OF_S3_RESUME_H__\r
-\r
-#define EDKII_SMM_END_OF_S3_RESUME_PROTOCOL_GUID \\r
-  { \\r
-    0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } \\r
-  }\r
-\r
-extern EFI_GUID gEdkiiSmmEndOfS3ResumeProtocolGuid;\r
-\r
-#endif\r
index b3831a21ad08740f4270501f7dd6533e48a21825..8efad57766a02ac81110bffbccc1c5ab81c2da38 100644 (file)
   ## Include/Guid/PlatformHasAcpi.h\r
   gEdkiiPlatformHasAcpiGuid = { 0xf0966b41, 0xc23f, 0x41b9, { 0x96, 0x04, 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } }\r
 \r
+  ## Include/Guid/EndofS3Resume.h\r
+  gEdkiiEndOfS3ResumeGuid = { 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } }\r
+\r
 [Ppis]\r
   ## Include/Ppi/AtaController.h\r
   gPeiAtaControllerPpiGuid       = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}\r
   ## Include/Protocol/IoMmu.h\r
   gEdkiiIoMmuProtocolGuid = { 0x4e939de9, 0xd948, 0x4b0f, { 0x88, 0xed, 0xe6, 0xe1, 0xce, 0x51, 0x7c, 0x1e } }\r
 \r
-  ## Include/Protocol/SmmEndofS3Resume.h\r
-  gEdkiiSmmEndOfS3ResumeProtocolGuid = { 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } }\r
-\r
   ## Include/Protocol/SmmMemoryAttribute.h\r
   gEdkiiSmmMemoryAttributeProtocolGuid = { 0x69b792ea, 0x39ce, 0x402d, { 0xa2, 0xa6, 0xf7, 0x21, 0xde, 0x35, 0x1d, 0xfe } }\r
 \r
index e0c2d366cd0de86918bc0e52d935656a7c39d273..b597ac7dc5ff2a52e5e933e0a76a9a7b4b493970 100644 (file)
@@ -23,6 +23,7 @@
 #include <Guid/AcpiS3Context.h>\r
 #include <Guid/BootScriptExecutorVariable.h>\r
 #include <Guid/Performance.h>\r
+#include <Guid/EndOfS3Resume.h>\r
 #include <Ppi/ReadOnlyVariable2.h>\r
 #include <Ppi/S3Resume2.h>\r
 #include <Ppi/SmmAccess.h>\r
@@ -30,8 +31,6 @@
 #include <Ppi/EndOfPeiPhase.h>\r
 #include <Ppi/SmmCommunication.h>\r
 \r
-#include <Protocol/SmmEndOfS3Resume.h>\r
-\r
 #include <Library/DebugLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/TimerLib.h>\r
@@ -156,7 +155,7 @@ typedef union {
 \r
 //\r
 // Define two type of smm communicate headers.\r
-// One for 32 bits  PEI + 64 bits DXE, the other for 32 bits PEI + 32 bits DXE case.\r
+// One for 32 bits PEI + 64 bits DXE, the other for 32 bits PEI + 32 bits DXE case.\r
 //\r
 typedef struct {\r
   EFI_GUID  HeaderGuid;\r
@@ -471,7 +470,7 @@ SignalEndOfS3Resume (
   // This buffer consumed in DXE phase, so base on DXE mode to prepare communicate buffer.\r
   // Detect whether DXE is 64 bits mode.\r
   // if (sizeof(UINTN) == sizeof(UINT64), PEI already 64 bits, assume DXE also 64 bits.\r
-  // or (FeaturePcdGet (PcdDxeIplSwitchToLongMode)), Dxe will switch to 64 bits.\r
+  // or (FeaturePcdGet (PcdDxeIplSwitchToLongMode)), DXE will switch to 64 bits.\r
   //\r
   if ((sizeof(UINTN) == sizeof(UINT64)) || (FeaturePcdGet (PcdDxeIplSwitchToLongMode))) {\r
     CommBuffer = &Header64;\r
@@ -482,7 +481,7 @@ SignalEndOfS3Resume (
     Header32.MessageLength = 0;\r
     CommSize = OFFSET_OF (SMM_COMMUNICATE_HEADER_32, Data);\r
   }\r
-  CopyGuid (CommBuffer, &gEdkiiSmmEndOfS3ResumeProtocolGuid);\r
+  CopyGuid (CommBuffer, &gEdkiiEndOfS3ResumeGuid);\r
 \r
   Status = PeiServicesLocatePpi (\r
              &gEfiPeiSmmCommunicationPpiGuid,\r
index 943f114e6932217c03247e21166c4740cd6db08e..15fa2d15431cff21e1b7acb6d9e2f754df596e09 100644 (file)
@@ -5,7 +5,7 @@
 # This module will excute the boot script saved during last boot and after that,\r
 # control is passed to OS waking up handler.\r
 #\r
-# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 # Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are\r
@@ -78,6 +78,7 @@
   ## SOMETIMES_CONSUMES ## UNDEFINED # LockBox\r
   gEfiAcpiVariableGuid\r
   gEfiAcpiS3ContextGuid                         ## SOMETIMES_CONSUMES ## UNDEFINED # LockBox\r
+  gEdkiiEndOfS3ResumeGuid                       ## SOMETIMES_CONSUMES ## UNDEFINED # Used to do smm communication\r
 \r
 [Ppis]\r
   gEfiPeiReadOnlyVariable2PpiGuid               ## CONSUMES\r
@@ -87,9 +88,6 @@
   gEfiEndOfPeiSignalPpiGuid                     ## SOMETIMES_PRODUCES\r
   gEfiPeiSmmCommunicationPpiGuid                ## SOMETIMES_CONSUMES\r
 \r
-[Protocols]\r
-  gEdkiiSmmEndOfS3ResumeProtocolGuid            ## SOMETIMES_CONSUMES\r
-\r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode         ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport  ## CONSUMES\r