From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.68.84; helo=eur02-he1-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068084.outbound.protection.outlook.com [40.92.68.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 712CF21BADAB3 for ; Mon, 23 Jul 2018 18:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ynwy0YkDYa9g6NqzrAJ+SJMaVq8aCzI1bY2FnIHHYfU=; b=gNOpjF5VUy4VGrp5ufANPdKt5Q82qA1fMXQLMarzVuDzROJXXygdxIJ4y1tFtLslUoCt8FXDHtXzWuAGqjfJuVaxgDL0DMN4LevEbY2Qg/OZaiEDrRcF062ExfYGWKA6k0RxbwTsw5nWdqB1a/WCymEzrJc54IlQyWWz1j4RYZTL7t6ESOcJrrTRDZCdd+1CLIOgagVPEfdvDO/yiRsRvtaN+G7KKVFpKn/jP70A50+h1OCOnvJOpOA+5x5hsKiuQ0ckQKNa+GQSeuC0i/znvn6tSWY2dzjAC4sPOXzysfa5pcIkFl7TfpMrij44Vdrprq9axxh7KY4tLewb+wXalw== Received: from HE1EUR02FT023.eop-EUR02.prod.protection.outlook.com (10.152.10.54) by HE1EUR02HT111.eop-EUR02.prod.protection.outlook.com (10.152.11.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.995.12; Tue, 24 Jul 2018 01:40:36 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.10.55) by HE1EUR02FT023.mail.protection.outlook.com (10.152.10.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.995.12 via Frontend Transport; Tue, 24 Jul 2018 01:40:36 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765%2]) with mapi id 15.20.0973.022; Tue, 24 Jul 2018 01:40:36 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "michael.d.kinney@intel.com" , "liming.gao@intel.com" , "star.zeng@intel.com" , "eric.dong@intel.com" , "ruiyu.ni@intel.com" , "lersek@redhat.com" , "kelly.steele@intel.com" , "jordan.l.justen@intel.com" , "ard.biesheuvel@linaro.org" Thread-Topic: [PATCH 3/8] UefiCpuPkg/PiSmmCommunicationPei: Update MM PPI usages. Thread-Index: AQHUIu9R+xBqx62ie0aiMr5IxzeKPA== Date: Tue, 24 Jul 2018 01:40:36 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::35) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:46589FC8CCDE2B345B6E329747AE9EEC1AD0E2806B5220990807E86095CE5365; UpperCasedChecksum:C86B7FFFEEE30267F76152D5688AC7B454085B273CCBB9F75B836917DFC84596; SizeAsReceived:8047; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [rqc51otBC5GJZA9ZqLxOLoSNVsiVZOTK] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT111; 6:EzmODImhJn0VulUYaVbJJFWLnbjtjHmpCjj0etJ1YMJB0JNsK/yGtUngFtytdelwI22Ys2UgxGYrOQ7qZfmSsDJ4VN3moOqtFnB0AzhR8U48bdt9tW/EC9j47weoUwq267dHJvr4paZ/4R4Og3IIzEgFcLiG53DwkEHm0y5/fW0sMJeQEyzbweggjxxhbdnseQiwC2kwiX/8CTkQNq4vZ4xZDJcCh1rm1mE1mzg/uePkbLQO8K0Jy0z5knueZLS9mC/h8WfNMwhYLbCv7A0VMEv8qfZrwwiOH6dY61xFSJHr4l3NJC6I8qTtqBvYn2GctPBF6oYP+45c3bnGHuvqC7+4Hy+SgXfAfvQew6ejl4HSIBK9mkQX1GjfrknDEctz4n5QPjJbxFapTSJLwmNumRjzcM9FkVu3ons1kxwl6tKpXxDGYaWWVyiRkcrQZJLD0mqtaPj9Bi1fWPbFRxWZ9w==; 5:Dtril8gA4fgWf3FLkfBnhLxaE+uWOfylvudA0eh+FD2b55C1yvQOCZW35z0BQHFoIqcQmMhpNpVJjOzEJc5JgsuNnlgaY0+0NdsCenXoEP7inNWLsPgYpRKl3j+fI/ccqUANNwAcVcdxQNTeDbEAuFUG8F9gE0p+ww/nJWR4VA8=; 7:aRG5c45ME2bqjR9tjKYl+fkfDHn6eIZa9/ZcF8s+QmDbn1FWVBChoj6QTE3E0N4Mquz5e6wTxxuaeO8hVdau15K1g96H3YV6CaxT8Km9/7hV6CD56Xefh9lr8YDf3d0Q+NM3YBPpS3V5sYcUAjNvAjmx0xpefq1EQqpyVtPxKBHGzwozE2OguxrqegJunBqWqUyPa+TLaoDbr2mMuqHyfaX5l69CJ8aw1WFgzPBrpMvfGKglwrBaRsQuURtXriZS x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125500)(1701031045); SRVR:HE1EUR02HT111; x-ms-traffictypediagnostic: HE1EUR02HT111: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:HE1EUR02HT111; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT111; x-forefront-prvs: 0743E8D0A6 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(6029001)(189003)(199004)(81156014)(33656002)(386003)(8676002)(68736007)(26005)(6346003)(102836004)(8936002)(106356001)(105586002)(7696005)(2351001)(25786009)(14454004)(4326008)(15650500001)(305945005)(74316002)(72206003)(76176011)(7416002)(6436002)(486006)(5640700003)(104016004)(82202002)(476003)(99286004)(86362001)(5250100002)(55016002)(2900100001)(2501003)(256004)(426003)(6916009)(14444005)(20460500001)(87572001)(446003)(19627235002)(5660300001)(97736004)(11346002)(54906003)(56003); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT111; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: Z4fe4bBEvlT3FF6mvKh2/3N4QdOHcHz43L5eX7ntRvYiEs6CsRRB8bsCj1oiRiJV77wBEMlaf4FUYVIcZ20hy/wwRWMP45JJeD09WNYj1H+sZQx0bABWauHi8fxMqwZRpXl4FBewQ+pj0ReqfmJVfp+jnAcxnpyorgXd1ty4WnU9rZmQsGEvMFRjzlaBpk8BB9LeP4tmapTRs5avO6LR/4jI+zxICCLX6+w/kDFRnYE= MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: d7e911be-9444-407c-e105-08d5f10673f1 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 01:40:36.6888 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT111 Subject: [PATCH 3/8] UefiCpuPkg/PiSmmCommunicationPei: Update MM PPI usages. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 01:40:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Update all references to the SMM PPIs from MdeModulePkg to rather use MdePkg's MM PPI declarations. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.c | 70 ++++++++++---= ------- UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c | 4 +- UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf | 10 +-- UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf | 2 +- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.c b/UefiCp= uPkg/PiSmmCommunication/PiSmmCommunicationPei.c index aaeaa0672939..5c90f5193185 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.c +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.c @@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #include #include -#include -#include -#include +#include +#include +#include #include =20 #include "PiSmmCommunicationPrivate.h" @@ -113,7 +113,7 @@ typedef EFI_CONFIGURATION_TABLE EFI_CONFIGURATION_TABLE= 64; =20 This function provides a service to send and receive messages from a reg= istered UEFI service. =20 - @param[in] This The EFI_PEI_SMM_COMMUNICATION_PPI instanc= e. + @param[in] This The EFI_PEI_MM_COMMUNICATION_PPI instance= . @param[in, out] CommBuffer A pointer to the buffer to convey into SM= RAM. @param[in, out] CommSize The size of the data buffer being passed = in.On exit, the size of data being returned. Zero if the handler does = not wish to reply with any data. @@ -125,17 +125,17 @@ typedef EFI_CONFIGURATION_TABLE EFI_CONFIGURATION_TAB= LE64; EFI_STATUS EFIAPI Communicate ( - IN CONST EFI_PEI_SMM_COMMUNICATION_PPI *This, + IN CONST EFI_PEI_MM_COMMUNICATION_PPI *This, IN OUT VOID *CommBuffer, IN OUT UINTN *CommSize ); =20 -EFI_PEI_SMM_COMMUNICATION_PPI mSmmCommunicationPpi =3D { Communicate = }; +EFI_PEI_MM_COMMUNICATION_PPI mMmCommunicationPpi =3D { Communicate }= ; =20 EFI_PEI_PPI_DESCRIPTOR mPpiList =3D { (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), - &gEfiPeiSmmCommunicationPpiGuid, - &mSmmCommunicationPpi + &gEfiPeiMmCommunicationPpiGuid, + &mMmCommunicationPpi }; =20 /** @@ -151,7 +151,7 @@ GetCommunicationContext ( EFI_HOB_GUID_TYPE *GuidHob; EFI_SMM_COMMUNICATION_CONTEXT *SmmCommunicationContext; =20 - GuidHob =3D GetFirstGuidHob (&gEfiPeiSmmCommunicationPpiGuid); + GuidHob =3D GetFirstGuidHob (&gEfiPeiMmCommunicationPpiGuid); ASSERT (GuidHob !=3D NULL); =20 SmmCommunicationContext =3D (EFI_SMM_COMMUNICATION_CONTEXT *)GET_GUID_HO= B_DATA (GuidHob); @@ -174,7 +174,7 @@ SetCommunicationContext ( =20 BufferSize =3D sizeof (*SmmCommunicationContext); Hob.Raw =3D BuildGuidHob ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, BufferSize ); ASSERT (Hob.Raw); @@ -257,7 +257,7 @@ InitCommunicationContext ( SmmCommunicationContext =3D (EFI_SMM_COMMUNICATION_CONTEXT *)InternalSms= tGetVendorTableByGuid ( SmmS3Resume= State->Signature, (EFI_SMM_SY= STEM_TABLE2 *)(UINTN)SmmS3ResumeState->Smst, - &gEfiPeiSmm= CommunicationPpiGuid + &gEfiPeiMmC= ommunicationPpiGuid ); ASSERT (SmmCommunicationContext !=3D NULL); =20 @@ -271,7 +271,7 @@ InitCommunicationContext ( =20 This function provides a service to send and receive messages from a reg= istered UEFI service. =20 - @param[in] This The EFI_PEI_SMM_COMMUNICATION_PPI instanc= e. + @param[in] This The EFI_PEI_MM_COMMUNICATION_PPI instance= . @param[in, out] CommBuffer A pointer to the buffer to convey into SM= RAM. @param[in, out] CommSize The size of the data buffer being passed = in.On exit, the size of data being returned. Zero if the handler does = not wish to reply with any data. @@ -283,14 +283,14 @@ InitCommunicationContext ( EFI_STATUS EFIAPI Communicate ( - IN CONST EFI_PEI_SMM_COMMUNICATION_PPI *This, + IN CONST EFI_PEI_MM_COMMUNICATION_PPI *This, IN OUT VOID *CommBuffer, IN OUT UINTN *CommSize ) { EFI_STATUS Status; - PEI_SMM_CONTROL_PPI *SmmControl; - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_CONTROL_PPI *MmControl; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINT8 SmiCommand; UINTN Size; EFI_SMM_COMMUNICATION_CONTEXT *SmmCommunicationContext; @@ -305,20 +305,20 @@ Communicate ( // Get needed resource // Status =3D PeiServicesLocatePpi ( - &gPeiSmmControlPpiGuid, + &gEfiPeiMmControlPpiGuid, 0, NULL, - (VOID **)&SmmControl + (VOID **)&MmControl ); if (EFI_ERROR (Status)) { return EFI_NOT_STARTED; } =20 Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (EFI_ERROR (Status)) { return EFI_NOT_STARTED; @@ -327,8 +327,8 @@ Communicate ( // // Check SMRAM locked, it should be done after SMRAM lock. // - if (!SmmAccess->LockState) { - DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)S= mmAccess->LockState)); + if (!MmAccess->LockState) { + DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)M= mAccess->LockState)); return EFI_NOT_STARTED; } =20 @@ -346,14 +346,14 @@ Communicate ( // SmiCommand =3D (UINT8)SmmCommunicationContext->SwSmiNumber; Size =3D sizeof(SmiCommand); - Status =3D SmmControl->Trigger ( - (EFI_PEI_SERVICES **)GetPeiServicesTablePointer (= ), - SmmControl, - (INT8 *)&SmiCommand, - &Size, - FALSE, - 0 - ); + Status =3D MmControl->Trigger ( + (EFI_PEI_SERVICES **)GetPeiServicesTablePointer ()= , + MmControl, + (INT8 *)&SmiCommand, + &Size, + FALSE, + 0 + ); ASSERT_EFI_ERROR (Status); =20 // @@ -383,7 +383,7 @@ PiSmmCommunicationPeiEntryPoint ( ) { EFI_STATUS Status; - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; EFI_BOOT_MODE BootMode; UINTN Index; =20 @@ -393,10 +393,10 @@ PiSmmCommunicationPeiEntryPoint ( } =20 Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (EFI_ERROR (Status)) { return EFI_NOT_STARTED; @@ -405,8 +405,8 @@ PiSmmCommunicationPeiEntryPoint ( // // Check SMRAM locked, it should be done before SMRAM lock. // - if (SmmAccess->LockState) { - DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)S= mmAccess->LockState)); + if (MmAccess->LockState) { + DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)M= mAccess->LockState)); return EFI_ACCESS_DENIED; } =20 @@ -414,7 +414,7 @@ PiSmmCommunicationPeiEntryPoint ( // Open all SMRAM // for (Index =3D 0; !EFI_ERROR (Status); Index++) { - Status =3D SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePo= inter (), SmmAccess, Index); + Status =3D MmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePoi= nter (), MmAccess, Index); } =20 InitCommunicationContext (); diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c b/UefiCp= uPkg/PiSmmCommunication/PiSmmCommunicationSmm.c index 2b395f38da64..5f747f04a34d 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c @@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #include #include -#include +#include =20 #include "PiSmmCommunicationPrivate.h" =20 @@ -43,7 +43,7 @@ SetCommunicationContext ( =20 Status =3D gSmst->SmmInstallConfigurationTable ( gSmst, - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, &mSmmCommunicationContext, sizeof(mSmmCommunicationContext) ); diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf b/Uefi= CpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf index 5cb596c5644d..aff80009fcb7 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf @@ -54,16 +54,16 @@ [Guids] [Ppis] ## PRODUCES ## UNDEFINED # HOB # SMM Configuration Table - gEfiPeiSmmCommunicationPpiGuid - gPeiSmmAccessPpiGuid ## CONSUMES - gPeiSmmControlPpiGuid ## CONSUMES + gEfiPeiMmCommunicationPpiGuid + gEfiPeiMmAccessPpiGuid ## CONSUMES + gEfiPeiMmControlPpiGuid ## CONSUMES =20 # [BootMode] # S3_RESUME ## CONSUMES =20 [Depex] - gPeiSmmAccessPpiGuid AND - gPeiSmmControlPpiGuid AND + gEfiPeiMmAccessPpiGuid AND + gEfiPeiMmControlPpiGuid AND gEfiPeiMasterBootModePpiGuid =20 [UserExtensions.TianoCore."ExtraFiles"] diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf b/Uefi= CpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf index 67799e9436cd..598cc878a7cb 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf @@ -49,7 +49,7 @@ [LibraryClasses] SmmMemLib =20 [Ppis] - gEfiPeiSmmCommunicationPpiGuid ## UNDEFINED # SMM Configuration Tabl= e + gEfiPeiMmCommunicationPpiGuid ## UNDEFINED # SMM Configuration Tabl= e =20 [Protocols] gEfiSmmSwDispatch2ProtocolGuid ## CONSUMES --=20 2.18.0.windows.1