public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTools: fix the bug for Mixed Pcd display in the report
Date: Wed, 4 Jan 2017 05:31:46 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C8CC2@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1483084098-101288-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Friday, December 30, 2016 3:48 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: fix the bug for Mixed Pcd display in the report
>
>Fix the bug to not display the mixed PCD in the Global PCD section, and
>correct the Pcd display name.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/build/BuildReport.py | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/BuildReport.py
>b/BaseTools/Source/Python/build/BuildReport.py
>index fb28970..69dcf99 100644
>--- a/BaseTools/Source/Python/build/BuildReport.py
>+++ b/BaseTools/Source/Python/build/BuildReport.py
>@@ -883,10 +883,19 @@ class PcdReport(object):
>                 #
>                 # Group PCD by their usage type
>                 #
>                 TypeName, DecType = gPcdTypeMap.get(Type, ("", Type))
>                 for Pcd in PcdDict[Key][Type]:
>+                    PcdTokenCName = Pcd.TokenCName
>+                    MixedPcdFlag = False
>+                    if GlobalData.MixedPcd:
>+                        for PcdKey in GlobalData.MixedPcd:
>+                            if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in
>GlobalData.MixedPcd[PcdKey]:
>+                                PcdTokenCName = PcdKey[0]
>+                                MixedPcdFlag = True
>+                        if MixedPcdFlag and not ModulePcdSet:
>+                            continue
>                     #
>                     # Get PCD default value and their override relationship
>                     #
>                     DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName,
>Pcd.TokenSpaceGuidCName, DecType))
>                     DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName,
>Pcd.TokenSpaceGuidCName))
>@@ -955,21 +964,21 @@ class PcdReport(object):
>
>                     #
>                     # Report PCD item according to their override relationship
>                     #
>                     if BuildOptionMatch:
>-                        FileWrite(File, ' *B %-*s: %6s %10s = %-22s' % (self.MaxLen,
>Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>+                        FileWrite(File, ' *B %-*s: %6s %10s = %-22s' % (self.MaxLen,
>PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>                     elif DecMatch and InfMatch:
>-                        FileWrite(File, '    %-*s: %6s %10s = %-22s' % (self.MaxLen,
>Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>+                        FileWrite(File, '    %-*s: %6s %10s = %-22s' % (self.MaxLen,
>PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>                     else:
>                         if DscMatch:
>                             if (Pcd.TokenCName, Key) in self.FdfPcdSet:
>-                                FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen,
>Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>+                                FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen,
>PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>                             else:
>-                                FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen,
>Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>+                                FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen,
>PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>                         else:
>-                            FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen,
>Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>+                            FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen,
>PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip()))
>
>                     if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):
>                         for SkuInfo in Pcd.SkuInfoList.values():
>                             if TypeName in ('DYNHII', 'DEXHII'):
>                                 FileWrite(File, '%*s: %s: %s' % (self.MaxLen + 4,
>SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset))
>--
>2.6.1.windows.1



      reply	other threads:[~2017-01-04  5:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30  7:48 [Patch] BaseTools: fix the bug for Mixed Pcd display in the report Yonghong Zhu
2017-01-04  5:31 ` Gao, Liming [this message]

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=4A89E2EF3DFEDB4C8BFDE51014F606A14D6C8CC2@shsmsx102.ccr.corp.intel.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