public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary
@ 2021-06-10  1:38 Zhiguang Liu
  2021-06-10  3:03 ` Guo Dong
  0 siblings, 1 reply; 3+ messages in thread
From: Zhiguang Liu @ 2021-06-10  1:38 UTC (permalink / raw)
  To: devel; +Cc: Maurice Ma, Guo Dong, Benjamin You

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

V3:
Not remove some PCDs for they will be consumed soon

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 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 37ad5a0ae7..4b0ec3a059 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -336,11 +336,11 @@
 
 ################################################################################
 #
-# 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
@@ -363,6 +363,9 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE
+  gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
 
 ################################################################################
 #
-- 
2.30.0.windows.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary
  2021-06-10  1:38 [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary Zhiguang Liu
@ 2021-06-10  3:03 ` Guo Dong
  2021-06-10  4:33   ` Zhiguang Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Guo Dong @ 2021-06-10  3:03 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Ma, Maurice, You, Benjamin


This patch 1) changed PCD type from Dynamic to DynamicEX 2) added 3 PCDs.
It would be great if you could describe why 3 PCDs are added in the commit message.

With that:
Reviewed-by: Guo Dong <guo.dong@intel.com>

Thanks,
Guo

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Wednesday, June 9, 2021 6:38 PM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to
> pass PCD across binary
> 
> 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
> 
> V3:
> Not remove some PCDs for they will be consumed soon
> 
> 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 | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 37ad5a0ae7..4b0ec3a059 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -336,11 +336,11 @@
> 
> 
> 
> ##########################################################
> ######################
> 
>  #
> 
> -# 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
> 
> @@ -363,6 +363,9 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
> 
>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0
> 
>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
> 
> 
> 
> 
> ##########################################################
> ######################
> 
>  #
> 
> --
> 2.30.0.windows.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary
  2021-06-10  3:03 ` Guo Dong
@ 2021-06-10  4:33   ` Zhiguang Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Zhiguang Liu @ 2021-06-10  4:33 UTC (permalink / raw)
  To: Dong, Guo, devel@edk2.groups.io; +Cc: Ma, Maurice, You, Benjamin

Hi Guo,

Thanks for the comments.
I described the reason in the V2 commint message:
   Explicitly define some PCDs as DynamicEx, or their default type will be Dynamic

Thanks
Zhiguang

> -----Original Message-----
> From: Dong, Guo <guo.dong@intel.com>
> Sent: Thursday, June 10, 2021 11:04 AM
> To: Liu, Zhiguang <zhiguang.liu@intel.com>; devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: RE: [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic
> to pass PCD across binary
> 
> 
> This patch 1) changed PCD type from Dynamic to DynamicEX 2) added 3 PCDs.
> It would be great if you could describe why 3 PCDs are added in the commit
> message.
> 
> With that:
> Reviewed-by: Guo Dong <guo.dong@intel.com>
> 
> Thanks,
> Guo
> 
> > -----Original Message-----
> > From: Liu, Zhiguang <zhiguang.liu@intel.com>
> > Sent: Wednesday, June 9, 2021 6:38 PM
> > To: devel@edk2.groups.io
> > Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> > <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>
> > Subject: [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic
> > to pass PCD across binary
> >
> > 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
> >
> > V3:
> > Not remove some PCDs for they will be consumed soon
> >
> > 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 | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> > b/UefiPayloadPkg/UefiPayloadPkg.dsc
> > index 37ad5a0ae7..4b0ec3a059 100644
> > --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> > +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> > @@ -336,11 +336,11 @@
> >
> >
> >
> >
> ##########################################################
> > ######################
> >
> >  #
> >
> > -# 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
> >
> > @@ -363,6 +363,9 @@
> >    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
> >
> >    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0
> >
> >    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
> >
> > +  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0
> >
> > +  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE
> >
> > +  gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
> >
> >
> >
> >
> >
> ##########################################################
> > ######################
> >
> >  #
> >
> > --
> > 2.30.0.windows.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-10  4:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-10  1:38 [Patch V3] UefiPayloadPkg: Use DynamicEx instead of Dynamic to pass PCD across binary Zhiguang Liu
2021-06-10  3:03 ` Guo Dong
2021-06-10  4:33   ` Zhiguang Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox