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.web12.294.1617917095398635006 for ; Thu, 08 Apr 2021 14:24:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=iqXdgSLm; 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 0F58D20B5681; Thu, 8 Apr 2021 14:24:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0F58D20B5681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1617917095; bh=ptXSKXbi0A7W7O3t4vJlh4YHQf21XEB0wRL+DRKUQrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iqXdgSLm49USrjRep+5QsfMfCMa55R6oLWXoKCMvBNVq+dZ3zSMs+QOsxHVM4CKol Oi+3NZSkJ9/scyXVF76Dbtzz0gzxGJMzW5f8U7u6beKaGTdx+gA/ZYa0JLsJBk0ocY dwdAy+XDzBZzfqV1flneWLEBuwDT8ZGZRXhrtB58= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v2 1/2] MinPlatformPkg/BoardAcpiEnableLibNull: Improve maintainability Date: Thu, 8 Apr 2021 14:24:32 -0700 Message-Id: <20210408212433.632-2-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 BoardAcpiEnableLib 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 maintainability. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull/BoardAcpiEn= ableLib.c =3D> BoardAcpiEnableLibNull/BoardAcpiEnableLibNull.c} | 3 --- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull =3D> BoardA= cpiEnableLibNull}/BoardAcpiEnableLibNull.inf | 12 ++++= -------- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/= BoardAcpiEnableLib.c b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAc= piEnableLibNull/BoardAcpiEnableLibNull.c similarity index 73% rename from Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/B= oardAcpiEnableLib.c rename to Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNu= ll/BoardAcpiEnableLibNull.c index 334cb21714ac..66d52c143c4a 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piEnableLib.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/B= oardAcpiEnableLibNull.c @@ -5,10 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 -#include #include -#include -#include =20 EFI_STATUS EFIAPI diff --git a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/= BoardAcpiEnableLibNull.inf b/Platform/Intel/MinPlatformPkg/Acpi/Library/B= oardAcpiEnableLibNull/BoardAcpiEnableLibNull.inf similarity index 67% rename from Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/B= oardAcpiEnableLibNull.inf rename to Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNu= ll/BoardAcpiEnableLibNull.inf index 54985ee50d5f..90bed3760e2a 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piEnableLibNull.inf +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/B= oardAcpiEnableLibNull.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 BoardAcpiEnableLib + BASE_NAME =3D BoardAcpiEnableLibNull FILE_GUID =3D EAF8AA6D-549A-40CC-8FB2-3A1FFEC4160= 1 MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D BoardAcpiEnableLib =20 -[LibraryClasses] - BaseLib - PcdLib - DebugLib - [Packages] MinPlatformPkg/MinPlatformPkg.dec MdePkg/MdePkg.dec =20 [Sources] - BoardAcpiEnableLib.c + BoardAcpiEnableLibNull.c diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/= Intel/MinPlatformPkg/MinPlatformPkg.dsc index 998ee7909568..da27aa1c4227 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -79,7 +79,7 @@ [LibraryClasses.common] =20 BoardInitLib|MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/Boar= dInitLibNull.inf BoardAcpiTableLib|MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piTableLibNull.inf - BoardAcpiEnableLib|MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardA= cpiEnableLibNull.inf + BoardAcpiEnableLib|MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/= BoardAcpiEnableLibNull.inf SiliconPolicyInitLib|MinPlatformPkg/PlatformInit/Library/SiliconPolicy= InitLibNull/SiliconPolicyInitLibNull.inf SiliconPolicyUpdateLib|MinPlatformPkg/PlatformInit/Library/SiliconPoli= cyUpdateLibNull/SiliconPolicyUpdateLibNull.inf =20 @@ -150,7 +150,7 @@ [Components] MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf MinPlatformPkg/Acpi/AcpiSmm/AcpiStandaloneMm.inf MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf - MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAcpiEnableLibNull.in= f + MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/BoardAcpiEnableLibN= ull.inf MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAcpiTableLibNull.inf MinPlatformPkg/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpi= SupportLib.inf MinPlatformPkg/Acpi/Library/MultiBoardAcpiSupportLib/SmmMultiBoardAcpi= SupportLib.inf --=20 2.28.0.windows.1