From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.57; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067057.outbound.protection.outlook.com [40.92.67.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DEC7B21BADAB2 for ; Mon, 23 Jul 2018 18:40:39 -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=fOkmCt+78YNCYfrblV0K6eMk2fbt/y4uDayCPzgQ+s0=; b=E+EO0VYsR6klIFOscs8S4eNUxTx9yqAQ7LlZSfaDsoiFw3vryamu6NzXMZWpjky5vEjAtk5qwEf+J5sZsOFw8rO6y7tlW7PoFXFS2xtEpaBH/qaKdcTX6ZSeH8OP3sbkUfU9McAY71ag07RO4yzqmMf4ghouet/rSLWYNMhotVJwwAWOYzaCp1K3rRc7DGrZj45SFnlWhSIqYlJ1Kx3YvLJFHs6yEjflDPNH+Lf/ZRcpvte7A897M8oBAKV6zkAPutKR2vguzqlu1pv8InPHIxQB/02fu/c8bnlKzAayM0dMeFHzJa/DPzoJBYkXyc1l/7kFA2Aw0p1uCC8ak8YiJg== Received: from HE1EUR02FT023.eop-EUR02.prod.protection.outlook.com (10.152.10.59) by HE1EUR02HT037.eop-EUR02.prod.protection.outlook.com (10.152.11.189) 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:35 +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:35 +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 2/8] MdeModulePkg/SmmLockBoxPeiLib: Update MM PPI usages. Thread-Index: AQHUIu9R7+7jUoQbjUG5RlAHTdFPDQ== Date: Tue, 24 Jul 2018 01:40:35 +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:10BAD067F22E7B3882CC51C0DD8691F7C748F52D031911D7C8A2C386A1C1AE01; UpperCasedChecksum:0DA6F4A24A1B705624A24AC370B1962DB803E87163B4CA898B765500462A4396; SizeAsReceived:8040; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [tGu+/0dcUDn+8XsgjPIwlXqCBcIkuIej] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT037; 6:s4zqCGmvSzhO8L9+FwO2Nu0s3NjU8rIkm1cQQAVqj2N6gpWlqG/sMi4izDr8tQTR0aIJiImqQsCm9WuFdyOgEh7EqTBBIHgcuVx20STAoqvDTFgAWQ/CfWDrB1LpTnZLISwzWrAG9S9Ehb4PZGvApgzRGfp6ugevrw9j2Cr0uCaHDsE2xpMmfmkxyt8izKSihLppfRNz7pO8FZBIpHDSLEOQFO6Y6B/uo8Tizk2au4QkBVwlTV7mYDS1oSSuFbPXGv/ThVWTtrp5EDUXNDNNQezsM2A21HFUcDF8XKEo+l0JQJDYj4BV7nUHze0IzZAQVvutCisCsD6vvMOcXxAnKmyjzuX+3fEbC7QtqhRt+mVf/qZLZdA3ipV5Cb8D+EUy5OngyrqK4OIl9wRpzBnsvOGShpaRwyUVchVUBtLKUIWq8pprdm8XKmNOl7Pn+24yH+yDFsrQMdPgvy7FWIJexw==; 5:r+QKPLL9b7iRenJGzem6BKB9t6ooaHqgeDLWjPt1vLjHcz27ff+teMs4PErNRHZK1ayhBXbUglLjLkJzFKOP9a1WEoMOJEFiXJpwfKrhpsweQRFmWxncOvrsPDE+AQ7DJzTcU9x8knSvYzWEp1QgP8WKV0+tJcG7N4mY/R0G6Z0=; 7:l/JModFagPabjpxd89d2yiUEBWLcdWz2nw7xeWlQNHoha5Jzjv0sbQCC+ncz4q7q+Ng2vFQDM/tiDRDGU95o5N03RbZRGorbKq7I3MztxVjYq9Q5zLoDIr3NEfFL1s09Wk3FUOWyJZPSvBtKnBKDLYJXbTEhy9Zsz2iXDvHWEw80rLR3vNWJMR79YghhBqIY85ZeI2F56kjp0/uZBp0Ld5PkB8yInYLLvABf6z+d+fgIolhaCUcsxWB5Imy2Gois 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:HE1EUR02HT037; x-ms-traffictypediagnostic: HE1EUR02HT037: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:HE1EUR02HT037; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT037; x-forefront-prvs: 0743E8D0A6 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(189003)(199004)(82202002)(8676002)(81156014)(446003)(87572001)(4326008)(86362001)(54906003)(74316002)(426003)(305945005)(99286004)(55016002)(386003)(5660300001)(6916009)(7696005)(33656002)(7416002)(26005)(20460500001)(68736007)(76176011)(104016004)(105586002)(6346003)(106356001)(5640700003)(2351001)(8936002)(15650500001)(486006)(11346002)(102836004)(476003)(5250100002)(97736004)(2501003)(14444005)(14454004)(72206003)(2900100001)(56003)(575784001)(25786009)(256004)(6436002)(213903007); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT037; 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: +NrGeNFrSb/3vfix74XiVsQDKDsxyXwU3BtBF+oB79Ayw6m69Df2nBp7kfw4qcwtnbjSLx0Col8244hXMkrkR6iEFshMiWPFmEVVcjiPlVYepnbHo9kcsOiVebbW8+5l+5mdhbw2FvBVVjnJoCU5mjJ1RVujR3qN+ImcuLv2CZNgLtL2YttdiFqTcTfWqkwTWfCBt7U2SAScizde/P/+QpdssT4Ohj3tu7A9b5q1gYE= 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: 1f51e2a3-d801-468a-41c8-08d5f1067361 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 01:40:35.6649 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT037 Subject: [PATCH 2/8] MdeModulePkg/SmmLockBoxPeiLib: 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:40 -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 --- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c | 52 ++++++++++---= ------- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf | 4 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c b/MdeMod= ulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c index 8a168663c4af..a0f3ab9e76c6 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c @@ -25,8 +25,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #include #include -#include -#include +#include +#include #include #include =20 @@ -249,7 +249,7 @@ InternalRestoreLockBoxFromSmram ( IN OUT UINTN *Length OPTIONAL ) { - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; EFI_STATUS Status; SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext; @@ -261,14 +261,14 @@ InternalRestoreLockBoxFromSmram ( // Get needed resource // Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (!EFI_ERROR (Status)) { for (Index =3D 0; !EFI_ERROR (Status); Index++) { - Status =3D SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTable= Pointer (), SmmAccess, Index); + Status =3D MmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTableP= ointer (), MmAccess, Index); } } =20 @@ -350,7 +350,7 @@ InternalRestoreAllLockBoxInPlaceFromSmram ( VOID ) { - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; EFI_STATUS Status; SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext; @@ -362,14 +362,14 @@ InternalRestoreAllLockBoxInPlaceFromSmram ( // Get needed resource // Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (!EFI_ERROR (Status)) { for (Index =3D 0; !EFI_ERROR (Status); Index++) { - Status =3D SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTable= Pointer (), SmmAccess, Index); + Status =3D MmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTableP= ointer (), MmAccess, Index); } } =20 @@ -526,7 +526,7 @@ RestoreLockBox ( ) { EFI_STATUS Status; - EFI_PEI_SMM_COMMUNICATION_PPI *SmmCommunicationPpi; + EFI_PEI_MM_COMMUNICATION_PPI *MmCommunicationPpi; EFI_SMM_LOCK_BOX_PARAMETER_RESTORE *LockBoxParameterRestore; EFI_SMM_COMMUNICATE_HEADER *CommHeader; UINT8 CommBuffer[sizeof(EFI_GUID) + sizeof(= UINT64) + sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE)]; @@ -557,10 +557,10 @@ RestoreLockBox ( // Get needed resource // Status =3D PeiServicesLocatePpi ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, 0, NULL, - (VOID **)&SmmCommunicationPpi + (VOID **)&MmCommunicationPpi ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_INFO, "SmmLockBoxPeiLib LocatePpi - (%r)\n", Status)); @@ -607,11 +607,11 @@ RestoreLockBox ( // Send command // CommSize =3D sizeof(CommBuffer); - Status =3D SmmCommunicationPpi->Communicate ( - SmmCommunicationPpi, - &CommBuffer[0], - &CommSize - ); + Status =3D MmCommunicationPpi->Communicate ( + MmCommunicationPpi, + &CommBuffer[0], + &CommSize + ); if (Status =3D=3D EFI_NOT_STARTED) { // // Pei SMM communication not ready yet, so we access SMRAM directly @@ -657,7 +657,7 @@ RestoreAllLockBoxInPlace ( ) { EFI_STATUS Status; - EFI_PEI_SMM_COMMUNICATION_PPI *SmmCommunicationPpi; + EFI_PEI_MM_COMMUNICATION_PPI *MmCommunicationPpi; EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE *LockBoxParameterRestore= AllInPlace; EFI_SMM_COMMUNICATE_HEADER *CommHeader; UINT8 CommBuffer[sizeof(EFI_GU= ID) + sizeof(UINT64) + sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLA= CE)]; @@ -679,10 +679,10 @@ RestoreAllLockBoxInPlace ( // Get needed resource // Status =3D PeiServicesLocatePpi ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, 0, NULL, - (VOID **)&SmmCommunicationPpi + (VOID **)&MmCommunicationPpi ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_INFO, "SmmLockBoxPeiLib LocatePpi - (%r)\n", Status)); @@ -716,11 +716,11 @@ RestoreAllLockBoxInPlace ( // Send command // CommSize =3D sizeof(CommBuffer); - Status =3D SmmCommunicationPpi->Communicate ( - SmmCommunicationPpi, - &CommBuffer[0], - &CommSize - ); + Status =3D MmCommunicationPpi->Communicate ( + MmCommunicationPpi, + &CommBuffer[0], + &CommSize + ); if (Status =3D=3D EFI_NOT_STARTED) { // // Pei SMM communication not ready yet, so we access SMRAM directly diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf b/MdeM= odulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf index 093957ec0adf..ab093a4b255c 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -55,5 +55,5 @@ [Guids] gEfiAcpiVariableGuid ## SOMETIMES_CONSUMES ## HOB =20 [Ppis] - gEfiPeiSmmCommunicationPpiGuid ## CONSUMES - gPeiSmmAccessPpiGuid ## SOMETIMES_CONSUMES + gEfiPeiMmCommunicationPpiGuid ## CONSUMES + gEfiPeiMmAccessPpiGuid ## SOMETIMES_CONSUMES --=20 2.18.0.windows.1