From nobody Tue May 7 14:17:17 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1522197784997193.72809528332505; Tue, 27 Mar 2018 17:43:04 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1FA7721CB8663; Tue, 27 Mar 2018 17:36:25 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 7DB2A20957465 for ; Tue, 27 Mar 2018 17:36:22 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2018 17:43:00 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga002.jf.intel.com with ESMTP; 27 Mar 2018 17:42:59 -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=192.55.52.93; helo=mga11.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.48,368,1517904000"; d="scan'208";a="45848402" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 08:42:51 +0800 Message-Id: <1522197771-18200-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Fix two cases that use GUID CName as PCD Value 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" 1. use CName format in components section: [Components] TestPkg/TestDriver.inf { PcdToken.PcdName |{GUID(TestGuid)}|VOID*|16 } 2. Use Guid CName format in INF and the Guid is defined in the DEC file but not write in driver's [Guids] section. PcdToken.PcdName | {GUID(TestGuid)} Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 9 +++------ BaseTools/Source/Python/Workspace/InfBuildData.py | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 95e3e91..0057839 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -395,16 +395,12 @@ class WorkspaceAutoGen(AutoGen): self.CapTargetList =3D [] =20 # apply SKU and inject PCDs from Flash Definition file for Arch in self.ArchList: Platform =3D self.BuildDatabase[self.MetaFile, Arch, Target, T= oolchain] - - - - - - + PlatformPcds =3D Platform.Pcds + self._GuidDict =3D Platform._GuidDict SourcePcdDict =3D {'DynamicEx':[], 'PatchableInModule':[],'Dyn= amic':[],'FixedAtBuild':[]} BinaryPcdDict =3D {'DynamicEx':[], 'PatchableInModule':[]} SourcePcdDict_Keys =3D SourcePcdDict.keys() BinaryPcdDict_Keys =3D BinaryPcdDict.keys() =20 @@ -2797,10 +2793,11 @@ class ModuleAutoGen(AutoGen): EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen module [%s] [%s]" % (M= oduleFile, Arch)) GlobalData.gProcessingFile =3D "%s [%s, %s, %s]" % (ModuleFile, Ar= ch, Toolchain, Target) =20 self.Workspace =3D Workspace self.WorkspaceDir =3D Workspace.WorkspaceDir + self._GuidDict =3D Workspace._GuidDict =20 self.MetaFile =3D ModuleFile self.PlatformInfo =3D PlatformAutoGen(Workspace, PlatformFile, Tar= get, Toolchain, Arch) # check if this module is employed by active platform if not self.PlatformInfo.ValidModule(self.MetaFile): diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/= Source/Python/Workspace/InfBuildData.py index 7ea9b56..7e1b8ba 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -1054,10 +1054,11 @@ class InfBuildData(ModuleBuildClassObject): # if platform doesn't give its type, use 'lowest' one in t= he # following order, if any # # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "D= ynamic", "DynamicEx" # + self.Guids.update(Package.Guids) PcdType =3D self._PCD_TYPE_STRING_[Type] if Type =3D=3D MODEL_PCD_DYNAMIC: Pcd.Pending =3D True for T in ["FixedAtBuild", "PatchableInModule", "Featur= eFlag", "Dynamic", "DynamicEx"]: if (PcdRealName, TokenSpaceGuid) in GlobalData.Mix= edPcd: --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel