From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 149371A1DFF for ; Wed, 26 Oct 2016 22:52:42 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 26 Oct 2016 22:52:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="184383753" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 26 Oct 2016 22:52:42 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 22:52:41 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 22:52:41 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 13:52:39 +0800 From: "Gao, Liming" To: "Lin, Derek (HPS UEFI Dev)" , "afish@apple.com" CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [BaseTools] Library GUIDs missing from Guid.xref file. Thread-Index: AQHSL+6yFjsId4XdkECdH7l6bYo+S6C7ii/QgAAZptD//5sHgIAABvWAgACG3aA= Date: Thu, 27 Oct 2016 05:52:39 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49A6AC@shsmsx102.ccr.corp.intel.com> References: <497D3E4E-A601-476E-897C-78F3ED389C46@apple.com> <88D9A338-D75C-4509-8079-2821EE9EF313@apple.com> 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] 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: Thu, 27 Oct 2016 05:52:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 Li= n, > 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 > 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 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 pat= ch > minutes ago. > > >=20 > Derek, >=20 > Thanks for sharing the fix. >=20 > I noticed it introduced a build failure for a badly formed library INF fi= le. I > assume that means this fix is pulling in libraries that are in the DSC fi= le, but > not currently being built? That is not really a problem as it means you h= ave > too many GUID vs. not enough. >=20 > I also noticed that your fix adds the FILE_GUID values for all the librar= ies. The > FILE_GUID values for the any PEIM, DXE/UEFI driver that end up in an FV w= ill > be present in the ROM, but the library values do not end up in the ROM. A= lso > by changing the code to use a Python dictionary the order of everything > changed. I had a debugger command that would just dump out the > FILE_GUDs, so it would be good to maintain the old behavior. >=20 > GuidDict =3D {} > for Arch in ArchList: > PlatformDataBase =3D > BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, > GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > - for ModuleFile in PlatformDataBase.Modules: > + for ModuleFile in [x for x in PlatformDataBase.Modules] + [x= for x in > PlatformDataBase.LibraryInstances]: > Module =3D BuildDb.BuildObject[ModuleFile, Arch, > 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 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 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 doe= s not > end up in the Guid.xref file. > > > > It looks to me like this code is only extracting the GUIDs from the Dri= vers > 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, > 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 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