From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 563E8817E4 for ; Tue, 3 Jan 2017 21:31:50 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 03 Jan 2017 21:31:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="1089638523" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 03 Jan 2017 21:31:49 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Jan 2017 21:31:49 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Jan 2017 21:31:49 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 4 Jan 2017 13:31:47 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: fix the bug for Mixed Pcd display in the report Thread-Index: AQHSYnEfq8kAlmOR9kaYwtId+Y7ce6En0rIg Date: Wed, 4 Jan 2017 05:31:46 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C8CC2@shsmsx102.ccr.corp.intel.com> References: <1483084098-101288-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1483084098-101288-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: fix the bug for Mixed Pcd display in the report X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 05:31:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhu, Yonghong >Sent: Friday, December 30, 2016 3:48 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [Patch] BaseTools: fix the bug for Mixed Pcd display in the repor= t > >Fix the bug to not display the mixed PCD in the Global PCD section, and >correct the Pcd display name. > >Cc: Liming Gao >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Yonghong Zhu >--- > 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 =3D gPcdTypeMap.get(Type, ("", Type)) > for Pcd in PcdDict[Key][Type]: >+ PcdTokenCName =3D Pcd.TokenCName >+ MixedPcdFlag =3D False >+ if GlobalData.MixedPcd: >+ for PcdKey in GlobalData.MixedPcd: >+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) = in >GlobalData.MixedPcd[PcdKey]: >+ PcdTokenCName =3D PcdKey[0] >+ MixedPcdFlag =3D True >+ if MixedPcdFlag and not ModulePcdSet: >+ continue > # > # Get PCD default value and their override relationsh= ip > # > DecDefaultValue =3D self.DecPcdDefault.get((Pcd.Token= CName, >Pcd.TokenSpaceGuidCName, DecType)) > DscDefaultValue =3D self.DscPcdDefault.get((Pcd.Token= CName, >Pcd.TokenSpaceGuidCName)) >@@ -955,21 +964,21 @@ class PcdReport(object): > > # > # Report PCD item according to their override relatio= nship > # > if BuildOptionMatch: >- FileWrite(File, ' *B %-*s: %6s %10s =3D %-22s' % = (self.MaxLen, >Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) >+ FileWrite(File, ' *B %-*s: %6s %10s =3D %-22s' % = (self.MaxLen, >PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) > elif DecMatch and InfMatch: >- FileWrite(File, ' %-*s: %6s %10s =3D %-22s' % = (self.MaxLen, >Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) >+ FileWrite(File, ' %-*s: %6s %10s =3D %-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 =3D %= -22s' % (self.MaxLen, >Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) >+ FileWrite(File, ' *F %-*s: %6s %10s =3D %= -22s' % (self.MaxLen, >PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) > else: >- FileWrite(File, ' *P %-*s: %6s %10s =3D %= -22s' % (self.MaxLen, >Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) >+ FileWrite(File, ' *P %-*s: %6s %10s =3D %= -22s' % (self.MaxLen, >PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) > else: >- FileWrite(File, ' *M %-*s: %6s %10s =3D %-22s= ' % (self.MaxLen, >Pcd.TokenCName, TypeName, '(' + Pcd.DatumType + ')', PcdValue.strip())) >+ FileWrite(File, ' *M %-*s: %6s %10s =3D %-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.Max= Len + 4, >SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset)) >-- >2.6.1.windows.1