[edk2-devel][edk2-platforms][PATCH V1 01/13] MinPlatformPkg/Include: Simplify board creation

Oram, Isaac W isaac.w.oram at intel.com
Fri Jul 22 18:46:12 UTC 2022


Reduce the need for boards to initialize common
MinPlatformPkg PCD used in build files.

Cc: Chasel Chiu <chasel.chiu at intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Cc: Isaac Oram <isaac.w.oram at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Eric Dong <eric.dong at intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram at intel.com>
---
 .../Dsc/MinPlatformFeaturesPcd.dsc.inc        | 26 +++++++++++++++++++
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   | 14 +++++-----
 2 files changed, 32 insertions(+), 8 deletions(-)
 create mode 100644 Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc b/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
new file mode 100644
index 0000000000..842668a081
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
@@ -0,0 +1,26 @@
+## @file
+#  DSC file for defining default PCD for MinPlatform features.
+#
+# This makes it easy for boards to initially configure their build.
+#
+# This initializes features to be disable by default.
+# A board can enable a feature by configuring the PCD in the board DSC file
+# after this file has been included.
+#
+# Copyright (C) 2022 Intel Corporation
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[PcdsFeatureFlag]
+ gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit            |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit              |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly               |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable          |FALSE
+
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable          |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable                    |FALSE
+
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable       |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable             |FALSE
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 09aa6fe4d5..90127c16b5 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -38,14 +38,12 @@
 #
 ################################################################################
 
-[PcdsFeatureFlag]
-  # configuration
-    gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-    gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
-    gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
-    gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
-    gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
-    gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|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
 
 ################################################################################
 #
-- 
2.36.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91734): https://edk2.groups.io/g/devel/message/91734
Mute This Topic: https://groups.io/mt/92554227/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list