From nobody Wed May 1 11:41:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1512981344914194.25291415906565; Mon, 11 Dec 2017 00:35:44 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0C2352218E952; Mon, 11 Dec 2017 00:31:06 -0800 (PST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DFA602214E358 for ; Mon, 11 Dec 2017 00:31:04 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 00:35:41 -0800 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga006.fm.intel.com with ESMTP; 11 Dec 2017 00:35:40 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="185883708" From: Star Zeng To: edk2-devel@lists.01.org Date: Mon, 11 Dec 2017 16:35:36 +0800 Message-Id: <1512981336-3508-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [PATCH] MdeModulePkg: Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuid X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laszlo Ersek , Jiewen Yao , Eric Dong , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Jiewen.yao@intel.com Reviewed-by: Laszlo Ersek --- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 10 +++++---= -- MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 2 +- MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 2 +- .../{Protocol/SmmEndOfS3Resume.h =3D> Guid/EndOfS3Resume.h} | 12 ++++++= ------ MdeModulePkg/MdeModulePkg.dec | 6 +++--- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 9 ++++----- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | 6 ++---- 7 files changed, 22 insertions(+), 25 deletions(-) rename MdeModulePkg/Include/{Protocol/SmmEndOfS3Resume.h =3D> Guid/EndOfS3= Resume.h} (67%) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/Pi= SmmCore/PiSmmCore.c index 4c1e3e719524..0b9c7958c75c 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -81,7 +81,7 @@ SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers[] =3D { { SmmExitBootServicesHandler, &gEfiEventExitBootServicesGuid, NULL,= FALSE }, { SmmReadyToBootHandler, &gEfiEventReadyToBootGuid, NULL,= FALSE }, { SmmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL,= TRUE }, - { SmmEndOfS3ResumeHandler, &gEdkiiSmmEndOfS3ResumeProtocolGuid, NULL,= FALSE }, + { SmmEndOfS3ResumeHandler, &gEdkiiEndOfS3ResumeGuid, NULL,= FALSE }, { NULL, NULL, NULL,= FALSE } }; =20 @@ -384,7 +384,7 @@ SmmEndOfDxeHandler ( } =20 /** - Software SMI handler that is called when the EndOfS3Resume event is trig= ged. + Software SMI handler that is called when the EndOfS3Resume signal is tri= ggered. This function installs the SMM EndOfS3Resume Protocol so SMM Drivers are= informed that S3 resume has finished. =20 @@ -417,19 +417,19 @@ SmmEndOfS3ResumeHandler ( SmmHandle =3D NULL; Status =3D SmmInstallProtocolInterface ( &SmmHandle, - &gEdkiiSmmEndOfS3ResumeProtocolGuid, + &gEdkiiEndOfS3ResumeGuid, EFI_NATIVE_INTERFACE, NULL ); ASSERT_EFI_ERROR (Status); =20 // - // Uninstall the protocol here because the comsume just hook the + // Uninstall the protocol here because the comsumer just hook the // installation event. // Status =3D SmmUninstallProtocolInterface ( SmmHandle, - &gEdkiiSmmEndOfS3ResumeProtocolGuid, + &gEdkiiEndOfS3ResumeGuid, NULL ); ASSERT_EFI_ERROR (Status); diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/Pi= SmmCore/PiSmmCore.h index cdc491c32429..2729a434d8f8 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h @@ -32,7 +32,6 @@ #include #include #include -#include #include =20 #include @@ -41,6 +40,7 @@ #include #include #include +#include =20 #include #include diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf b/MdeModulePkg/Core/= PiSmmCore/PiSmmCore.inf index 01d706d0e312..de0037fe4a99 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf @@ -81,7 +81,6 @@ [Protocols] gEdkiiSmmExitBootServicesProtocolGuid ## SOMETIMES_PRODUCES gEdkiiSmmLegacyBootProtocolGuid ## SOMETIMES_PRODUCES gEdkiiSmmReadyToBootProtocolGuid ## PRODUCES - gEdkiiSmmEndOfS3ResumeProtocolGuid ## SOMETIMES_PRODUCES =20 gEfiSmmSwDispatch2ProtocolGuid ## SOMETIMES_CONSUMES gEfiSmmSxDispatch2ProtocolGuid ## SOMETIMES_CONSUMES @@ -123,6 +122,7 @@ [Guids] ## SOMETIMES_PRODUCES ## GUID # Install protocol ## SOMETIMES_PRODUCES ## GUID # SmiHandlerRegister gSmiHandlerProfileGuid + gEdkiiEndOfS3ResumeGuid ## SOMETIMES_PRODUCES ## GUID # Install protocol =20 [UserExtensions.TianoCore."ExtraFiles"] PiSmmCoreExtra.uni diff --git a/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h b/MdeModulePk= g/Include/Guid/EndOfS3Resume.h similarity index 67% rename from MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h rename to MdeModulePkg/Include/Guid/EndOfS3Resume.h index 9716f6a22ac6..853aa1afbc17 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 env= ironment.=20 - 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.=20 + It allows for SMM drivers to hook this point and do the required tasks. =20 Copyright (c) 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials =20 @@ -13,14 +13,14 @@ =20 **/ =20 -#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__ =20 -#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 } \ } =20 -extern EFI_GUID gEdkiiSmmEndOfS3ResumeProtocolGuid; +extern EFI_GUID gEdkiiEndOfS3ResumeGuid; =20 #endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index b3831a21ad08..8efad57766a0 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -392,6 +392,9 @@ [Guids] ## Include/Guid/PlatformHasAcpi.h gEdkiiPlatformHasAcpiGuid =3D { 0xf0966b41, 0xc23f, 0x41b9, { 0x96, 0x04= , 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } } =20 + ## Include/Guid/EndofS3Resume.h + gEdkiiEndOfS3ResumeGuid =3D { 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0= xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } } + [Ppis] ## Include/Ppi/AtaController.h gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0,= 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} @@ -556,9 +559,6 @@ [Protocols] ## Include/Protocol/IoMmu.h gEdkiiIoMmuProtocolGuid =3D { 0x4e939de9, 0xd948, 0x4b0f, { 0x88, 0xed, = 0xe6, 0xe1, 0xce, 0x51, 0x7c, 0x1e } } =20 - ## Include/Protocol/SmmEndofS3Resume.h - gEdkiiSmmEndOfS3ResumeProtocolGuid =3D { 0x96f5296d, 0x05f7, 0x4f3c, {0x= 84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } } - ## Include/Protocol/SmmMemoryAttribute.h gEdkiiSmmMemoryAttributeProtocolGuid =3D { 0x69b792ea, 0x39ce, 0x402d, {= 0xa2, 0xa6, 0xf7, 0x21, 0xde, 0x35, 0x1d, 0xfe } } =20 diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg= /Universal/Acpi/S3Resume2Pei/S3Resume.c index e0c2d366cd0d..b597ac7dc5ff 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -30,8 +31,6 @@ #include #include =20 -#include - #include #include #include @@ -156,7 +155,7 @@ typedef union { =20 // // 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 com= municate buffer. // Detect whether DXE is 64 bits mode. // if (sizeof(UINTN) =3D=3D 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) =3D=3D sizeof(UINT64)) || (FeaturePcdGet (PcdDxeIplSw= itchToLongMode))) { CommBuffer =3D &Header64; @@ -482,7 +481,7 @@ SignalEndOfS3Resume ( Header32.MessageLength =3D 0; CommSize =3D OFFSET_OF (SMM_COMMUNICATE_HEADER_32, Data); } - CopyGuid (CommBuffer, &gEdkiiSmmEndOfS3ResumeProtocolGuid); + CopyGuid (CommBuffer, &gEdkiiEndOfS3ResumeGuid); =20 Status =3D PeiServicesLocatePpi ( &gEfiPeiSmmCommunicationPpiGuid, diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf b/Uefi= CpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf index 943f114e6932..15fa2d15431c 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.
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# # This program and the accompanying materials are @@ -78,6 +78,7 @@ [Guids] ## SOMETIMES_CONSUMES ## UNDEFINED # LockBox gEfiAcpiVariableGuid gEfiAcpiS3ContextGuid ## SOMETIMES_CONSUMES ## U= NDEFINED # LockBox + gEdkiiEndOfS3ResumeGuid ## SOMETIMES_CONSUMES ## U= NDEFINED # Used to do smm communication =20 [Ppis] gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES @@ -87,9 +88,6 @@ [Ppis] gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES gEfiPeiSmmCommunicationPpiGuid ## SOMETIMES_CONSUMES =20 -[Protocols] - gEdkiiSmmEndOfS3ResumeProtocolGuid ## SOMETIMES_CONSUMES - [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONS= UMES --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel