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.13; 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-oln040092068013.outbound.protection.outlook.com [40.92.68.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 962AE21BADAB6 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=ZHPDoT+G4/KvypVByo4e5/379/58xpV1XLiOG5kSJcM=; b=jnEwn8E8k1uIFYMkSg35zbZP1GpLpVobiUMJPExXmHmGtcErLTLJ996FTj7HK49n3C3ntWd9LlFM4EMmZpUncZ7Exqr6kQzK9pi2ub32VwFCC5LyJYsP+dyDx6WUXE9TdPLoE7UWIfZashM5C3ehbnqlCXcqrRfTBD17cpr/QUkcg7fmPgJ0iKtN/AAbfzo+iK0nID5UvWYqqwJuIzL1hAcHdP++JQyYsYZ7VBMi99/I7MxISpwCMTgwNGoE9V6rKbiE0fQQ+n1Qhwl+zIA47KkqED3wi8vEop0D1Bn8bDiQRwhi+g7ybxMpQy4QGRL3GfPCIedlyLj6+bSRlIVUAQ== Received: from HE1EUR02FT023.eop-EUR02.prod.protection.outlook.com (10.152.10.56) by HE1EUR02HT091.eop-EUR02.prod.protection.outlook.com (10.152.11.86) 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:37 +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:37 +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:37 +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 4/8] UefiCpuPkg/S3Resume2Pei: Update MM PPI usages. Thread-Index: AQHUIu9S+4KhjXKx/EKQ1a9Rxpogkw== Date: Tue, 24 Jul 2018 01:40:37 +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:39F03BC3959182A758E7E1C71A4E933713A5ADD8F9F99088F71E29CE25DDA3F3; UpperCasedChecksum:F07D8CFA78F1AFE10FDBA81119DB5D1018C7ECE43ACA17750B34074FBC806D42; SizeAsReceived:8028; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [GFXjbW728GeXZHlEFOciOfqK4vGTVOXb] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT091; 6:HhxBXKVAQCsLYX2UFqrF2dFS2VmXWHngvZSdeSw9VvkyjSywTaSCxjHeu3IbRT3m14u3Aj9p0pk5cSV9afoMrekTpBqkhZqqgHVhat1tVnzvvONBSphQB0SKrEgbaiaGo5F6du6jQBY4sNxxHATou6OzcuJIKlh0mcG/Gj/EbJ+VXveLB4rGNpabW9PK9kA3kTn6ui8d9VGUMUpAQoZvC30Gj0hQEhE7hqSq0jG/tWt5bpu/ruCAzzEd74ObyMJzogLW9UAFOOSRVL/3Kf13bcQkZLb/tU9H/i8s6g+fme5jectcvO0TUDI74PkLv/HdyI8h9qcdIGgeXZjDwLwpZTaORjAwHMmIgiajWYRVadhK8EbiBgOiaZ21yAIRRFpNXhkV78CToe4EgITpFKYGcEu2HHBi7wabzK9fD/AAsJ5T+jnBxhPxeE/mpU1lHgXqL76sEjyySKX1TKkO1UcMyw==; 5:0KP3GntkwGK6IsduJeY5IdE3S6tG9llCVNu/6hWDuNqMsuHgN9fr6FhZp+822rupMgmIp02X9ZUna7WXuyyKKvS80siPlAsT3QtORIrYywZ36DuCiSVgBYYNDPDsy8aby2t18Uu14Fr0kYA05WtvJThzb6RZ6iZHbyH6eLmtfqY=; 7:VkD8FX/Qk3aA0O8xqRcpHLcK92flNyYh53KPn+bwBXkgMrWaD3vYMQNwGUS2FVBK0TLd1GfNn/05o0m/g8Z+MQdUaKRfBN68UdrL9rB3Hx5WGh/pREdNFB3ZQqTnPFr1A6HaE1mNJXC+bjbtT4EUc3rZMZZ3uuGHVT8htk9wryXH6Vug734T+eq3cFNb5DGWoUdbZjo6k+afQijb6RLqyKGkYYspTl3jRgkMWowGmJMnVMKqVb9w7L3QjHaB7bgo 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:HE1EUR02HT091; x-ms-traffictypediagnostic: HE1EUR02HT091: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:HE1EUR02HT091; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT091; x-forefront-prvs: 0743E8D0A6 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(5660300001)(106356001)(14444005)(256004)(104016004)(7416002)(56003)(19627235002)(5640700003)(15650500001)(6436002)(55016002)(2900100001)(33656002)(11346002)(105586002)(82202002)(476003)(97736004)(20460500001)(386003)(25786009)(6916009)(81156014)(86362001)(87572001)(8676002)(4326008)(8936002)(486006)(446003)(14454004)(26005)(6346003)(54906003)(68736007)(102836004)(74316002)(305945005)(5250100002)(76176011)(2501003)(2351001)(7696005)(72206003)(99286004)(426003); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT091; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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: 2MJHlaLPgSV90qO9NGSbaxOkRd2unIIpi260YJS0Zi1X4FVIMH9r69MZuH58gb3sB3cxvPca+oAXmSHix81GbkPGUU6esVjx4UEW+KwexyFMtEZrdUzLxYL9rq4f2TSNo4Y8KkzvUX61lRZbMy4biAs6G4xuhp5NgLQB7Z/agPAaRClhUJeagwTW573c6zHaFy99HW54QC9TW829s8Z37v01KCELpc8AyY+ytPQ/BV8= 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: 00465915-bf35-49f9-defe-08d5f106748e X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 01:40:37.6136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT091 Subject: [PATCH 4/8] UefiCpuPkg/S3Resume2Pei: 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/Universal/Acpi/S3Resume2Pei/S3Resume.c | 40 ++++++++++---= ------- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | 4 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg= /Universal/Acpi/S3Resume2Pei/S3Resume.c index 28e53ac5d334..8039e8cb200e 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -27,10 +27,10 @@ #include #include #include -#include +#include #include #include -#include +#include =20 #include #include @@ -340,7 +340,7 @@ SignalToSmmByCommunication ( ) { EFI_STATUS Status; - EFI_PEI_SMM_COMMUNICATION_PPI *SmmCommunicationPpi; + EFI_PEI_MM_COMMUNICATION_PPI *MmCommunicationPpi; UINTN CommSize; SMM_COMMUNICATE_HEADER_32 Header32; SMM_COMMUNICATE_HEADER_64 Header64; @@ -366,23 +366,23 @@ SignalToSmmByCommunication ( CopyGuid (CommBuffer, HandlerType); =20 Status =3D PeiServicesLocatePpi ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, 0, NULL, - (VOID **)&SmmCommunicationPpi + (VOID **)&MmCommunicationPpi ); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "Locate Smm Communicate Ppi failed (%r)!\n", Stat= us)); return; } =20 - Status =3D SmmCommunicationPpi->Communicate ( - SmmCommunicationPpi, - (VOID *)CommBuffer, - &CommSize - ); + Status =3D MmCommunicationPpi->Communicate ( + MmCommunicationPpi, + (VOID *)CommBuffer, + &CommSize + ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "SmmCommunicationPpi->Communicate return failure = (%r)!\n", Status)); + DEBUG ((DEBUG_ERROR, "MmCommunicationPpi->Communicate return failure (= %r)!\n", Status)); } =20 DEBUG ((DEBUG_INFO, "Signal %g to SMM - Exit (%r)\n", HandlerType, Statu= s)); @@ -749,7 +749,7 @@ S3ResumeExecuteBootScript ( ) { EFI_STATUS Status; - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; VOID *GuidHob; IA32_DESCRIPTOR *IdtDescriptor; @@ -778,22 +778,22 @@ S3ResumeExecuteBootScript ( SendSmiIpi (GetApicId ()); =20 Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **) &SmmAccess + (VOID **) &MmAccess ); if (!EFI_ERROR (Status)) { DEBUG ((DEBUG_INFO, "Close all SMRAM regions before executing boot s= cript\n")); =20 for (Index =3D 0, Status =3D EFI_SUCCESS; !EFI_ERROR (Status); Index= ++) { - Status =3D SmmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTa= blePointer (), SmmAccess, Index); + Status =3D MmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTab= lePointer (), MmAccess, Index); } =20 DEBUG ((DEBUG_INFO, "Lock all SMRAM regions before executing boot sc= ript\n")); =20 for (Index =3D 0, Status =3D EFI_SUCCESS; !EFI_ERROR (Status); Index= ++) { - Status =3D SmmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTab= lePointer (), SmmAccess, Index); + Status =3D MmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTabl= ePointer (), MmAccess, Index); } } =20 @@ -954,7 +954,7 @@ S3RestoreConfig2 ( ) { EFI_STATUS Status; - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; ACPI_S3_CONTEXT *AcpiS3Context; EFI_PHYSICAL_ADDRESS TempEfiBootScriptExecutorV= ariable; @@ -1048,13 +1048,13 @@ S3RestoreConfig2 ( GuidHob =3D GetFirstGuidHob (&gEfiAcpiVariableGuid); if (GuidHob !=3D NULL) { Status =3D PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **) &SmmAccess + (VOID **) &MmAccess ); 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 SmramDescriptor =3D (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHo= b); diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf b/Uefi= CpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf index 407aab67350b..e8ffaab7d789 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf @@ -81,10 +81,10 @@ [Guids] [Ppis] gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES gEfiPeiS3Resume2PpiGuid ## PRODUCES - gPeiSmmAccessPpiGuid ## SOMETIMES_CONSUMES + gEfiPeiMmAccessPpiGuid ## SOMETIMES_CONSUMES gPeiPostScriptTablePpiGuid ## SOMETIMES_PRODUCES gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES - gEfiPeiSmmCommunicationPpiGuid ## SOMETIMES_CONSUMES + gEfiPeiMmCommunicationPpiGuid ## SOMETIMES_CONSUMES =20 [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONS= UMES --=20 2.18.0.windows.1