From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 6215D211AEA5D for ; Fri, 1 Feb 2019 17:17:11 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 17:17:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,550,1539673200"; d="scan'208";a="143547578" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 01 Feb 2019 17:17:11 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 17:17:10 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 17:17:10 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.207]) with mapi id 14.03.0415.000; Sat, 2 Feb 2019 09:17:08 +0800 From: "Feng, Bob C" To: "Fan, ZhijuX" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [edk2][PATCH] BaseTools:StructurePCD value display incorrect in "Not used" section. Thread-Index: AdS50107nK/jGJDCRSK101wy9j9fCQAwZlkw Date: Sat, 2 Feb 2019 01:17:08 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16007D607@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: zh-CN, 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:StructurePCD value display incorrect in "Not used" section. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Feb 2019 01:17:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Friday, February 1, 2019 10:11 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Feng, Bob C Subject: [edk2][PATCH] BaseTools:StructurePCD value display incorrect in "N= ot used" section. StructurePCD value display incorrect in "Not used" section, that the value = defined in structure does not show. StructurePCD will not display in "Not Used" section if main structure not d= efine in dsc and pcd not in inf Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- BaseTools/Source/Python/build/BuildReport.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 0dad04212e..661852b1d5 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1511,9 +1511,9 @@ class DscBuildData(PlatformBuildClassObject): else: str_pcd_obj_str.DefaultFromDSC =3D {skuname:{d= efaultstore: str_pcd_obj.SkuInfoList[skuname].DefaultStoreDict.get(defaults= tore, str_pcd_obj.SkuInfoList[skuname].DefaultValue) for defaultstore in De= faultStores} for skuname in str_pcd_obj.SkuInfoList} S_pcd_set[Pcd] =3D str_pcd_obj_str - self.FilterStrcturePcd(S_pcd_set) if S_pcd_set: - GlobalData.gStructurePcd[self.Arch] =3D S_pcd_set + GlobalData.gStructurePcd[self.Arch] =3D S_pcd_set.copy() + self.FilterStrcturePcd(S_pcd_set) for stru_pcd in S_pcd_set.values(): for skuid in SkuIds: if skuid in stru_pcd.SkuOverrideValues: diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index ae37a6ce0e..4094c9c488 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -780,6 +780,13 @@ class PcdReport(object): # Collect the PCD defined in DSC/FDF file, but not used in mod= ule # UnusedPcdFullList =3D [] + StructPcdDict =3D GlobalData.gStructurePcd[self.Arch] + for Name, Guid in StructPcdDict: + if (Name, Guid) not in Pa.Platform.Pcds: + Pcd =3D StructPcdDict[(Name, Guid)] + PcdList =3D self.AllPcds.setdefault(Guid, {}).setdefau= lt(Pcd.Type, []) + if Pcd not in PcdList and Pcd not in UnusedPcdFullList= : + UnusedPcdFullList.append(Pcd) for item in Pa.Platform.Pcds: Pcd =3D Pa.Platform.Pcds[item] if not Pcd.Type: -- 2.14.1.windows.1