From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.4638.1610520621611434170 for ; Tue, 12 Jan 2021 22:50:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mwNtKZFn; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) IronPort-SDR: aSiPw7lUp62roGKqT2Pw2ve6XvgZdMI0NUGkCrJeeez+8jJA2J1cz9e2teAXkuSPrE1JoS1336 J/tOcHO0WCPg== X-IronPort-AV: E=McAfee;i="6000,8403,9862"; a="239700967" X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="239700967" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2021 22:50:19 -0800 IronPort-SDR: YvPRdFC/wYQwRbIotz7vt3bl/Id/yODhMJtpqw/4SNP3GIgV8Fng566lOVP/BWTOquEOUVuuay ruoD6OFbfHyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="571933835" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga005.fm.intel.com with ESMTP; 12 Jan 2021 22:50:19 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 12 Jan 2021 22:50:18 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 12 Jan 2021 22:50:18 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 12 Jan 2021 22:50:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajHAZTYtH9GWyJorCrC5RQMnJw/02JhkO6eKopI6C+thaPAZeW3eLJf9XBjzAJklKE4YnzcIHSb137dS9x2EC7JMOMYEDGaK+bGzw0lzVWRAyB7eonADhK1T9yCYMIKQCYvz7xTzWo5M6Q+oeAxDS9y8TDZMX9ePbGAZZ/+r/DNxViTbAYnjU4XSxno47ss+UqJCdpXJLH582r7oxuAfdSF82HXLrU1uJAF/s3rWSd5h8w8PWiFe5AwLGdAakWEbUduNWHH5V9/PPZ+9ldVCOUhFQBXOx3GXij4iXDYXGfXvDs/Rx94o75sg//YTnIJIN+5n36vINgh1kE9nf7uJKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GC88Y/ahFwthoTPVKumLS2Bjh5WG+wydGmtK+jWPvDE=; b=OQEHy+FOUiz6uDr0CqnJInUDGUlZTQ/DdZxpso0fXzW1C892vJuCgTHJ/yX93cCSbWHtKVYEAi2mauSoTbMgt7ZhFFaV4ThF0QJE1cHjV5gssePp89+4NNH288FDvl9pX9RJKj9r/9uiICfS9962urW4SosZ9cbsZNThHroqdIahemCq6OeDbp/1bsjSbEXjtrfpbY/ZRrzTI2iZ+03dV40Hw2aFK/Jol/xX1j5F6mzpXaSz0lScHPlUz9hXaQtJOUKXwN9zS4fii/0lWsSSKWpGawcRQCr73Ysov5SplGSJ8UqmBlDuyZAN+mfyIXX+Y1Wo5H3N4eIi/VpzgRNvxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GC88Y/ahFwthoTPVKumLS2Bjh5WG+wydGmtK+jWPvDE=; b=mwNtKZFn0laF4Ls7mXXNYCiljAyG7p/zVDCRtCal8s6x3DnCmHqfhCHw12Bi6XWgyBi4qdnX3uBTIZGdkiGIerWQeQW2jVdtsJgHfHHWXyvWHjL9k1477j1I68Bv42DiNM0UAGKCnQOKuLBD6da7YGubgMxU4OjPiqZINTm0hLg= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MWHPR11MB1936.namprd11.prod.outlook.com (2603:10b6:300:111::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Wed, 13 Jan 2021 06:50:15 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::d18:1234:c1d6:5936]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::d18:1234:c1d6:5936%7]) with mapi id 15.20.3763.010; Wed, 13 Jan 2021 06:50:15 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "kun.q@outlook.com" Subject: Re: [edk2-devel] [PATCH v2 11/16] PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib Thread-Topic: [edk2-devel] [PATCH v2 11/16] PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib Thread-Index: AQHW45UbWGL5VXvXUkiybzpVTkI5VKolJ19Q Date: Wed, 13 Jan 2021 06:50:15 +0000 Message-ID: References: <20210105185935.3769-1-kun.q@outlook.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6ce29739-3539-4f64-ac9a-08d8b78f7bd7 x-ms-traffictypediagnostic: MWHPR11MB1936: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: p6omRA2ei3NrsGtZNzNoDwT9751fITo87Jg+Vb/8NTYXmQMSec/06d+W5Z2/uh1QfKbpuT4pEQd2E8Y5kjxUQRPJElesZmyc5uuO/or4ocxuZpvMLXAvt/lfxx8H+nDua1QsFBnKI9qbUXlX2Bl8/OeJkMQ4p2fuIyKM5FP+oUc/2KkWkcijwPFv8DLuMR7G+N2sppy7ubJQRHMOfWHqOfy0FPYAx0dCXCup4aMuOgmIhifvBQUtf/ZsmMb/UeE6sOBNm/7XN1DXrRbtT3RF7Iyb9qN2bUcb50jnA0m24bSLsUBJHGzxSIjn/ssq7aVZ1kiW151ENdUYXNYhTpkZiTT2EnfE08Q5/bWy5deJVaIuQ14TTRZcOf9oa9yrw8ajKr2rAojQ3+zt52Euy1fqy3CbrWfSK70sCC8aodiwkSkvAm2YdMC322vONMcAiP2jy4vmbG4x1uK2ngC1YISMHw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(136003)(39860400002)(346002)(396003)(376002)(9686003)(55016002)(52536014)(30864003)(86362001)(966005)(8936002)(2906002)(8676002)(66446008)(66476007)(66946007)(83380400001)(64756008)(316002)(66556008)(5660300002)(53546011)(76116006)(6506007)(26005)(71200400001)(7696005)(186003)(110136005)(478600001)(33656002)(45080400002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?e/cSDpqM+lRPkjyealEKu2ACbeQOxFKIRxj8uzorHfXbxAbaqBLrPKiOdNVs?= =?us-ascii?Q?zNYLBXnxMmR2kLhEczO9kmsBCt6r7ISvFbDP8hHCnMIEVTFwTlzBJXZWxH7X?= =?us-ascii?Q?TKQnXoI1aMdATUol2tpu0DtkG5CARNlsU48YYN89IwFyGnC/4Zm7WgbHAoUZ?= =?us-ascii?Q?0Bw3HNALMLzQHImsZrF/B2uXXFeGMMwn/M4xGv8QHba1vFvIcRKXnQbeMgkb?= =?us-ascii?Q?QtUVuWyzc6VdCGwm3Bjumtg8zWWvxHtIPIFZO11p3MB4lDBvgtT3Gn8swDNz?= =?us-ascii?Q?jlW4QSyWRuA2VXox5D9Qk4GtI7WUHDL4KjOJfj8IlIUT5q7F5UYqxof2bAYF?= =?us-ascii?Q?uodaIHSFW+LIDMz5G7qa31Y/JnD3VzhhqhL9MgHIc8b52L4SRPFL9h4tFIWZ?= =?us-ascii?Q?jPWVT1ukP1ZDvd3+V5L+EdKoO1BklZ0+FKZ9uYp+/dwKl+VRu4mA9aeeBKdE?= =?us-ascii?Q?i/xQ0WyPNJZNAstiwu/fIvC1Df7zlLyRSx3R3lnu3AXuV5rKr4+v2UeX9kdn?= =?us-ascii?Q?MxVaFfzyBzrsfn+c2tkLbejWxpHbNltdEpElIpBY9iU6bNjBeA+Yt8RqC2DM?= =?us-ascii?Q?Fw9bBMhd1Tkx57qFGd8FdG0ixjUsbnpZs5mJOvmjcu4GmHxlJoX7k7jsDPow?= =?us-ascii?Q?p1YkdIbjN/p8wNdiJHD3ETSye8LJD/sYvI30DrhneWWtn0gWutoVpC7hHXld?= =?us-ascii?Q?/RPKGJVl6cN+QE0DdhAt1tqX2PBxgPTR4rbawMKNWYPdSXy4BOUEk80f5rgg?= =?us-ascii?Q?Syd+y8sckhZhbeTylAV1daOMEoKmMP1aO8w0sd5Bs4tUYgsKY3SCi+Z7iTu1?= =?us-ascii?Q?5q6OVqMJKXvwUSKL1C50DwzFdmYVFAm/fBPOHwVX6ICjcb8Lz+SX4fOjZZ1d?= =?us-ascii?Q?IyIZQ8Vh6rlj5RSCMxxXbmJiO/zTROdU2+ZrfYFQ4/prcdD6oHZASwzlehWs?= =?us-ascii?Q?9Nab8Dhjh/GfsUtdnDk5jwE0T6z33pM2dc3K1es4B+IEO9mA1f5X8gXGQZuz?= =?us-ascii?Q?Vcm0?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ce29739-3539-4f64-ac9a-08d8b78f7bd7 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2021 06:50:15.8037 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6HW0YtlzFEX3ctrrIpX4AJFmrokNmaO4oEpnSq1C5mTGJWTEpTiBfMCvL78voHw0pYAagdK8eypNbyKDKFhl8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1936 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 1. With this change, there will be two common C files which look confusing = to me: AcpiTimerLib.c CommonAcpiTimerLib.c With a deep look, the first one is shared by Base/Pei/Dxe instances. The second one is shared by Dxe and StandaloneMm instances. Can you rename CommonAcpiTimerLib.c to DxeStandaloneMmAcpiTimerLib.c? Or do you have any better idea to avoid the confusion? 2. Can you rename the BASE NAME from "StandaloneAcpiTimerLib" to "StandaloneMmAcpiTimerLib"? I am not sure everyone could map "Standalone" to "StandaloneMm". Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Kun Qin > Sent: Wednesday, January 6, 2021 3:00 AM > To: devel@edk2.groups.io > Cc: Ni, Ray > Subject: [edk2-devel] [PATCH v2 11/16] PcAtChipsetPkg: AcpiTimerLib: Add= ed > StandaloneMm instance of AcpiTimerLib >=20 > This change added a new instance of AcpiTimerLib for StandaloneMm core > and drivers. It centralizes the common routines into shared files and > abstract the library constructor into corresponding files to accommodate > each constructor function prototypes. >=20 > Cc: Ray Ni >=20 > Signed-off-by: Kun Qin > --- >=20 > Notes: > v2: > - Removed "EFIAPI" for internal functions. >=20 > PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.c =3D> > CommonAcpiTimerLib.c} | 9 +-- > PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > | 81 +------------------- > PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.c > | 31 ++++++++ > PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h > | 24 ++++++ > PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > | 2 + > PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.inf =3D> > StandaloneAcpiTimerLib.inf} | 19 +++-- > PcAtChipsetPkg/PcAtChipsetPkg.dsc = | 1 + > 7 files changed, 74 insertions(+), 93 deletions(-) >=20 > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > b/PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.c > similarity index 86% > copy from PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > copy to PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.c > index 3ad831b15e8a..0e401194d01d 100644 > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.c > @@ -72,17 +72,12 @@ InternalGetPerformanceCounterFrequency ( > /** > The constructor function enables ACPI IO space, and caches > PerformanceCounterFrequency. >=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 > +CommonAcpiTimerLibConstructor ( > + VOID > ) > { > EFI_HOB_GUID_TYPE *GuidHob; > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > index 3ad831b15e8a..e519ad8ed07e 100644 > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > @@ -2,72 +2,14 @@ > ACPI Timer implements one instance of Timer Library. >=20 > Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) Microsoft Corporation. > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > #include > -#include > -#include > -#include >=20 > -extern GUID mFrequencyHobGuid; > - > -/** > - The constructor function enables ACPI IO space. > - > - If ACPI I/O space not enabled, this function will enable it. > - It will always return RETURN_SUCCESS. > - > - @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS. > - > -**/ > -RETURN_STATUS > -EFIAPI > -AcpiTimerLibConstructor ( > - VOID > - ); > - > -/** > - Calculate TSC frequency. > - > - The TSC counting frequency is determined by comparing how far it coun= ts > - during a 101.4 us period as determined by the ACPI timer. > - The ACPI timer is used because it counts at a known frequency. > - The TSC is sampled, followed by waiting 363 counts of the ACPI timer, > - or 101.4 us. The TSC is then sampled again. The difference multiplied= by > - 9861 is the TSC frequency. There will be a small error because of the > - overhead of reading the ACPI timer. An attempt is made to determine a= nd > - compensate for this error. > - > - @return The number of TSC counts per second. > - > -**/ > -UINT64 > -InternalCalculateTscFrequency ( > - VOID > - ); > - > -// > -// Cached performance counter frequency > -// > -UINT64 mPerformanceCounterFrequency =3D 0; > - > -/** > - Internal function to retrieves the 64-bit frequency in Hz. > - > - Internal function to retrieves the 64-bit frequency in Hz. > - > - @return The frequency in Hz. > - > -**/ > -UINT64 > -InternalGetPerformanceCounterFrequency ( > - VOID > - ) > -{ > - return mPerformanceCounterFrequency; > -} > +#include "CommonAcpiTimerLib.h" >=20 > /** > The constructor function enables ACPI IO space, and caches > PerformanceCounterFrequency. > @@ -85,22 +27,5 @@ DxeAcpiTimerLibConstructor ( > IN EFI_SYSTEM_TABLE *SystemTable > ) > { > - EFI_HOB_GUID_TYPE *GuidHob; > - > - // > - // Enable ACPI IO space. > - // > - AcpiTimerLibConstructor (); > - > - // > - // Initialize PerformanceCounterFrequency > - // > - GuidHob =3D GetFirstGuidHob (&mFrequencyHobGuid); > - if (GuidHob !=3D NULL) { > - mPerformanceCounterFrequency =3D *(UINT64*)GET_GUID_HOB_DATA > (GuidHob); > - } else { > - mPerformanceCounterFrequency =3D InternalCalculateTscFrequency (); > - } > - > - return EFI_SUCCESS; > + return CommonAcpiTimerLibConstructor (); > } > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.= c > b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.c > new file mode 100644 > index 000000000000..8509f94ba7cb > --- /dev/null > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.c > @@ -0,0 +1,31 @@ > +/** @file > + ACPI Timer implements one instance of Timer Library. > + > + Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include "CommonAcpiTimerLib.h" > + > +/** > + The constructor function enables ACPI IO space, and caches > PerformanceCounterFrequency. > + > + @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. > + > +**/ > +EFI_STATUS > +EFIAPI > +StandaloneMmAcpiTimerLibConstructor ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_MM_SYSTEM_TABLE *SystemTable > + ) > +{ > + return CommonAcpiTimerLibConstructor (); > +} > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h > b/PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h > new file mode 100644 > index 000000000000..1bbdaef04cce > --- /dev/null > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h > @@ -0,0 +1,24 @@ > +/** @file > + Header file internal to ACPI TimerLib. > + > +Copyright (c) Microsoft Corporation. > +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > + > +#ifndef _COMMON_ACPI_TIMER_LIB_H_ > +#define _COMMON_ACPI_TIMER_LIB_H_ > + > +/** > + The constructor function enables ACPI IO space, and caches > PerformanceCounterFrequency. > + > + @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS. > + > +**/ > +EFI_STATUS > +CommonAcpiTimerLibConstructor ( > + VOID > + ); > + > +#endif > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > index d86356f4ff17..bbf14b3b5b53 100644 > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > @@ -25,6 +25,8 @@ [Defines] > [Sources] > AcpiTimerLib.c > DxeAcpiTimerLib.c > + CommonAcpiTimerLib.c > + CommonAcpiTimerLib.h >=20 > [Packages] > MdePkg/MdePkg.dec > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.inf > similarity index 70% > copy from PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > copy to PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.inf > index d86356f4ff17..aa8f0012f744 100644 > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.inf > @@ -1,5 +1,5 @@ > ## @file > -# DXE ACPI Timer Library > +# Standalone MM ACPI Timer Library > # > # Provides basic timer support using the ACPI timer hardware. The > performance > # counter features are provided by the processors time stamp counter. > @@ -8,23 +8,26 @@ > # is compatible with both 24-bit and 32-bit ACPI timers. > # > # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. > +# Copyright (c) Microsoft Corporation. > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > ## >=20 > [Defines] > INF_VERSION =3D 0x00010005 > - BASE_NAME =3D DxeAcpiTimerLib > - FILE_GUID =3D E624B98C-845A-4b94-9B50-B20475D552= B9 > - MODULE_TYPE =3D DXE_DRIVER > + BASE_NAME =3D StandaloneAcpiTimerLib > + FILE_GUID =3D C771858D-AF09-4D1A-B2F3-C7F081C3F0= 76 > + MODULE_TYPE =3D MM_STANDALONE > VERSION_STRING =3D 1.0 > - LIBRARY_CLASS =3D TimerLib|DXE_CORE DXE_DRIVER > DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER > SMM_CORE > - CONSTRUCTOR =3D DxeAcpiTimerLibConstructor > - MODULE_UNI_FILE =3D DxeAcpiTimerLib.uni > + PI_SPECIFICATION_VERSION =3D 0x00010032 > + LIBRARY_CLASS =3D TimerLib|MM_CORE_STANDALONE > MM_STANDALONE > + CONSTRUCTOR =3D StandaloneMmAcpiTimerLibConstructo= r >=20 > [Sources] > AcpiTimerLib.c > - DxeAcpiTimerLib.c > + StandaloneAcpiTimerLib.c > + CommonAcpiTimerLib.c > + CommonAcpiTimerLib.h >=20 > [Packages] > MdePkg/MdePkg.dec > diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc > b/PcAtChipsetPkg/PcAtChipsetPkg.dsc > index b61b7d1f528e..8862ca7a0006 100644 > --- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc > +++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc > @@ -53,6 +53,7 @@ [Components] > PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf > PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > PcAtChipsetPkg/Library/AcpiTimerLib/PeiAcpiTimerLib.inf > + PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.inf >=20 > PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDx > e.inf >=20 > [BuildOptions] > -- > 2.30.0.windows.1 >=20 >=20 >=20 >=20 >=20