From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web08.3661.1622694356587217611 for ; Wed, 02 Jun 2021 21:25:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: dKk1f4IsAz52f8KL/zAOerYLlq3+qpg0UI53Ta5BgMXw7d6qvSJSIIfAjPo/W7kzjPCXrS0tls qr5nsL+bFJWw== X-IronPort-AV: E=McAfee;i="6200,9189,10003"; a="202102839" X-IronPort-AV: E=Sophos;i="5.83,244,1616482800"; d="scan'208";a="202102839" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 21:25:53 -0700 IronPort-SDR: EjPrwijKpOPhvvw9MUsSF+UDQ+20hm0DIPVIMbYQ9OwKfRsntaj4aGsklFT24njCiTU1zy8ZNT hR0t5IWOMCKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,244,1616482800"; d="scan'208";a="483316990" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 02 Jun 2021 21:25:52 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You Subject: [Patch V2] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary Date: Thu, 3 Jun 2021 12:25:36 +0800 Message-Id: <20210603042536.1715-1-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable V1: When passing PCD database from Edk2 boot loader to Universal Payload, the l= ocal token number in boot loader PCD database can be different with that in Payl= oad PCD database. Dynamic PCD directly use local token number, while DynamicEx will search to= ken 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 PcdFlashNvStorageFtwSpareBas= e, because they are not consumed by any modules. Explicitly define some PCDs as DynamicEx, or their default type will be Dyn= amic Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 37ad5a0ae7..696fe04e14 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -336,15 +336,13 @@ =0D ##########################################################################= ######=0D #=0D -# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Pla= tform=0D +# Pcd DynamicEx Section - list of all EDK II PCD Entries defined by this P= latform=0D #=0D ##########################################################################= ######=0D =0D -[PcdsDynamicDefault]=0D +[PcdsDynamicExDefault]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0=0D gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3=0D =0D ## This PCD defines the video horizontal resolution.=0D @@ -363,6 +361,9 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100=0D gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0=0D gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE=0D + gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0=0D =0D ##########################################################################= ######=0D #=0D --=20 2.30.0.windows.2