summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2017-12-08 17:36:09 +0800
committerStar Zeng <star.zeng@intel.com>2017-12-12 18:30:05 +0800
commita85e7127bf40e24401f841814e0aac850038e4d2 (patch)
treeca8a5a0be8dcc598c54a4c752a6cc6981567fde7
parent8c721557687f7fd650920591bbeb598e9b6ff5ce (diff)
downloadedk2-a85e7127bf40e24401f841814e0aac850038e4d2.tar.gz
edk2-a85e7127bf40e24401f841814e0aac850038e4d2.tar.bz2
edk2-a85e7127bf40e24401f841814e0aac850038e4d2.zip
MdeModulePkg: Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuid
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>
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmCore.c10
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmCore.h2
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf2
-rw-r--r--MdeModulePkg/Include/Guid/EndOfS3Resume.h (renamed from MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h)12
-rw-r--r--MdeModulePkg/MdeModulePkg.dec6
-rw-r--r--UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c9
-rw-r--r--UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf6
7 files changed, 22 insertions, 25 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
index 4c1e3e7195..0b9c7958c7 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
@@ -81,7 +81,7 @@ SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers[] = {
{ SmmExitBootServicesHandler, &gEfiEventExitBootServicesGuid, NULL, FALSE },
{ SmmReadyToBootHandler, &gEfiEventReadyToBootGuid, NULL, FALSE },
{ SmmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, TRUE },
- { SmmEndOfS3ResumeHandler, &gEdkiiSmmEndOfS3ResumeProtocolGuid, NULL, FALSE },
+ { SmmEndOfS3ResumeHandler, &gEdkiiEndOfS3ResumeGuid, NULL, FALSE },
{ NULL, NULL, NULL, FALSE }
};
@@ -384,7 +384,7 @@ SmmEndOfDxeHandler (
}
/**
- Software SMI handler that is called when the EndOfS3Resume event is trigged.
+ Software SMI handler that is called when the EndOfS3Resume signal is triggered.
This function installs the SMM EndOfS3Resume Protocol so SMM Drivers are informed that
S3 resume has finished.
@@ -417,19 +417,19 @@ SmmEndOfS3ResumeHandler (
SmmHandle = NULL;
Status = SmmInstallProtocolInterface (
&SmmHandle,
- &gEdkiiSmmEndOfS3ResumeProtocolGuid,
+ &gEdkiiEndOfS3ResumeGuid,
EFI_NATIVE_INTERFACE,
NULL
);
ASSERT_EFI_ERROR (Status);
//
- // Uninstall the protocol here because the comsume just hook the
+ // Uninstall the protocol here because the comsumer just hook the
// installation event.
//
Status = SmmUninstallProtocolInterface (
SmmHandle,
- &gEdkiiSmmEndOfS3ResumeProtocolGuid,
+ &gEdkiiEndOfS3ResumeGuid,
NULL
);
ASSERT_EFI_ERROR (Status);
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
index cdc491c324..2729a434d8 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
@@ -32,7 +32,6 @@
#include <Protocol/SmmExitBootServices.h>
#include <Protocol/SmmLegacyBoot.h>
#include <Protocol/SmmReadyToBoot.h>
-#include <Protocol/SmmEndOfS3Resume.h>
#include <Protocol/SmmMemoryAttribute.h>
#include <Guid/Apriori.h>
@@ -41,6 +40,7 @@
#include <Guid/MemoryProfile.h>
#include <Guid/LoadModuleAtFixedAddress.h>
#include <Guid/SmiHandlerProfile.h>
+#include <Guid/EndOfS3Resume.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
index 01d706d0e3..de0037fe4a 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
@@ -81,7 +81,6 @@
gEdkiiSmmExitBootServicesProtocolGuid ## SOMETIMES_PRODUCES
gEdkiiSmmLegacyBootProtocolGuid ## SOMETIMES_PRODUCES
gEdkiiSmmReadyToBootProtocolGuid ## PRODUCES
- gEdkiiSmmEndOfS3ResumeProtocolGuid ## SOMETIMES_PRODUCES
gEfiSmmSwDispatch2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiSmmSxDispatch2ProtocolGuid ## SOMETIMES_CONSUMES
@@ -123,6 +122,7 @@
## SOMETIMES_PRODUCES ## GUID # Install protocol
## SOMETIMES_PRODUCES ## GUID # SmiHandlerRegister
gSmiHandlerProfileGuid
+ gEdkiiEndOfS3ResumeGuid ## SOMETIMES_PRODUCES ## GUID # Install protocol
[UserExtensions.TianoCore."ExtraFiles"]
PiSmmCoreExtra.uni
diff --git a/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h b/MdeModulePkg/Include/Guid/EndOfS3Resume.h
index 9716f6a22a..853aa1afbc 100644
--- a/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h
+++ b/MdeModulePkg/Include/Guid/EndOfS3Resume.h
@@ -1,6 +1,6 @@
/** @file
- This Protocol will be installed at the end of S3 resume phase in SMM environment.
- It allows for smm drivers to hook this point and do the requried tasks.
+ This GUID will be installed at the end of S3 resume phase as protocol in SMM environment.
+ It allows for SMM drivers to hook this point and do the required tasks.
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -13,14 +13,14 @@
**/
-#ifndef __SMM_END_OF_S3_RESUME_H__
-#define __SMM_END_OF_S3_RESUME_H__
+#ifndef __END_OF_S3_RESUME_H__
+#define __END_OF_S3_RESUME_H__
-#define EDKII_SMM_END_OF_S3_RESUME_PROTOCOL_GUID \
+#define EDKII_END_OF_S3_RESUME_GUID \
{ \
0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } \
}
-extern EFI_GUID gEdkiiSmmEndOfS3ResumeProtocolGuid;
+extern EFI_GUID gEdkiiEndOfS3ResumeGuid;
#endif
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index b3831a21ad..8efad57766 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -392,6 +392,9 @@
## Include/Guid/PlatformHasAcpi.h
gEdkiiPlatformHasAcpiGuid = { 0xf0966b41, 0xc23f, 0x41b9, { 0x96, 0x04, 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } }
+ ## Include/Guid/EndofS3Resume.h
+ gEdkiiEndOfS3ResumeGuid = { 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } }
+
[Ppis]
## Include/Ppi/AtaController.h
gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
@@ -556,9 +559,6 @@
## Include/Protocol/IoMmu.h
gEdkiiIoMmuProtocolGuid = { 0x4e939de9, 0xd948, 0x4b0f, { 0x88, 0xed, 0xe6, 0xe1, 0xce, 0x51, 0x7c, 0x1e } }
- ## Include/Protocol/SmmEndofS3Resume.h
- gEdkiiSmmEndOfS3ResumeProtocolGuid = { 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } }
-
## Include/Protocol/SmmMemoryAttribute.h
gEdkiiSmmMemoryAttributeProtocolGuid = { 0x69b792ea, 0x39ce, 0x402d, { 0xa2, 0xa6, 0xf7, 0x21, 0xde, 0x35, 0x1d, 0xfe } }
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index e0c2d366cd..b597ac7dc5 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -23,6 +23,7 @@
#include <Guid/AcpiS3Context.h>
#include <Guid/BootScriptExecutorVariable.h>
#include <Guid/Performance.h>
+#include <Guid/EndOfS3Resume.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/S3Resume2.h>
#include <Ppi/SmmAccess.h>
@@ -30,8 +31,6 @@
#include <Ppi/EndOfPeiPhase.h>
#include <Ppi/SmmCommunication.h>
-#include <Protocol/SmmEndOfS3Resume.h>
-
#include <Library/DebugLib.h>
#include <Library/BaseLib.h>
#include <Library/TimerLib.h>
@@ -156,7 +155,7 @@ typedef union {
//
// Define two type of smm communicate headers.
-// One for 32 bits PEI + 64 bits DXE, the other for 32 bits PEI + 32 bits DXE case.
+// One for 32 bits PEI + 64 bits DXE, the other for 32 bits PEI + 32 bits DXE case.
//
typedef struct {
EFI_GUID HeaderGuid;
@@ -471,7 +470,7 @@ SignalEndOfS3Resume (
// This buffer consumed in DXE phase, so base on DXE mode to prepare communicate buffer.
// Detect whether DXE is 64 bits mode.
// if (sizeof(UINTN) == sizeof(UINT64), PEI already 64 bits, assume DXE also 64 bits.
- // or (FeaturePcdGet (PcdDxeIplSwitchToLongMode)), Dxe will switch to 64 bits.
+ // or (FeaturePcdGet (PcdDxeIplSwitchToLongMode)), DXE will switch to 64 bits.
//
if ((sizeof(UINTN) == sizeof(UINT64)) || (FeaturePcdGet (PcdDxeIplSwitchToLongMode))) {
CommBuffer = &Header64;
@@ -482,7 +481,7 @@ SignalEndOfS3Resume (
Header32.MessageLength = 0;
CommSize = OFFSET_OF (SMM_COMMUNICATE_HEADER_32, Data);
}
- CopyGuid (CommBuffer, &gEdkiiSmmEndOfS3ResumeProtocolGuid);
+ CopyGuid (CommBuffer, &gEdkiiEndOfS3ResumeGuid);
Status = PeiServicesLocatePpi (
&gEfiPeiSmmCommunicationPpiGuid,
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
index 943f114e69..15fa2d1543 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
@@ -5,7 +5,7 @@
# This module will excute the boot script saved during last boot and after that,
# control is passed to OS waking up handler.
#
-# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
#
# This program and the accompanying materials are
@@ -78,6 +78,7 @@
## SOMETIMES_CONSUMES ## UNDEFINED # LockBox
gEfiAcpiVariableGuid
gEfiAcpiS3ContextGuid ## SOMETIMES_CONSUMES ## UNDEFINED # LockBox
+ gEdkiiEndOfS3ResumeGuid ## SOMETIMES_CONSUMES ## UNDEFINED # Used to do smm communication
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
@@ -87,9 +88,6 @@
gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES
gEfiPeiSmmCommunicationPpiGuid ## SOMETIMES_CONSUMES
-[Protocols]
- gEdkiiSmmEndOfS3ResumeProtocolGuid ## SOMETIMES_CONSUMES
-
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES