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>, Ray Ni <ray.ni@intel.com>,
	Guo Dong <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
Date: Wed, 10 Aug 2022 15:46:47 -0700	[thread overview]
Message-ID: <2c8041f852ea4462daabe8bb323f201caa9b501f.1660171324.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1660171324.git.isaac.w.oram@intel.com>

Feature packages should build with -a IA32 -a X64.
The commonly board selected libraries were moved to the
PlatformPayloadPkg build so as not to conflict with other
advanced features.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/PlatformPayloadFeature.dsc        | 42 +++++++++----------
 .../PlatformPayloadPkg/PlatformPayloadPkg.dsc | 26 +++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
index 3003c563c9..bc776659b6 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
@@ -19,7 +19,9 @@
     !error "DXE_ARCH must be specified to build this feature!"
   !endif
 
-  DEFINE SMM_VARIABLE                 = TRUE
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
 
 
 ################################################################################
@@ -28,7 +30,7 @@
 #
 ################################################################################
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
 !if $(SMM_VARIABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
@@ -45,24 +47,11 @@
 #
 ################################################################################
 
-[LibraryClasses]
-  !if $(SMM_VARIABLE) == TRUE
-    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
-    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-    # (Optional for variable modules debug output
-    PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
-    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  !endif
-
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
     SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
     FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
-    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
-    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
   !endif
 
 ################################################################################
@@ -90,13 +79,20 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-      PlatformPayloadPkg/Fvb/FvbSmm.inf {
-        <LibraryClasses>
-          NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
-      }
+    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
+
+    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+    }
+
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
       <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
         NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
@@ -106,7 +102,11 @@
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
         NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
     }
-    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
   !endif
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
index adf028c511..702523a73f 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
@@ -27,6 +27,10 @@
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
+
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
@@ -55,7 +59,7 @@
   gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
 !if $(SOURCE_DEBUG_ENABLE)
@@ -90,6 +94,26 @@
 !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
 !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
+#
+# For standalone platform payload package build there are specific library requirements
+#
+
+[LibraryClasses]
+  !if $(SMM_VARIABLE) == TRUE
+    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+    # (Optional for variable modules debug output
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+  !endif
+
+[LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
+  !if $(SMM_VARIABLE) == TRUE
+    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
+    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
+  !endif
+
 #
 # This package always builds the feature.
 #
-- 
2.36.1.windows.1


  reply	other threads:[~2022-08-10 22:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 22:46 [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions Oram, Isaac W
2022-08-10 22:46 ` Oram, Isaac W [this message]
2022-08-12 17:41   ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Chaganty, Rangasai V
2022-08-12 22:53   ` Guo Dong
2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
2022-08-12 21:55   ` Chaganty, Rangasai V
2022-08-12 22:51   ` Guo Dong
2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
2022-08-12 22:54   ` Guo Dong
2022-08-16 21:31   ` Chaganty, Rangasai V

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=2c8041f852ea4462daabe8bb323f201caa9b501f.1660171324.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