From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 43A86210C2D81 for ; Thu, 2 Aug 2018 08:21:01 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 08:21:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,436,1526367600"; d="scan'208";a="78156952" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 02 Aug 2018 08:20:56 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 08:20:56 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 08:20:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Thu, 2 Aug 2018 23:20:54 +0800 From: "Gao, Liming" To: Marvin H?user , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalone MM. Thread-Index: AQHUIhB7GSTxFqqMxkmssOyakdK+N6ScW0XAgABphdCAD97KAA== Date: Thu, 2 Aug 2018 15:20:53 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2C4B82@SHSMSX104.ccr.corp.intel.com> References: <3e63e0c06e38886af03bfc7a7e90ce6608f44ce8.1532300587.git.Marvin.Haeuser@outlook.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E2BF982@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDgxMDE3ZDktMjc0NS00ZjQzLTg1NjEtNjgwYzU5MGVkYTE2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRXNiRlZyRlVXdGk3bWpGZ1dYSnlyNkhaTHkzWlFWYzh3M0w0SFRGNHVQeXN1SlBFdzU3N1cweTl5RWlBRjNJRCJ9 dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Thu, 02 Aug 2018 15:21:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Marvin: I suggest to verify this library functionality on Standalone MM driver fi= rst, then propose how to change it to support more module type.=20 Thanks Liming > -----Original Message----- > From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com] > Sent: Monday, July 23, 2018 9:02 PM > To: edk2-devel@lists.01.org; Gao, Liming > Cc: Ni, Ruiyu > Subject: RE: [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalone MM. >=20 > Best regards, > Marvin. >=20 > > -----Original Message----- > > From: Gao, Liming > > Sent: Monday, July 23, 2018 8:46 AM > > To: Marvin.Haeuser@outlook.com; edk2-devel@lists.01.org > > Cc: Ni, Ruiyu > > Subject: RE: [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalone MM= . > > > > Marvin: > > If this library supports standalone MM module only, I agree its sourc= e file > > includes Standalone MM > > But, this library instance also supports DXE, SMM. I don't think > > StandaloneMm name is good for them. >=20 > I called all files "DxeStandaloneMm", the same way as other libraries app= end environment types ("PeiDxePostCodeLib", etc). > Did I overlook something? >=20 > > > > Besides, I want to know why you changes this library instance. Are th= ere the > > standalone MM module to depend on this AcpiTimerLib? >=20 > I wanted to try out porting a private module which happened to depend on = AcpiTimerLib and thus HobLib. > HobLib will follow once the MmServicesTableLib patch has been decided on = and I will adapt others too once I run into needing them. >=20 > > > > Thanks > > Liming > > >-----Original Message----- > > >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > >Marvin H?user > > >Sent: Monday, July 23, 2018 7:05 AM > > >To: edk2-devel@lists.01.org > > >Cc: Ni, Ruiyu > > >Subject: [edk2] [PATCH] PcAtChipsetPkg/AcpiTimerLib: Support Standalon= e > > >MM. > > > > > >To support Standalone MM, the current DXE implementation, which is als= o > > >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> > > >DxeStandaloneMmAcpiTimerLib.c} | 9 +++------ > > > PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf > > >| 14 +++++++------- > > > PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.uni =3D> > > >StandaloneMmDxeAcpiTimerLib.uni} | 2 +- > > > 3 files changed, 11 insertions(+), 14 deletions(-) > > > > > >diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c > > >b/PcAtChipsetPkg/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 @@ > > > **/ > > > > > > #include > > >+#include > > > #include > > > #include > > > #include > > >@@ -78,17 +79,13 @@ InternalGetPerformanceCounterFrequency ( > > > /** > > > The constructor function enables ACPI IO space, and caches > > >PerformanceCounterFrequency. > > > > > >- @param ImageHandle The firmware allocated handle for the EFI ima= ge. > > >- @param SystemTable A pointer to the EFI System Table. > > >- > > > @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS= . > > > > > > **/ > > > 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/PcAtChipsetPkg/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 > > >performance # counter features are provided by the processors time > > >stamp counter. > > >@@ -20,17 +20,17 @@ > > > > > > [Defines] > > > INF_VERSION =3D 0x00010005 > > >- BASE_NAME =3D DxeAcpiTimerLib > > >+ BASE_NAME =3D DxeStandaloneMmAcpiTimerLib > > > FILE_GUID =3D E624B98C-845A-4b94-9B50-B20475D5= 52B9 > > >- MODULE_TYPE =3D DXE_DRIVER > > >+ MODULE_TYPE =3D BASE > > > 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 > > >+ LIBRARY_CLASS =3D TimerLib|DXE_CORE DXE_DRIVER > > >DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE > > UEFI_APPLICATION > > >UEFI_DRIVER SMM_CORE MM_CORE_STANDALONE > > >+ CONSTRUCTOR =3D DxeStandaloneMmAcpiTimerLibConst= ructor > > >+ MODULE_UNI_FILE =3D DxeStandaloneMmAcpiTimerLib.uni > > > > > > [Sources] > > > AcpiTimerLib.c > > >- DxeAcpiTimerLib.c > > >+ DxeStandaloneMmAcpiTimerLib.c > > > > > > [Packages] > > > MdePkg/MdePkg.dec > > >diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni > > >b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.u > > ni > > >similarity index 92% > > >rename from PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni > > >rename to > > >PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.uni > > >index bf31abf81d68..6b3abb85ebc8 100644 > > >--- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.uni > > >+++ > > >b/PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneMmDxeAcpiTimerLib.u > > ni > > >@@ -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 > > >performance // counter features are provided by the processors time > > >stamp counter. > > >-- > > >2.18.0.windows.1 > > > > > >_______________________________________________ > > >edk2-devel mailing list > > >edk2-devel@lists.01.org > > >https://lists.01.org/mailman/listinfo/edk2-devel