From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 A93CB21CF94E4 for ; Mon, 31 Jul 2017 19:39:19 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2017 19:41:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,304,1498546800"; d="scan'208";a="293975104" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 31 Jul 2017 19:41:28 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 31 Jul 2017 19:41:28 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 31 Jul 2017 19:41:27 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Tue, 1 Aug 2017 10:41:26 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix the bug to correctly check Pcd type that in FDF file Thread-Index: AQHTBonQLlMmq1opXEmB+DHJDNRt6qJu0j0g Date: Tue, 1 Aug 2017 02:41:25 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D75DD1F@shsmsx102.ccr.corp.intel.com> References: <1501126695-20324-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1501126695-20324-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug to correctly check Pcd type that in FDF file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 02:39:20 -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: Thursday, July 27, 2017 11:38 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Fix the bug to correctly check Pcd type that = in FDF file >=20 > We set Pcd value in FDF and used this Pcd as PatchableInModule type in > module, it cause build report generate failure. because we incorrectly > set the Pcd type during check whether the Pcd is used. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/build/BuildReport.py | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sou= rce/Python/build/BuildReport.py > index a1ee43a..a7cbb6a 100644 > --- a/BaseTools/Source/Python/build/BuildReport.py > +++ b/BaseTools/Source/Python/build/BuildReport.py > @@ -736,10 +736,17 @@ class PcdReport(object): > # > UnusedPcdFullList =3D [] > for item in Pa.Platform.Pcds: > Pcd =3D Pa.Platform.Pcds[item] > if not Pcd.Type: > + # check the Pcd in FDF file, whether it is used in m= odule first > + for T in ["FixedAtBuild", "PatchableInModule", "Feat= ureFlag", "Dynamic", "DynamicEx"]: > + PcdList =3D self.AllPcds.setdefault(Pcd.TokenSpa= ceGuidCName, {}).setdefault(T, []) > + if Pcd in PcdList: > + Pcd.Type =3D T > + break > + if not Pcd.Type: > PcdTypeFlag =3D False > for package in Pa.PackageList: > for T in ["FixedAtBuild", "PatchableInModule", "= FeatureFlag", "Dynamic", "DynamicEx"]: > if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName,= T) in package.Pcds: > Pcd.Type =3D T > -- > 2.6.1.windows.1