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>,
	Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Eric Dong <eric.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 05/13] MinPlatformPkg/Include: Simplify build logic
Date: Fri, 22 Jul 2022 11:46:16 -0700	[thread overview]
Message-ID: <2082a8bc205a50292e6ac9d23e6c94e2a2b4e0aa.1658513099.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1658513099.git.isaac.w.oram@intel.com>

Removed the logic that doesn't build some things only if you are doing a
shell boot.  Since they are built for stage 1 or 2, there is no porting
benefit to this logic. Build simplified to build both sets of drivers.

Switched from PcdSmiHandlerProfileEnable to using RELEASE build type to
disable SMI profiling.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/Dsc/CoreCommonLib.dsc             |  6 ++---
 .../Include/Dsc/CoreDxeInclude.dsc            | 23 +++++++++----------
 .../Dsc/MinPlatformFeaturesPcd.dsc.inc        |  1 -
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
index b77d55dfd5..3749199da7 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -122,10 +122,10 @@
   DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
 !endif
 
-!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE
-  SmiHandlerProfileLib|MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf
-!else
+!if $(TARGET) == RELEASE
   SmiHandlerProfileLib|MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.inf
+!else
+  SmiHandlerProfileLib|MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf
 !endif
 
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
index c2ade240f3..21570afe3f 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
@@ -29,7 +29,17 @@
   PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
+  #
+  # Emulated variables for stages 1-4
+  #
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
+    <PcdsFixedAtBuild>
+      gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
+  }
+
+  #
+  # Real variables for stages 5+
+  #
   MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
@@ -38,12 +48,6 @@
       NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
       NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
   }
-!else
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
-    <PcdsFixedAtBuild>
-      gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
-  }
-!endif
 
   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
 
@@ -122,7 +126,6 @@
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
 
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
 
@@ -133,14 +136,11 @@
 
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
-!endif
 
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
   MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
-!endif
 
 !if gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
@@ -162,4 +162,3 @@
 !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
   ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
 !endif
-
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc b/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
index 842668a081..2d665c25c5 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
@@ -22,5 +22,4 @@
  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable          |FALSE
  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable                    |FALSE
 
- gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable       |FALSE
  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable             |FALSE
-- 
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 ` [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 ` Oram, Isaac W [this message]
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=2082a8bc205a50292e6ac9d23e6c94e2a2b4e0aa.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