From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 192F581C94 for ; Thu, 10 Nov 2016 04:31:44 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 10 Nov 2016 04:31:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,618,1473145200"; d="scan'208";a="189884208" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 10 Nov 2016 04:31:47 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Nov 2016 04:31:47 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Nov 2016 04:31:46 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 20:31:44 +0800 From: "Zhu, Yonghong" To: "Huber, Brandon" , "edk2-devel@lists.01.org" Thread-Topic: BaseTools issue finding PCDs in non-COMMON modules Thread-Index: AdI6nDLaZCVysr73RBKwHM0EuMarcAAASl2wACw2J5A= Date: Thu, 10 Nov 2016 12:31:44 +0000 Message-ID: References: In-Reply-To: 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: BaseTools issue finding PCDs in non-COMMON modules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 12:31:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Brandon Huber, Thanks for reporting this, I will investigate it and fix it. Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Hube= r, Brandon Sent: Wednesday, November 09, 2016 11:25 PM To: edk2-devel@lists.01.org Subject: Re: [edk2] BaseTools issue finding PCDs in non-COMMON modules Hi All, I'm seeing an issue with the latest BaseTools where it fails to find a PCD = when parsing the FDF unless there is a COMMON version of module (e.g., buil= t under [LibraryClasses.common] in the DSC) that includes the DEC in which = the PCD is declared. In other words, when gathering PCDs, GenFds seems to d= isregard the architecture and always searches for COMMON modules. For example, I have my PCD declared in MyPkg.dec: [PcdsFixedAtBuild] MyPcd|{0xF3, 0xB4, 0x47, 0x15, 0x8A, 0x3E, 0xEF, 0x4F, 0x81, 0xC8, 0x32,= 0x8E, 0xD6, 0x47, 0xAB, 0x1A}|VOID*|0x40000004 Which is included in MyLib.inf: [Packages] Path/to/MyPkg.dec And is added to the build in MyPkg.dsc: [LibraryClasses.X64] MyLib|path/to/MyLib.inf Yet if MyLib.inf is not built under [LibraryClasses.common], it will not be= retrieved in the package list. >>From edk2\BaseTools\Source\Python\Workspace\WorkspaceDatabase.py: def GetPackageList(self, Platform, Arch, TargetName, ToolChainTag): self.Platform =3D Platform PackageList =3D [] Pa =3D self.BuildObject[self.Platform, 'COMMON'] # # Get Package related to Modules # for Module in Pa.Modules: ModuleObj =3D self.BuildObject[Module, Arch, TargetName, ToolCh= ainTag] for Package in ModuleObj.Packages: if Package not in PackageList: PackageList.append(Package) # # Get Packages related to Libraries # for Lib in Pa.LibraryInstances: LibObj =3D self.BuildObject[Lib, Arch, TargetName, ToolChainTag= ] for Package in LibObj.Packages: if Package not in PackageList: PackageList.append(Package) return PackageList If I change: Pa =3D self.BuildObject[self.Platform, 'COMMON'] to use the Arch that was passed in: Pa =3D self.BuildObject[self.Platform, Arch] then I see all the proper packages (and thereby PCDs) get returned and I ca= n complete the build. What I don't understand is why I just started experie= ncing this problem. This function hasn't changed since 2011 (ID: 0d2711a693= 97d2971079121df4326d84736c181e). Two questions: 1. Any ideas on why this just started happening? 2. Are there any side effects to changing the architecture parameter = as above? Brandon Huber Core BIOS Developer brandon.huber@hp.com T +1 281 927 8958 HP Inc. 11445 Compaq Center Dr W Houston, TX 77070 [HP] _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel