From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0701.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D99B01A1DEB for ; Thu, 27 Oct 2016 19:34:23 -0700 (PDT) Received: from DF4PR84MB0025.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.14) by DF4PR84MB0028.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Fri, 28 Oct 2016 02:34:21 +0000 Received: from DF4PR84MB0025.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.14]) by DF4PR84MB0025.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.14]) with mapi id 15.01.0679.018; Fri, 28 Oct 2016 02:34:21 +0000 From: "Lin, Derek (HPS UEFI Dev)" To: "Gao, Liming" , "afish@apple.com" CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file. Thread-Index: AQHSL+637m0gt1BefEud2qkE2Tmo86C7ii/QgAAZptCAACEjgIAAA2iAgAAEaICAAVqv8A== Date: Fri, 28 Oct 2016 02:34:21 +0000 Message-ID: References: <497D3E4E-A601-476E-897C-78F3ED389C46@apple.com> <88D9A338-D75C-4509-8079-2821EE9EF313@apple.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14B49A6AC@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49A6AC@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=derek.lin2@hpe.com; x-originating-ip: [15.211.131.14] x-ms-office365-filtering-correlation-id: 26cd4189-9aa9-429d-515f-08d3fedaec7a x-microsoft-exchange-diagnostics: 1; DF4PR84MB0028; 7:lODyGpFg990tl78QFIbvQM8Fv1DtZHkYZouQtBCvkvUNDzbL793Nd3tmzuPyDzINLyekzUcNubDFXGnrIoig8B44xfbVwDV1etRgIxWaaL5oCZ36IUCqHnJN9xckB99sZazAJo3pmDfleUNOx2sSL+yzK41r90/gT1iopUZCi7TJ1Uufy6BYXxpwUpeOdvFXXCNR11RDzfzrYA7hHsoWbCdM8dm+Znlzg6PCI+ALbJGmNO7cxvAuRGb9JNqiwSAD+fKJ8j5y/XTa4MvmQ+k7lWRlu1Y9h1X5Q0T4sEQoX1AKIdBYha85rJ7zsS194QYX3lMV8ta1tDOh0dwabXnTue5ulobDWw8CnS881gF5oRM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0028; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(166708455590820)(162533806227266)(31960201722614)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:DF4PR84MB0028; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0028; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(13464003)(377454003)(189002)(24454002)(199003)(92566002)(50986999)(33656002)(76176999)(15975445007)(4326007)(54356999)(93886004)(2906002)(66066001)(2900100001)(8676002)(3846002)(81166006)(6116002)(105586002)(102836003)(68736007)(305945005)(106116001)(8666005)(99286002)(77096005)(81156014)(586003)(101416001)(7846002)(5660300001)(106356001)(7736002)(87936001)(9686002)(74316002)(5002640100001)(7696004)(2501003)(2950100002)(11100500001)(86362001)(8936002)(10400500002)(3660700001)(5001770100001)(97736004)(122556002)(19580405001)(3280700002)(189998001)(19580395003)(7059030)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0028; H:DF4PR84MB0025.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2016 02:34:21.1635 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0028 Subject: Re: [BaseTools] Library GUIDs missing from Guid.xref file. 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: Fri, 28 Oct 2016 02:34:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable That make sense to me, I will update patch to remove it, and not change ord= er. Thanks, Derek -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com]=20 Sent: Thursday, October 27, 2016 1:53 PM To: Lin, Derek (HPS UEFI Dev) ; afish@apple.com Cc: edk2-devel@lists.01.org Subject: RE: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file. I agree with Andrew to only add the missing Ppi/Protocol/Guid used in Libra= ry INF file.=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of=20 > Lin, Derek (HPS UEFI Dev) > Sent: Thursday, October 27, 2016 1:50 PM > To: afish@apple.com > Cc: edk2-devel@lists.01.org > Subject: Re: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file= . >=20 > Andrew, >=20 > The ModuleGuidDict was not for performance, it's because Arch IA32 X64=20 > have same library name/FILE_GUID pair, for not duplicate it. > You are right the patch add library FILE_GUID but they are not end up=20 > in the ROM, I'm ok remove it or not. >=20 > Feel free to update the patch. >=20 > Thanks, > Derek >=20 > -----Original Message----- > From: afish@apple.com [mailto:afish@apple.com] > Sent: Thursday, October 27, 2016 1:25 PM > To: Lin, Derek (HPS UEFI Dev) > Cc: edk2-devel@lists.01.org; Shia, Cinnamon > Subject: Re: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file= . >=20 >=20 > > On Oct 26, 2016, at 9:09 PM, Lin, Derek (HPS UEFI Dev) > wrote: > > > > Hi Andrew, > > > > We also see this issue recently. And we have a fix. I've send email=20 > > patch > minutes ago. > > >=20 > Derek, >=20 > Thanks for sharing the fix. >=20 > I noticed it introduced a build failure for a badly formed library INF=20 > file. I assume that means this fix is pulling in libraries that are in=20 > the DSC file, but not currently being built? That is not really a=20 > problem as it means you have too many GUID vs. not enough. >=20 > I also noticed that your fix adds the FILE_GUID values for all the=20 > libraries. The FILE_GUID values for the any PEIM, DXE/UEFI driver that=20 > end up in an FV will be present in the ROM, but the library values do=20 > not end up in the ROM. Also by changing the code to use a Python=20 > dictionary the order of everything changed. I had a debugger command=20 > that would just dump out the FILE_GUDs, so it would be good to maintain t= he old behavior. >=20 > GuidDict =3D {} > for Arch in ArchList: > PlatformDataBase =3D > BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch,=20 > GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > - for ModuleFile in PlatformDataBase.Modules: > + for ModuleFile in [x for x in PlatformDataBase.Modules] +=20 > + [x for x in > PlatformDataBase.LibraryInstances]: > Module =3D BuildDb.BuildObject[ModuleFile, Arch,=20 > GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > - GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.Base= Name)) > + if ModuleFile in PlatformDataBase.Modules: > + GuidXRefFile.write("%s %s\n" % (Module.Guid, > Module.BaseName)) > for key, item in Module.Protocols.items(): > GuidDict[key] =3D item > for key, item in Module.Guids.items(): >=20 > If your adding ModuleGuidDict was a performance fix, I guess I could=20 > just make it a list to keep order. >=20 > Thanks, >=20 > Andrew Fish >=20 > > Thanks, > > Derek > > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf=20 > > Of > Andrew Fish > > Sent: Thursday, October 27, 2016 9:08 AM > > To: edk2-devel > > Subject: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file. > > > > I noticed if a GUID (PPI & Protocol) was only used via a library it=20 > > does not > end up in the Guid.xref file. > > > > It looks to me like this code is only extracting the GUIDs from the=20 > > Drivers > INF file and the GUIDs defined in dependent libraries are skipped? > > > > > > > https://github.com/tianocore/edk2/blob/master/BaseTools/Source/Python/ > GenFds/GenFds.py#L701 > n/GenFds/GenFds.py#L701> > > > > for Arch in ArchList: > > PlatformDataBase =3D > BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch,=20 > GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > > for ModuleFile in PlatformDataBase.Modules: > > Module =3D BuildDb.BuildObject[ModuleFile, Arch, > GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > > GuidXRefFile.write("%s %s\n" % (Module.Guid, > Module.BaseName)) > > for key, item in Module.Protocols.items(): > > GuidDict[key] =3D item > > for key, item in Module.Guids.items(): > > GuidDict[key] =3D item > > for key, item in Module.Ppis.items(): > > GuidDict[key] =3D item > > > > > > Does anyone know how to extract the info from the dependent libs? > > > > I have an lldb type formatter for EFI_GUID that will print out the=20 > > GUID C > name so I noticed when some of them went missing. > > > > Thanks, > > > > Andrew Fish > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel