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.31; helo=mga06.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 C199621B02845 for ; Tue, 24 Jul 2018 19:51:42 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 19:51:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,400,1526367600"; d="scan'208";a="59569776" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 24 Jul 2018 19:51:41 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Jul 2018 19:51:41 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Jul 2018 19:51:41 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.100]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.81]) with mapi id 14.03.0319.002; Wed, 25 Jul 2018 10:51:39 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] BaseTools: Fix build report for *P and *M flag incorrectly Thread-Index: AQHUImILMF0Ehb7XZEqVZnG5kPwcpqSfP/vg Date: Wed, 25 Jul 2018 02:51:39 +0000 Message-ID: References: <1532335747-10728-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1532335747-10728-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 build report for *P and *M flag incorrectly X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 02:51:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Monday, July 23, 2018 4:49 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [PATCH] BaseTools: Fix build report for *P and *M flag inco= rrectly From: Yunhua Feng Flag *M for INF defined value and DSC components value Flag *P only for pla= tform defined value Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/build/BuildReport.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 273e7d41b8..1270070327 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -956,10 +956,15 @@ class PcdReport(object): # Get PCD default value and their override relationship # DecDefaultValue =3D self.DecPcdDefault.get((Pcd.TokenCName= , Pcd.TokenSpaceGuidCName, DecType)) DscDefaultValue =3D self.DscPcdDefault.get((Pcd.TokenCName= , Pcd.TokenSpaceGuidCName)) DscDefaultValBak =3D DscDefaultValue + Field =3D '' + for (CName, Guid, Field) in self.FdfPcdSet: + if CName =3D=3D PcdTokenCName and Guid =3D=3D Key: + DscDefaultValue =3D self.FdfPcdSet[(CName, Guid, F= ield)] + break DscDefaultValue =3D self.FdfPcdSet.get((Pcd.TokenCName, Ke= y), DscDefaultValue) if DscDefaultValue !=3D DscDefaultValBak: try: DscDefaultValue =3D ValueExpressionEx(DscDefaultVa= lue, Pcd.DatumType, self._GuidDict)(True) except BadExpression as DscDefaultValue: @@ -968,17 +973,18 @@ class PcdReport(object): InfDefaultValue =3D None =20 PcdValue =3D DecDefaultValue if DscDefaultValue: PcdValue =3D DscDefaultValue + Pcd.DefaultValue =3D PcdValue if ModulePcdSet is not None: if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not= in ModulePcdSet: continue - InfDefault, PcdValue =3D ModulePcdSet[Pcd.TokenCName, = Pcd.TokenSpaceGuidCName, Type] + InfDefaultValue, PcdValue =3D=20 + ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type] Pcd.DefaultValue =3D PcdValue - if InfDefault =3D=3D "": - InfDefault =3D None + if InfDefaultValue =3D=3D "": + InfDefaultValue =3D None =20 BuildOptionMatch =3D False if GlobalData.BuildOptionPcd: for pcd in GlobalData.BuildOptionPcd: if (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) =3D= =3D (pcd[0], pcd[1]): @@ -1077,17 +1083,19 @@ class PcdReport(object): DecMatch =3D False =20 # # Report PCD item according to their override relationship # - if DecMatch and InfMatch: + if DecMatch: self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName,= IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMat= ch, DecDefaultValue, ' ') + elif InfDefaultValue and InfMatch: + self.PrintPcdValue(File, Pcd, PcdTokenCName,=20 + TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch,=20 + InfDefaultValue, DecMatch, DecDefaultValue, '*M') elif BuildOptionMatch: self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName,= IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMat= ch, DecDefaultValue, '*B') else: - if DscMatch: - if (Pcd.TokenCName, Key) in self.FdfPcdSet: + if DscDefaultValue and DscMatch: + if (Pcd.TokenCName, Key, Field) in self.FdfPcdSet: self.PrintPcdValue(File, Pcd, PcdTokenCName, T= ypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue= , DecMatch, DecDefaultValue, '*F') else: self.PrintPcdValue(File, Pcd, PcdTokenCName, T= ypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue= , DecMatch, DecDefaultValue, '*P') else: self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeN= ame, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, De= cMatch, DecDefaultValue, '*M') -- 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel