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=liming.gao@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 0C37B203B99CE for ; Tue, 10 Jul 2018 00:09:26 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2018 00:09:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,333,1526367600"; d="scan'208";a="71027253" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 10 Jul 2018 00:09:26 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Jul 2018 00:09:26 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Tue, 10 Jul 2018 15:09:24 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix the bug that incorrect size info in the Lib autogen Thread-Index: AQHUF36Y/9BLX0eJMEiCfI3sPljmiaSICthA Date: Tue, 10 Jul 2018 07:09:24 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2B93CF@SHSMSX104.ccr.corp.intel.com> References: <1531138530-14768-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1531138530-14768-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 the bug that incorrect size info in the Lib autogen 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: Tue, 10 Jul 2018 07:09:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Monday, July 09, 2018 8:16 PM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Fix the bug that incorrect size info in= the Lib >autogen > >The case is a PCD used in one library only, and in DSC component >section the PCD value is override in one of module inf. Then it cause >the bug the PCD size in the Lib autogen use the PCD value in the DSC >PCD section, but not use the override value. > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index 6d76afd..3908697 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -1291,16 +1291,21 @@ class PlatformAutoGen(AutoGen): > for LibAuto in self.LibraryAutoGenList: > FixedAtBuildPcds =3D {} > ShareFixedAtBuildPcdsSameValue =3D {} > for Module in LibAuto._ReferenceModules: > for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuild= Pcds: >+ DefaultValue =3D Pcd.DefaultValue >+ # Cover the case: DSC component override the Pcd valu= e and the >Pcd only used in one Lib >+ if Pcd in Module.LibraryPcdList: >+ Index =3D Module.LibraryPcdList.index(Pcd) >+ DefaultValue =3D Module.LibraryPcdList[Index].Def= aultValue > key =3D ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenC= Name)) > if key not in FixedAtBuildPcds: > ShareFixedAtBuildPcdsSameValue[key] =3D True >- FixedAtBuildPcds[key] =3D Pcd.DefaultValue >+ FixedAtBuildPcds[key] =3D DefaultValue > else: >- if FixedAtBuildPcds[key] !=3D Pcd.DefaultValue: >+ if FixedAtBuildPcds[key] !=3D DefaultValue: > ShareFixedAtBuildPcdsSameValue[key] =3D False > for Pcd in LibAuto.FixedAtBuildPcds: > key =3D ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName= )) > if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in >self.NonDynamicPcdDict: > continue >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel