[edk2-devel] [Patch V2] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary

Zhiguang Liu posted 1 patch 2 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20210603042536.1715-1-zhiguang.liu@intel.com
There is a newer version of this series
UefiPayloadPkg/UefiPayloadPkg.dsc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[edk2-devel] [Patch V2] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary
Posted by Zhiguang Liu 2 years, 11 months ago
V1:
When passing PCD database from Edk2 boot loader to Universal Payload, the local
token number in boot loader PCD database can be different with that in Payload
PCD database.
Dynamic PCD directly use local token number, while DynamicEx will search token number
by Guid and ExTokenNumber, which are unique pair and can make sure finding the correct
token number in boot loader's PCD database
V2:
Remove PCD PcdFlashNvStorageFtwWorkingBase and PcdFlashNvStorageFtwSpareBase, because they
are not consumed by any modules.
Explicitly define some PCDs as DynamicEx, or their default type will be Dynamic

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 37ad5a0ae7..696fe04e14 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -336,15 +336,13 @@
 
 ################################################################################
 #
-# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
+# Pcd DynamicEx Section - list of all EDK II PCD Entries defined by this Platform
 #
 ################################################################################
 
-[PcdsDynamicDefault]
+[PcdsDynamicExDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
 
   ## This PCD defines the video horizontal resolution.
@@ -363,6 +361,9 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE
+  gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
 
 ################################################################################
 #
-- 
2.30.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76005): https://edk2.groups.io/g/devel/message/76005
Mute This Topic: https://groups.io/mt/83276797/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-