From nobody Wed May 8 01:55:05 2024 Delivered-To: importer@patchew.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; 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501126701611626.5579869231728; Wed, 26 Jul 2017 20:38:21 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D6DAD21D09187; Wed, 26 Jul 2017 20:36:15 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 6B3B021D491BB for ; Wed, 26 Jul 2017 20:36:14 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2017 20:38:17 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jul 2017 20:38:16 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,418,1496127600"; d="scan'208";a="883255416" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Thu, 27 Jul 2017 11:38:15 +0800 Message-Id: <1501126695-20324-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , 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" 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. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/build/BuildReport.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/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 mod= ule first + for T in ["FixedAtBuild", "PatchableInModule", "Featur= eFlag", "Dynamic", "DynamicEx"]: + PcdList =3D self.AllPcds.setdefault(Pcd.TokenSpace= GuidCName, {}).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", "Fe= atureFlag", "Dynamic", "DynamicEx"]: if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, T= ) in package.Pcds: Pcd.Type =3D T --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel