From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.71.104; helo=eur03-db5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071104.outbound.protection.outlook.com [40.92.71.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 198A1210C0CDC for ; Sun, 22 Jul 2018 16:05:31 -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=G/+J7vyQB2MIa8zBBBrujMbe5tijKGQvDYliwzh7/Qs=; b=cRkMeHpp8hfWUzIylIC+eRyf9rWK399dQND0e7ECQomZbdH6MZ+lZjTyzG1booruQvtARVZNuUDiiJ36WAAGsMn0M6TpPFZWlEoSV3y/m19ci86Vi9RtVS/4tDZApd9CZyKwKc/7V6LUw/NB+ppEKUh4NsnBJp3lVvPEUEO00PMUznWiEJBYELzlxUvVpwefyCBALlYaGSkJBuxVvB6bWArfayiUONxEihV99i/93IySUac/X4MMp6nmKWiQaZRM4jqsU4FqeFlRIatN/+h85mFkVcMLq2RP91YFFwxC6vjkBlXtF+YeoTTWtG8bJyI2DZHppxjxNDrqQHsCR+YbNw== Received: from DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com (10.152.20.53) by DB5EUR03HT231.eop-EUR03.prod.protection.outlook.com (10.152.20.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.995.12; Sun, 22 Jul 2018 23:05:29 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.20.60) by DB5EUR03FT053.mail.protection.outlook.com (10.152.21.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.995.12 via Frontend Transport; Sun, 22 Jul 2018 23:05:28 +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.018; Sun, 22 Jul 2018 23:05:28 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "ruiyu.ni@intel.com" Thread-Topic: [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalone MM. Thread-Index: AQHUIhB7GSTxFqqMxkmssOyakdK+Nw== Date: Sun, 22 Jul 2018 23:05:28 +0000 Message-ID: References: <3e63e0c06e38886af03bfc7a7e90ce6608f44ce8.1532300587.git.Marvin.Haeuser@outlook.com> In-Reply-To: <3e63e0c06e38886af03bfc7a7e90ce6608f44ce8.1532300587.git.Marvin.Haeuser@outlook.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM3PR07CA0114.eurprd07.prod.outlook.com (2603:10a6:207:7::24) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:5CCCA6A26AE7254D5B79594CDC2A613C1F1683126B515A3612B569F8121DEF7D; UpperCasedChecksum:47596A104B3947EDE35EDF8E37AC87E4E7CE1D535A26C2C87E4FB5EC1075E142; SizeAsReceived:7601; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [P56lfOTIW9Ek1Agc3p7EoLoCY7fEOQqj] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5EUR03HT231; 6:ILTSS5W6QSci5hrhm1o9EczmIScK+ArabSSfIuudW8pLqShXTVMsSq7cY7oNR8+FiG5kyygsbIoQYNoj/Y+uO6PeEJDpj3wlLLskHxfWLhXrNzA+ktSRLAUVoHEDg1F+e52DlkzC8Z0hO8AJ0S8Y9VizU2YwdSXCV82NcFUJ+12cMbWg+aXC1hjjaCUJs8TobbDKT4r7RkdNKwcjQ5iph9g1WHK480vOFqbkIMbXC5EbQEe/x5XFjyDAxtG0HCqnETu0GfZNAyoru7oQV6tfVFp+CRpROkesA9wEASXU0zK+F91ClEXBmYe9gPKzs2WGLTb3MwhpTuZsZkfCoVaVIUYQaCWtESjJoA5ooePAqpLsQuOMtTx65Z2wv0gCQalOjd7agmp4hjD41UsRJKXWfyO+2C9SwMGRwzCoeuPmCfnGiwM3YXgtuLQl4p5MnN2u5VjMY2Pmqsyxo+ps7zngyQ==; 5:LEbzSmRNU51dRvdCMxENlQgieQK8GHhT/g2ZGDNqbeKC+zjDYeynQa8A9Vrm2Gm78iwwc0tVZKNfoXBlXE0Ns7lopDwDIFesPYZ5X3Jr828forect9v3W5EVnYH2AbF2WK6EjQ0lJUt6lCq40IHfsQ7gYWor1BxYleM0ZH9j7hw=; 7:hhxiv49jOxW+jX/cCQ8TyByPcMGUucEa05KS6EcSvtOF1RD0486PEdqxFZoUdN5vh5C9cCM7/jvJ6vLJ+sHgkYj7pVz5ruMsZtRTOtnSEkTi8gsWX6AtkX1IHjLigREpULNko/HvfNCRXiX8/VhmXpzA0Ohf4Um0q4gr9QzB1mV7xFovNLNE98aChm7dDKBTKaNlEySEgg7x8jMbvYcydZmLUb3raFHHXR9ScmlLHefhPqIJCsYNlueJn3vuDIrj x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101448)(1701031045); SRVR:DB5EUR03HT231; x-ms-traffictypediagnostic: DB5EUR03HT231: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:DB5EUR03HT231; BCL:0; PCL:0; RULEID:; SRVR:DB5EUR03HT231; x-forefront-prvs: 0741C77572 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(6029001)(199004)(189003)(76176011)(72206003)(2351001)(68736007)(7696005)(105586002)(106356001)(2501003)(26005)(1857600001)(86362001)(386003)(476003)(6346003)(74316002)(426003)(446003)(486006)(256004)(102836004)(33656002)(14454004)(5640700003)(55016002)(99286004)(82202002)(20460500001)(2900100001)(11346002)(305945005)(6436002)(6916009)(97736004)(87572001)(5660300001)(8936002)(8676002)(81156014)(56003)(25786009)(5250100002)(4326008)(104016004); DIR:OUT; SFP:1901; SCL:1; SRVR:DB5EUR03HT231; 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: IuIUNmkg9AXsq+RADIpE7scE2M2fQzM62La6eKulXJI/4Hcp5/tUSr2yhpg3spfu8eoqHwUWotpp0PYq0CFqaM/QjH1saKFRrmH/b8UGwVBlzfPJsWtmF0GG6U0o0b28WgP7RK1iWEKYEHOHWTDctD562mXSl9RngRHBct+c0Bs4kk4aFGFdtQp68heQKBSwi8FKPa1q4kkc5surZE+pXCXJc1ujQZveDFqhQ7nC1qM= 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: d9a0a17b-12ec-4d9c-2d9c-08d5f0279db5 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2018 23:05:28.9195 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT231 Subject: [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalone MM. 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: Sun, 22 Jul 2018 23:05:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To support Standalone MM, the current DXE implementation, which is also used to support DXE SMM Drivers, has been modified. Its type was changed to BASE to make the constructor function generic, MM_STANDALONE modules types have been added to the support list and the internal files were adapted to show support. "DxeAcpiTimerLib.inf" has not been renamed to not break packages. This might be addressed with a separate patch. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.c =3D> DxeStandaloneM= mAcpiTimerLib.c} | 9 +++------ PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf = | 14 +++++++------- PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.uni =3D> StandaloneMm= DxeAcpiTimerLib.uni} | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c b/PcAtCh= ipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c similarity index 88% rename from PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c rename to PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c index 9ed10ef2e297..784f33871d75 100644 --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c @@ -13,6 +13,7 @@ **/ =20 #include +#include #include #include #include @@ -78,17 +79,13 @@ InternalGetPerformanceCounterFrequency ( /** The constructor function enables ACPI IO space, and caches PerformanceCo= unterFrequency. =20 - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS. =20 **/ EFI_STATUS EFIAPI -DxeAcpiTimerLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeStandaloneMmAcpiTimerLibConstructor ( + VOID ) { EFI_HOB_GUID_TYPE *GuidHob; diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf b/PcAt= ChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf index 601041c80137..f1f62247649e 100644 --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf @@ -1,5 +1,5 @@ ## @file -# DXE ACPI Timer Library +# DXE and Standalone MM ACPI Timer Library # # Provides basic timer support using the ACPI timer hardware. The perfor= mance # counter features are provided by the processors time stamp counter. @@ -20,17 +20,17 @@ =20 [Defines] INF_VERSION =3D 0x00010005 - BASE_NAME =3D DxeAcpiTimerLib + BASE_NAME =3D DxeStandaloneMmAcpiTimerLib FILE_GUID =3D E624B98C-845A-4b94-9B50-B20475D552B9 - MODULE_TYPE =3D DXE_DRIVER + MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D TimerLib|DXE_CORE DXE_DRIVER DXE_RUNT= IME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE - CONSTRUCTOR =3D DxeAcpiTimerLibConstructor - MODULE_UNI_FILE =3D DxeAcpiTimerLib.uni + LIBRARY_CLASS =3D TimerLib|DXE_CORE DXE_DRIVER DXE_RUNT= IME_DRIVER DXE_SMM_DRIVER MM_STANDALONE UEFI_APPLICATION UEFI_DRIVER SMM_CO= RE MM_CORE_STANDALONE + CONSTRUCTOR =3D DxeStandaloneMmAcpiTimerLibConstructo= r + MODULE_UNI_FILE =3D DxeStandaloneMmAcpiTimerLib.uni =20 [Sources] AcpiTimerLib.c - DxeAcpiTimerLib.c + DxeStandaloneMmAcpiTimerLib.c =20 [Packages] MdePkg/MdePkg.dec diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni b/PcAt= ChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.uni similarity index 92% rename from PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni rename to PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.u= ni index bf31abf81d68..6b3abb85ebc8 100644 --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.uni @@ -1,5 +1,5 @@ // /** @file -// DXE ACPI Timer Library +// DXE and Standalone MM ACPI Timer Library // // Provides basic timer support using the ACPI timer hardware. The perfor= mance // counter features are provided by the processors time stamp counter. --=20 2.18.0.windows.1