From: "Oram, Isaac W" <isaac.w.oram@intel.com>
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>,
Chasel Chiu <chasel.chiu@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 11/13] KabylakeOpenBoardPkg/Build: Reduce unnecessary code
Date: Fri, 22 Jul 2022 11:46:22 -0700 [thread overview]
Message-ID: <014f6c3ef5912329bb2d1f1681aeca0c94026a79.1658513099.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1658513099.git.isaac.w.oram@intel.com>
Leverage common includes to reduce duplicated or low value code.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
.../AspireVn7Dash572G/OpenBoardPkgPcd.dsc | 52 +++++--------------
.../GalagoPro3/OpenBoardPkgPcd.dsc | 51 +++++-------------
.../KabylakeRvp3/OpenBoardPkgPcd.dsc | 51 +++++-------------
3 files changed, 36 insertions(+), 118 deletions(-)
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd.dsc
index 02080aa864..da8f9a075c 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgPcd.dsc
@@ -195,43 +195,18 @@
######################################
# Platform Configuration
######################################
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE # FIXME: Define by PERFORMANCE_BUILD?
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE # FIXME: Define in build-system?
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-# TODO: Is TESTING setting, is not test point
-!if $(TARGET) == DEBUG
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE
-!else
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
-!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
+
+ #
+ # Commonly used MinPlatform feature configuration logic that maps functionity to stage
+ #
+ !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc
######################################
# Board Configuration
@@ -285,9 +260,6 @@
!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
-!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1
-!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
!if $(TARGET) == RELEASE
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
index 26e2c16aae..2b9fbe81c0 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
@@ -163,42 +163,18 @@
######################################
# Platform Configuration
######################################
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-!if $(TARGET) == DEBUG
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE
-!else
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
-!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
+
+ #
+ # Commonly used MinPlatform feature configuration logic that maps functionity to stage
+ #
+ !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc
######################################
# Board Configuration
@@ -233,9 +209,6 @@
!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x5000
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|TRUE
-!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1
-!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE
!if $(TARGET) == DEBUG
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
index ccf757e202..360b99e0cf 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
@@ -163,42 +163,18 @@
######################################
# Platform Configuration
######################################
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
- gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
- gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
- gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
- gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-!if $(TARGET) == DEBUG
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE
-!else
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
-!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
+
+ #
+ # Commonly used MinPlatform feature configuration logic that maps functionity to stage
+ #
+ !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc
######################################
# Board Configuration
@@ -233,9 +209,6 @@
!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x5000
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|TRUE
-!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1
-!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE
!if $(TARGET) == DEBUG
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE
--
2.36.1.windows.1
next prev 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 ` [edk2-devel][edk2-platforms][PATCH V1 03/13] Features/Intel: " 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 ` Oram, Isaac W [this message]
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=014f6c3ef5912329bb2d1f1681aeca0c94026a79.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