From: "Yuwei Chen" <yuwei.chen@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Li, Yi1" <yi1.li@intel.com>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value
Date: Fri, 22 Jul 2022 02:28:40 +0000 [thread overview]
Message-ID: <MW5PR11MB59064BEAF40DA322A7EF0FC496909@MW5PR11MB5906.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ffb7399ff7d8e9ef13211234dd37dbeb0b3c5741.1657518401.git.yi1.li@intel.com>
Hi Yi,
Could you describe the bug with an example? In which scenario the dsc defined pcd will not override the dec definition?
Thanks,
Christine
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of yi1 li
> Sent: Monday, July 11, 2022 1:48 PM
> To: devel@edk2.groups.io
> Cc: Li, Yi1 <yi1.li@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao,
> Liming <gaoliming@byosoft.com.cn>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value
> instead of default value
>
> This patch is a bug fix about FeatureFlagExpression in INF file:
> INF [Source] section now unconditionally use Pcd default value in DEC when
> handling FeatureFlagExpression, it is wrong.
> If a Pcd value has been set in the DSC file, we should use latest value in DSC
> instead of default value.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>
> Signed-off-by: Yi Li <yi1.li@intel.com>
> ---
> BaseTools/Source/Python/Workspace/InfBuildData.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py
> b/BaseTools/Source/Python/Workspace/InfBuildData.py
> index 5b9b3d7b4f..e4ff1c6686 100644
> --- a/BaseTools/Source/Python/Workspace/InfBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
> @@ -1084,7 +1084,9 @@ class InfBuildData(ModuleBuildClassObject):
> else:
> for Name, Guid in self.Pcds:
> if self.Pcds[(Name, Guid)].Type == 'FeatureFlag' or self.Pcds[(Name,
> Guid)].Type == 'FixedAtBuild':
> - Pcds['%s.%s' % (Guid, Name)] = self.Pcds[(Name,
> Guid)].DefaultValue
> + PcdFullName = '%s.%s' % (Guid, Name);
> + if not PcdFullName in Pcds:
> + Pcds[PcdFullName] = self.Pcds[(Name,
> + Guid)].DefaultValue
> try:
> Value = ValueExpression(Instance, Pcds)()
> if Value == True:
> --
> 2.31.1.windows.1
>
>
>
>
>
next prev parent reply other threads:[~2022-07-22 2:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1657518401.git.yi1.li@intel.com>
2022-07-11 5:48 ` [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value yi1 li
2022-07-22 2:28 ` Yuwei Chen [this message]
2022-07-22 2:46 ` [edk2-devel] " yi1 li
2022-07-24 5:06 ` Bob Feng
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=MW5PR11MB59064BEAF40DA322A7EF0FC496909@MW5PR11MB5906.namprd11.prod.outlook.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