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 27B0921F2E0F0 for ; Sun, 8 Apr 2018 22:38:56 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2018 22:38:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,426,1517904000"; d="scan'208";a="40506270" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 08 Apr 2018 22:38:55 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Apr 2018 22:38:55 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Apr 2018 22:38:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.239]) by shsmsx102.ccr.corp.intel.com ([169.254.2.184]) with mapi id 14.03.0319.002; Mon, 9 Apr 2018 13:38:52 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix two cases that use GUID CName as PCD Value Thread-Index: AQHTxi3JTIfoDmbUI0CehMKZVJlP8KP3/baQ Date: Mon, 9 Apr 2018 05:38:52 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E20A4C7@SHSMSX104.ccr.corp.intel.com> References: <1522197771-18200-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1522197771-18200-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 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: , X-List-Received-Date: Mon, 09 Apr 2018 05:38:56 -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: Wednesday, March 28, 2018 8:43 AM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Fix two cases that use GUID CName as PC= D >Value > >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 >--- > 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 [] > > # apply SKU and inject PCDs from Flash Definition file > for Arch in self.ArchList: > Platform =3D self.BuildDatabase[self.MetaFile, Arch, Target, = Toolchain] >- >- >- >- >- >- >+ PlatformPcds =3D Platform.Pcds >+ self._GuidDict =3D Platform._GuidDict > SourcePcdDict =3D {'DynamicEx':[], >'PatchableInModule':[],'Dynamic':[],'FixedAtBuild':[]} > BinaryPcdDict =3D {'DynamicEx':[], 'PatchableInModule':[]} > SourcePcdDict_Keys =3D SourcePcdDict.keys() > BinaryPcdDict_Keys =3D BinaryPcdDict.keys() > >@@ -2797,10 +2793,11 @@ class ModuleAutoGen(AutoGen): > EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen module [%s] [%s]" % >(ModuleFile, Arch)) > GlobalData.gProcessingFile =3D "%s [%s, %s, %s]" % (ModuleFile, A= rch, >Toolchain, Target) > > self.Workspace =3D Workspace > self.WorkspaceDir =3D Workspace.WorkspaceDir >+ self._GuidDict =3D Workspace._GuidDict > > self.MetaFile =3D ModuleFile > self.PlatformInfo =3D PlatformAutoGen(Workspace, PlatformFile, Ta= rget, >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 = the > # following order, if any > # > # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "= Dynamic", >"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", "Featu= reFlag", >"Dynamic", "DynamicEx"]: > if (PcdRealName, TokenSpaceGuid) in GlobalData.Mi= xedPcd: >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel