From nobody Fri May 3 04:18:33 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.zoho.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 1490147116073743.73502942251; Tue, 21 Mar 2017 18:45:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 22FB380342; Tue, 21 Mar 2017 18:45:14 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 705D980297 for ; Tue, 21 Mar 2017 18:45:12 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2017 18:45:12 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga006.fm.intel.com with ESMTP; 21 Mar 2017 18:45:11 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490147112; x=1521683112; h=from:to:cc:subject:date:message-id; bh=qRg9ObOI9piDkJDT0smeCdSOAhCub6ZdHDABrEH/ZzI=; b=INAWHyM70UCGUFLcKoKwIQCgUErbcKkMiafWOwasMUJs84zx8WYF1dDM SEtgxY76ebXmU8Eu7WDrAp098CE/nA==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,202,1486454400"; d="scan'208";a="79640499" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 22 Mar 2017 09:45:10 +0800 Message-Id: <1490147110-29700-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Fix build failure for DynamicEx Pcd used in the Library 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" Update DynExPcdTokenNumberMapping logic, currently even it is Library, its self's Pcd is saved into ModulePcdList. Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=3D434 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenC.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Pyt= hon/AutoGen/GenC.py index c1d64cc..96b1459 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -672,14 +672,12 @@ gModuleTypeHeaderFile =3D { # # def DynExPcdTokenNumberMapping(Info, AutoGenH): ExTokenCNameList =3D [] PcdExList =3D [] - if Info.IsLibrary: - PcdList =3D Info.LibraryPcdList - else: - PcdList =3D Info.ModulePcdList + # Even it is the Library, the PCD is saved in the ModulePcdList + PcdList =3D Info.ModulePcdList for Pcd in PcdList: if Pcd.Type in gDynamicExPcd: ExTokenCNameList.append(Pcd.TokenCName) PcdExList.append(Pcd) if len(ExTokenCNameList) =3D=3D 0: @@ -1153,11 +1151,11 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, = Pcd): # If PcdGet/Set used in the Pcds with different Guids but same CNa= me, it should failed to build. if PcdExCNameList.count(Pcd.TokenCName) > 1: AutoGenH.Append('// Disabled the macros, as PcdToken and PcdGe= t/Set are not allowed in the case that more than one DynamicEx Pcds are dif= ferent Guids but same CName.\n') AutoGenH.Append('// #define %s %s\n' % (PcdTokenName, PcdExTo= kenName)) AutoGenH.Append('// #define %s LibPcdGetEx%s(&%s, %s)\n' % (G= etModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) - AutoGenH.Append('// #define %s LibPcdGetExSize(&%s, %s \n' % = (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName)) + AutoGenH.Append('// #define %s LibPcdGetExSize(&%s, %s)\n' % = (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName)) if Pcd.DatumType =3D=3D 'VOID*': AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibP= cdSetEx%s(&%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeName, DatumSizeLi= b, Pcd.TokenSpaceGuidCName, PcdTokenName)) AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibP= cdSetEx%sS(&%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Datu= mSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) else: AutoGenH.Append('// #define %s(Value) LibPcdSetEx%s(&%s, = %s, (Value))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdT= okenName)) --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel