From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 CA80D211BB8DE for ; Thu, 31 Jan 2019 18:11:24 -0800 (PST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 18:11:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,546,1539673200"; d="dat'59?scan'59,208,59";a="296367768" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 31 Jan 2019 18:11:23 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 18:11:23 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 18:11:23 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.232]) with mapi id 14.03.0415.000; Fri, 1 Feb 2019 10:11:21 +0800 From: "Fan, ZhijuX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [edk2][PATCH] BaseTools:StructurePCD value display incorrect in "Not used" section. Thread-Index: AdS50107nK/jGJDCRSK101wy9j9fCQ== Date: Fri, 1 Feb 2019 02:11:20 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [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: Fri, 01 Feb 2019 02:11:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 define 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: --=20 2.14.1.windows.1