public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Oram, Isaac W" <isaac.w.oram@intel.com>
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 02/13] WhitleyOpenBoardPkg/Build: Reduce duplicate code
Date: Fri, 22 Jul 2022 11:46:13 -0700	[thread overview]
Message-ID: <edefa3f5621207dda9366f7ddd4b697b5d4b9535.1658513099.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1658513099.git.isaac.w.oram@intel.com>

Leverage common includes for default feature values.
Remove PERFORMANCE_ENABLE in favor of PcdPerformanceEnable.
Use DpDynamicCommand instead of standalone DpApp.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 ...blePerformanceMonitoringInfrastructure.dsc |  5 +--
 ...anceMonitoringInfrastructurePostMemory.fdf |  5 +--
 ...manceMonitoringInfrastructurePreMemory.fdf |  2 +-
 .../Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc | 45 ++++++++++++++-----
 .../WhitleyOpenBoardPkg/PlatformPkgConfig.dsc |  2 -
 5 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnablePerformanceMonitoringInfrastructure.dsc b/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnablePerformanceMonitoringInfrastructure.dsc
index c308e0df4f..7439b2fb36 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnablePerformanceMonitoringInfrastructure.dsc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnablePerformanceMonitoringInfrastructure.dsc
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 
-!if $(PERFORMANCE_ENABLE) == TRUE
+!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
 
 [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEdkiiFpdtStringRecordEnableOnly|TRUE
@@ -34,7 +34,6 @@
 [Components.X64]
   MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
   MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
-  MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
-  ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
+  ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
 
 !endif
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePostMemory.fdf b/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePostMemory.fdf
index a3576bd7a8..52b79a31d0 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePostMemory.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePostMemory.fdf
@@ -6,9 +6,8 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 
-!if $(PERFORMANCE_ENABLE) == TRUE
+!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
   INF  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
   INF  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
-  INF  MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
-  INF  ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
+  INF  ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
 !endif
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePreMemory.fdf b/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePreMemory.fdf
index dbc98f6f1f..18574f67ef 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePreMemory.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/EnablePerformanceMonitoringInfrastructurePreMemory.fdf
@@ -6,6 +6,6 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 
-!if $(PERFORMANCE_ENABLE) == TRUE
+!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
   INF  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf
 !endif
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
index cefee8273b..5b5d84779e 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
@@ -39,12 +39,39 @@
   DEFINE IIO_INSTANCE           = UnknownCpu
 !endif
 
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+# Optional MinPlatformPkg features should be enabled after this
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
+
+#
+# AdvancedFeature common include for feature enable/disable PCD
+#
+#
 !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
 
+#
+# PCD required by advanced features
+#
 [PcdsFixedAtBuild]
   gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
 
+#
+# Feature enable/disable flags
+#
 [PcdsFeatureFlag]
+  #
+  # MinPlatform control flags
+  #
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit                       |FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit                         |FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly                          |FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                  |TRUE
+  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                        |TRUE
+
   #
   # Debugging features
   #
@@ -124,20 +151,16 @@
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
 #
 ################################################################################
-[PcdsFeatureFlag]
-  #
-  # MinPlatform control flags
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit     |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit       |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly        |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable      |FALSE
 
+[PcdsFeatureFlag]
+  #
   # don't degrade 64bit MMIO space to 32-bit
+  #
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
 
+  #
   # Server doesn't support capsule update on Reset.
+  #
   gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|TRUE
   gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugSupport|FALSE
@@ -761,13 +784,13 @@
 
   UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
     <LibraryClasses>
-    !if $(PERFORMANCE_ENABLE) == TRUE
+    !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
       TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf
     !endif
   }
 
 [Components.X64]
-  !include WhitleyOpenBoardPkg/Include/Dsc/CoreDxeInclude.dsc
+  !include MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
 
   $(RP_PKG)/Platform/Dxe/PlatformType/PlatformType.inf
 
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkgConfig.dsc b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkgConfig.dsc
index a4ac8b6935..c9620f11d8 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkgConfig.dsc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkgConfig.dsc
@@ -15,8 +15,6 @@
 DEFINE CRB_FLAG_ENABLE                       = TRUE
 DEFINE DEBUG_FLAGS_ENABLE                    = FALSE
 
-DEFINE PERFORMANCE_ENABLE                    = TRUE
-
 DEFINE SERVER_BIOS_ENABLE                    = TRUE
 DEFINE PCH_SERVER_BIOS_ENABLE                = TRUE
 
-- 
2.36.1.windows.1


  parent reply	other threads:[~2022-07-22 18:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 18:46 [edk2-devel][edk2-platforms][PATCH V1 00/13] Simplify board porting Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 01/13] MinPlatformPkg/Include: Simplify board creation Oram, Isaac W
2022-07-22 18:46 ` Oram, Isaac W [this message]
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 03/13] Features/Intel: Reduce duplicate code Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 04/13] WhitleyOpenBoardPkg/Build: Reduce unnecessary code Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 05/13] MinPlatformPkg/Include: Simplify build logic Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 06/13] BoardModulePkg/Include: Add include for stage behavior logic Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 07/13] WhiskeyLakeOpenBoardPkg/Build: Reduce unnecessary code Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 08/13] TigerLakeOpenBoardPkg/Build: " Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 09/13] SimicsOpenBoardPkg/Build: " Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 10/13] PurleyOpenBoardPkg/Build: " Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 11/13] KabylakeOpenBoardPkg/Build: " Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 12/13] CometlakeOpenBoardPkg/Build: " Oram, Isaac W
2022-07-22 18:46 ` [edk2-devel][edk2-platforms][PATCH V1 13/13] MinPlatformPkg: Remove unnecessary feature controls Oram, Isaac W
2022-09-01  0:55 ` [edk2-devel][edk2-platforms][PATCH V1 00/13] Simplify board porting Nate DeSimone
2022-09-01  1:48   ` Isaac Oram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=edefa3f5621207dda9366f7ddd4b697b5d4b9535.1658513099.git.isaac.w.oram@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox