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=liming.gao@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 30FB92117504F for ; Thu, 21 Jun 2018 00:57:39 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2018 00:57:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,251,1526367600"; d="scan'208";a="61020214" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 21 Jun 2018 00:57:38 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Jun 2018 00:57:29 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Jun 2018 00:57:28 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.87]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Thu, 21 Jun 2018 15:57:27 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Enhance BaseTools supports FeaturePcd usage in VFR file Thread-Index: AQHUB2puj7hMbZTz10Op6WzHeiauh6RqXB0w Date: Thu, 21 Jun 2018 07:57:26 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E29C382@SHSMSX104.ccr.corp.intel.com> References: <1529370661-23004-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1529370661-23004-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: Enhance BaseTools supports FeaturePcd usage in VFR file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 07:57:39 -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 Zhu= , >Yonghong >Sent: Tuesday, June 19, 2018 9:11 AM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Enhance BaseTools supports FeaturePcd >usage in VFR file > >Bugzilla 348 only fixed FixedAtBuild Pcd type, now this patch also add >support for FeaturePcd type. > >Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D348 >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/AutoGen/GenC.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/GenC.py >b/BaseTools/Source/Python/AutoGen/GenC.py >index ae3af08..5b24ae5 100644 >--- a/BaseTools/Source/Python/AutoGen/GenC.py >+++ b/BaseTools/Source/Python/AutoGen/GenC.py >@@ -2093,19 +2093,20 @@ def CreateCode(Info, AutoGenC, AutoGenH, >StringH, UniGenCFlag, UniGenBinBuffer, > if Guid in Info.Module.GetGuidsUsedByPcd(): > continue > GuidMacros.append('#define %s %s' % (Guid, >Info.Module.Guids[Guid])) > for Guid, Value in Info.Module.Protocols.items() + >Info.Module.Ppis.items(): > GuidMacros.append('#define %s %s' % (Guid, Value)) >- # supports FixedAtBuild usage in VFR file >+ # supports FixedAtBuild and FeaturePcd usage in VFR file > if Info.VfrFileList and Info.ModulePcdList: > GuidMacros.append('#define %s %s' % >('FixedPcdGetBool(TokenName)', '_PCD_VALUE_##TokenName')) > GuidMacros.append('#define %s %s' % ('FixedPcdGet8(TokenName)= ', >'_PCD_VALUE_##TokenName')) > GuidMacros.append('#define %s %s' % ('FixedPcdGet16(TokenName= )', >'_PCD_VALUE_##TokenName')) > GuidMacros.append('#define %s %s' % ('FixedPcdGet32(TokenName= )', >'_PCD_VALUE_##TokenName')) > GuidMacros.append('#define %s %s' % ('FixedPcdGet64(TokenName= )', >'_PCD_VALUE_##TokenName')) >+ GuidMacros.append('#define %s %s' % ('FeaturePcdGet(TokenName= )', >'_PCD_VALUE_##TokenName')) > for Pcd in Info.ModulePcdList: >- if Pcd.Type =3D=3D TAB_PCDS_FIXED_AT_BUILD: >+ if Pcd.Type in [TAB_PCDS_FIXED_AT_BUILD, >TAB_PCDS_FEATURE_FLAG]: > TokenCName =3D Pcd.TokenCName > Value =3D Pcd.DefaultValue > if Pcd.DatumType =3D=3D 'BOOLEAN': > BoolValue =3D Value.upper() > if BoolValue =3D=3D 'TRUE': >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel