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.web11.12072.1617820448536771509 for ; Wed, 07 Apr 2021 11:34:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=EUW7fShV; 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 1ACA620B5683; Wed, 7 Apr 2021 11:34:08 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1ACA620B5683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1617820448; bh=cPxDHWZgGsgbY/zb0KZsEI0bZioljvGXF+0rDB08U8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EUW7fShVTjMW8hYFRmzPobkETSyGtOCsVPeK1KLLj1z+gskpmkYtA01SfjdJmEm0T rMjSN5e/fwLVsGVvnE8DyGc085JMQdDohxk+eAyytahARKRU7/mRuJUrhmYw81x0bv /lHWlAoDfJ4n5JwtxCsDb2v7hc7ZCtFDS390k+dM= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 2/2] MinPlatformPkg/BoardAcpiTableLibNull: Improve maintainability Date: Wed, 7 Apr 2021 11:33:24 -0700 Message-Id: <20210407183324.1659-3-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210407183324.1659-1-mikuback@linux.microsoft.com> References: <20210407183324.1659-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} | 4 +--- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull =3D> BoardA= cpiTableLibNull}/BoardAcpiTableLibNull.inf | 12 ++++---= ----- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 4 ++-- 3 files changed, 7 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..0f871b6f07ef 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piTableLib.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiTableLibNull/Bo= ardAcpiTableLibNull.c @@ -5,10 +5,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 +#include #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