Re: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
Reviewed-by: Guo Dong -Original Message- From: Oram, Isaac W Sent: Wednesday, August 10, 2022 3:47 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Desimone, Nathaniel L ; Gao, Liming ; Ni, Ray ; Dong, Guo Subject: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue 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 Cc: Nate DeSimone Cc: Liming Gao Cc: Ray Ni Cc: Guo Dong Signed-off-by: Isaac Oram --- .../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.d +++ sc @@ -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 { - - NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf - } +PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +} + +PlatformPayloadPkg/Fvb/FvbSmm.inf { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf +} + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { + + 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 { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib + .inf NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf } -MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf +MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf { + + 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
Re: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
Small cosmetic feedback. There is an (unnecessary) open "(" in line 145. Please remove it before checking in. # (Optional for variable modules debug output With that: Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Wednesday, August 10, 2022 3:47 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Desimone, Nathaniel L ; Gao, Liming ; Ni, Ray ; Dong, Guo Subject: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue 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 Cc: Nate DeSimone Cc: Liming Gao Cc: Ray Ni Cc: Guo Dong Signed-off-by: Isaac Oram --- .../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.d +++ sc @@ -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 { - - NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf - } +PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +} + +PlatformPayloadPkg/Fvb/FvbSmm.inf { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf +} + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { + + 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 { + + PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib + .inf NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf } -MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf +MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf { + + 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 ---