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>,
	Sai Chaganty <rangasai.v.chaganty@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 03/13] Features/Intel: Reduce duplicate code
Date: Fri, 22 Jul 2022 11:46:14 -0700	[thread overview]
Message-ID: <2efb22612de62016524ab4d5321dd495781c90a7.1658513099.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1658513099.git.isaac.w.oram@intel.com>

Enable simpler initialation of the MinPlatformPkg feature
selection PCD.  Most features and boards don't benefit from
initializing these.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc     | 13 ++++++-------
 .../AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc   | 12 ++++--------
 .../BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc   | 15 +++++++--------
 .../PostCodeDebugFeaturePkg.dsc                   | 15 +++++++--------
 .../NetworkFeaturePkg/NetworkFeaturePkg.dsc       | 13 ++++++-------
 .../IpmiFeaturePkg/IpmiFeaturePkg.dsc             | 13 ++++++-------
 .../SpcrFeaturePkg/SpcrFeaturePkg.dsc             | 13 ++++++-------
 .../PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc | 13 ++++++-------
 .../SmbiosFeaturePkg/SmbiosFeaturePkg.dsc         | 13 ++++++-------
 .../TemplateFeaturePkg/TemplateFeaturePkg.dsc     | 13 ++++++-------
 .../LogoFeaturePkg/LogoFeaturePkg.dsc             | 12 ++++++------
 .../UserAuthFeaturePkg/UserAuthFeaturePkg.dsc     | 13 ++++++-------
 .../VirtualKeyboardFeaturePkg.dsc                 | 13 ++++++-------
 13 files changed, 78 insertions(+), 93 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 28530b8c67..b572f2eda8 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -88,13 +88,12 @@
 [PcdsFixedAtBuild]
   gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
 
-[PcdsFeatureFlag]
-  #
-  # MinPlatform common include currently required PCD
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc
index 3b76d39ea8..306d8bce16 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc
@@ -28,15 +28,11 @@
   MinPlatformPkg/MinPlatformPkg.dec
 
 #
-# Since there are no 32b libraries or components in this package, these PCD are specified for 64b only
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
 #
-[PcdsFeatureFlag.X64]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc
index 56cad020bf..cad4e30aa3 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc
@@ -28,17 +28,16 @@
   MinPlatformPkg/MinPlatformPkg.dec
   BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
-
 [PcdsDynamicExDefault]
   gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|TRUE
 
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
+
 #
 # Include common libraries
 #
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc
index 349604098f..16642e6c59 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc
@@ -27,20 +27,19 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
-
 [PcdsDynamicExDefault]
   #
   # PCD needed for this feature to build
   #
   gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode|TRUE
 
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
+
 #
 # Include common libraries
 #
diff --git a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index cdc5dc851d..87060714e7 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dsc b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dsc
index c35e1e174e..76d2c45a73 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dsc
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dsc
@@ -28,13 +28,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc
index 2ee874a58e..8d71939a16 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc b/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
index e16a1f8d00..2d1d197b2a 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dsc b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dsc
index e72b341154..5a9ff5b1b8 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dsc
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
index 03657047dc..191173051f 100644
--- a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
+++ b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dsc b/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dsc
index 5a6436178c..ffcd104a3e 100644
--- a/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dsc
+++ b/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dsc
@@ -31,12 +31,12 @@
 [PcdsFeatureFlag]
   gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable                              |FALSE
 
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dsc b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dsc
index 10360c5737..8af4dd4cd9 100644
--- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dsc
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dsc b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dsc
index 6717c892f1..d13bd673d3 100644
--- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dsc
+++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dsc
@@ -27,13 +27,12 @@
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
-[PcdsFeatureFlag]
-  #
-  # PCD needed for MinPlatform build includes
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable                |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
+#
+# MinPlatform common include for required feature PCD
+# These PCD must be set before the core include files, CoreCommonLib,
+# CorePeiLib, and CoreDxeLib.
+#
+!include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
 
 #
 # Include common libraries
-- 
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 ` [edk2-devel][edk2-platforms][PATCH V1 02/13] WhitleyOpenBoardPkg/Build: Reduce duplicate code Oram, Isaac W
2022-07-22 18:46 ` Oram, Isaac W [this message]
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=2efb22612de62016524ab4d5321dd495781c90a7.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