From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 BEDAD2218E95C for ; Mon, 11 Dec 2017 08:23:28 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E02821BBB; Mon, 11 Dec 2017 16:28:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-17.rdu2.redhat.com [10.10.121.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 261CC5C661; Mon, 11 Dec 2017 16:28:03 +0000 (UTC) To: Star Zeng , edk2-devel@lists.01.org Cc: Jiewen Yao , Eric Dong References: <1512981336-3508-1-git-send-email-star.zeng@intel.com> From: Laszlo Ersek Message-ID: <0fa6b8b3-a66f-5326-105f-50cb4ca8f6a5@redhat.com> Date: Mon, 11 Dec 2017 17:28:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1512981336-3508-1-git-send-email-star.zeng@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 11 Dec 2017 16:28:05 +0000 (UTC) Subject: Re: [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: , X-List-Received-Date: Mon, 11 Dec 2017 16:23:28 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 12/11/17 09:35, Star Zeng wrote: > 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 > --- > MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 10 +++++----- > MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 2 +- > MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 2 +- > .../{Protocol/SmmEndOfS3Resume.h => 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 => Guid/EndOfS3Resume.h} (67%) > > diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/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[] = { > { 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 cdc491c32429..2729a434d8f8 100644 > --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h > +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h > @@ -32,7 +32,6 @@ > #include > #include > #include > -#include > #include > > #include > @@ -41,6 +40,7 @@ > #include > #include > #include > +#include > > #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 > > 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 > > [UserExtensions.TianoCore."ExtraFiles"] > PiSmmCoreExtra.uni > diff --git a/MdeModulePkg/Include/Protocol/SmmEndOfS3Resume.h b/MdeModulePkg/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 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.
> 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 b3831a21ad08..8efad57766a0 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -392,6 +392,9 @@ [Guids] > ## 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 @@ [Protocols] > ## 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 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 > > -#include > - > #include > #include > #include > @@ -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 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 ## UNDEFINED # LockBox > + gEdkiiEndOfS3ResumeGuid ## SOMETIMES_CONSUMES ## UNDEFINED # Used to do smm communication > > [Ppis] > gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES > @@ -87,9 +88,6 @@ [Ppis] > gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES > gEfiPeiSmmCommunicationPpiGuid ## SOMETIMES_CONSUMES > > -[Protocols] > - gEdkiiSmmEndOfS3ResumeProtocolGuid ## SOMETIMES_CONSUMES > - > [FeaturePcd] > gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES > gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES > Reviewed-by: Laszlo Ersek