From nobody Fri May 3 22:08:48 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 1529370666823761.6068035751082; Mon, 18 Jun 2018 18:11:06 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 04176211158C2; Mon, 18 Jun 2018 18:11:06 -0700 (PDT) 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 C37C0211147B6 for ; Mon, 18 Jun 2018 18:11:04 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 18:11:04 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga001.fm.intel.com with ESMTP; 18 Jun 2018 18:11:03 -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=134.134.136.126; helo=mga18.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,241,1526367600"; d="scan'208";a="65242700" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Tue, 19 Jun 2018 09:11:01 +0800 Message-Id: <1529370661-23004-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , 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" 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 Reviewed-by: Liming Gao --- 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/Pyt= hon/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, U= niGenCFlag, UniGenBinBuffer, if Guid in Info.Module.GetGuidsUsedByPcd(): continue GuidMacros.append('#define %s %s' % (Guid, Info.Module.Guids[G= uid])) for Guid, Value in Info.Module.Protocols.items() + Info.Module.Ppi= s.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(TokenNam= e)', '_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': --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel