From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.279.1617917099484120703 for ; Thu, 08 Apr 2021 14:24:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=NXAlwbot; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 1E10D20B5682; Thu, 8 Apr 2021 14:24:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1E10D20B5682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1617917099; bh=vErSLpvWzZ6hCAsnHrm+FTKiWNXcWT/ny7pYiGb2wpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NXAlwbotdgRDrYT0HvvrmfkqesMSOaQ0pfouzSPtnUG3+8gCPnGWyQBW7CLqwa/mq A++r83e409uQN7N0w+lq056MzXNMivPUiUcZWI1q09xHWHCUrZMGJGdwBBU8Fi08l8 gBPyjcRdmyrHbVELL/uPqvo3z+x/O2NQ4vr7NnJk= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v2 2/2] MinPlatformPkg/BoardAcpiTableLibNull: Improve maintainability Date: Thu, 8 Apr 2021 14:24:33 -0700 Message-Id: <20210408212433.632-3-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210408212433.632-1-mikuback@linux.microsoft.com> References: <20210408212433.632-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki The NULL instance of BoardAcpiTableLib in MinPlatformPkg currently has a few organization issues that make it more difficult to find and use than a typical NULL library instance. 1. It shares a directory with another unrelated library instance. 2. The directory name "BoardAcpiLibNull" is not directly related to either library instance name in the directory. 3. The library instance has unnecessary dependencies. 4. The BASE_NAME does not indicate the library instance is the NULL instance. 5. The C source file name does not match the INF file name making finding the C source by search more cumbersome than needed. This change resolves the above issues to improve use and maintainability. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull/BoardAcpiTa= bleLib.c =3D> BoardAcpiTableLibNull/BoardAcpiTableLibNull.c} | 3 --- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull =3D> BoardA= cpiTableLibNull}/BoardAcpiTableLibNull.inf | 12 ++++---= ----- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/= BoardAcpiTableLib.c b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcp= iTableLibNull/BoardAcpiTableLibNull.c similarity index 73% rename from Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/B= oardAcpiTableLib.c rename to Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNul= l/BoardAcpiTableLibNull.c index e49e6ad44162..8ab52c5f45a0 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piTableLib.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNull/Bo= ardAcpiTableLibNull.c @@ -6,9 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include -#include -#include -#include =20 EFI_STATUS EFIAPI diff --git a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/= BoardAcpiTableLibNull.inf b/Platform/Intel/MinPlatformPkg/Acpi/Library/Bo= ardAcpiTableLibNull/BoardAcpiTableLibNull.inf similarity index 67% rename from Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/B= oardAcpiTableLibNull.inf rename to Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNul= l/BoardAcpiTableLibNull.inf index 04f55b49d5a1..6102897ab67b 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piTableLibNull.inf +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNull/Bo= ardAcpiTableLibNull.inf @@ -1,7 +1,8 @@ ## @file -# Component information file for Board Acpi Library +# Component information file for NULL instance of the Board ACPI Enable = library # # Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -9,20 +10,15 @@ =20 [Defines] INF_VERSION =3D 0x00010005 - BASE_NAME =3D BoardAcpiTableLib + BASE_NAME =3D BoardAcpiTableLibNull FILE_GUID =3D F220FAB7-F8E4-4E7A-A599-D47E2D54795= 6 MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D BoardAcpiTableLib =20 -[LibraryClasses] - BaseLib - PcdLib - DebugLib - [Packages] MinPlatformPkg/MinPlatformPkg.dec MdePkg/MdePkg.dec =20 [Sources] - BoardAcpiTableLib.c + BoardAcpiTableLibNull.c diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/= Intel/MinPlatformPkg/MinPlatformPkg.dsc index da27aa1c4227..cf3ff13e7b29 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -78,7 +78,7 @@ [LibraryClasses.common] FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperP= latformLib/PeiFspWrapperPlatformLib.inf =20 BoardInitLib|MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/Boar= dInitLibNull.inf - BoardAcpiTableLib|MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piTableLibNull.inf + BoardAcpiTableLib|MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNull/Bo= ardAcpiTableLibNull.inf BoardAcpiEnableLib|MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/= BoardAcpiEnableLibNull.inf SiliconPolicyInitLib|MinPlatformPkg/PlatformInit/Library/SiliconPolicy= InitLibNull/SiliconPolicyInitLibNull.inf SiliconPolicyUpdateLib|MinPlatformPkg/PlatformInit/Library/SiliconPoli= cyUpdateLibNull/SiliconPolicyUpdateLibNull.inf @@ -151,7 +151,7 @@ [Components] MinPlatformPkg/Acpi/AcpiSmm/AcpiStandaloneMm.inf MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/BoardAcpiEnableLibN= ull.inf - MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAcpiTableLibNull.inf + MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNull/BoardAcpiTableLibNul= l.inf MinPlatformPkg/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpi= SupportLib.inf MinPlatformPkg/Acpi/Library/MultiBoardAcpiSupportLib/SmmMultiBoardAcpi= SupportLib.inf =20 --=20 2.28.0.windows.1