From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on072f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::72f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C9EFE81C94 for ; Wed, 9 Nov 2016 07:24:39 -0800 (PST) Received: from DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.23) by DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10; Wed, 9 Nov 2016 15:24:41 +0000 Received: from DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.23]) by DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.23]) with mapi id 15.01.0721.010; Wed, 9 Nov 2016 15:24:41 +0000 From: "Huber, Brandon" To: "edk2-devel@lists.01.org" Thread-Topic: BaseTools issue finding PCDs in non-COMMON modules Thread-Index: AdI6nDLaZCVysr73RBKwHM0EuMarcAAASl2w Date: Wed, 9 Nov 2016 15:24:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=brandon.huber@hp.com; x-originating-ip: [15.65.254.15] x-ms-office365-filtering-correlation-id: 20bcb355-494a-4432-7194-08d408b486d0 x-microsoft-exchange-diagnostics: 1; DF4PR84MB0137; 7:oJARt4uiQnU5vx335P8qeQprqcDPCc3zzjv5KfoxLwydOaIjC7HKSx4aZJU9EdfBKoKzgBowC8oka7wVoCNkgRfIpA378Srzp65F5dCuybN4rFcr9S/WstxTJHj+R+1AIUaP8fG73m0YYzvFQXzKS2OFjOJ/8jRXubxT4eT1BVSrDWShrqbjErYQZRmR+jcKhtZOQgDsA5v98nOUJpCmIgqIomg8MmaNyeD0sMGP3KGT7/NtGt5k6M2lfq4UCImgtur2wiplM549iSt9/XL7BKzI+4nv5U0zsorN5vIZe65F0WsEwTEHT3Wmft8WAql6+8vFdhBbMoav8fN1YKQ5s4LcySXMEst2gYnh+2HlwG4= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0137; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189166546597940)(149838087765973)(21748063052155)(73583498263828); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:DF4PR84MB0137; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0137; x-forefront-prvs: 0121F24F22 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(189002)(53754006)(199003)(6602003)(66066001)(54356999)(450100001)(106356001)(105586002)(2900100001)(99286002)(50986999)(76176999)(77096005)(107886002)(97736004)(189998001)(2950100002)(6916009)(86362001)(101416001)(5660300001)(110136003)(68736007)(74316002)(2501003)(87936001)(19618635001)(9326002)(81156014)(81166006)(8936002)(122556002)(2906002)(33656002)(2351001)(92566002)(102836003)(790700001)(6116002)(9686002)(3846002)(7736002)(3280700002)(7906003)(586003)(8676002)(3660700001)(7846002)(7696004)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0137; H:DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2016 15:24:41.3864 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0137 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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: Wed, 09 Nov 2016 15:24:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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]