From nobody Mon Apr 29 03:42:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532335753535229.90825085064978; Mon, 23 Jul 2018 01:49:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2833C210C0F4A; Mon, 23 Jul 2018 01:49:13 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 6669B210C0F46 for ; Mon, 23 Jul 2018 01:49:11 -0700 (PDT) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2018 01:49:10 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga008.jf.intel.com with ESMTP; 23 Jul 2018 01:49:09 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,392,1526367600"; d="scan'208";a="59017727" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Mon, 23 Jul 2018 16:49:07 +0800 Message-Id: <1532335747-10728-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Yunhua Feng Flag *M for INF defined value and DSC components value Flag *P only for platform defined value Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 --- 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 ModulePcdSet[Pcd.TokenCN= ame, 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, TypeName,= IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMat= ch, 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') --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel