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.12067.1617820443517174622 for ; Wed, 07 Apr 2021 11:34:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=h4QGMhyA; 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 230E720B5682; Wed, 7 Apr 2021 11:34:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 230E720B5682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1617820443; bh=ibRo3C+jEye9+H2EDl7iC8+7l/PGBITBx4pV5TkLGsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h4QGMhyA8+Me5Kxfu4UHgFL7nAPwuHQddOOXryJMyQefleWm/TIw+iWt7bZyxF/ci ENhkkEoGfEcSK9XviulAXsXffWooC+yBY3MCQduX5fHHWMn2xPx8UHForDXpdJvNwv svTZMl1JgIyvQJ3b3IbxmB1ckVkYEzxXt3q3IoXA= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/BoardAcpiEnableLibNull: Improve maintainability Date: Wed, 7 Apr 2021 11:33:23 -0700 Message-Id: <20210407183324.1659-2-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 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} | 4 +--- Platform/Intel/MinPlatformPkg/Acpi/Library/{BoardAcpiLibNull =3D> BoardA= cpiEnableLibNull}/BoardAcpiEnableLibNull.inf | 12 ++++= -------- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 4 ++-- 3 files changed, 7 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..494389ae5dc8 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAc= piEnableLib.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/BoardAcpiEnableLibNull/B= oardAcpiEnableLibNull.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/= 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