From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (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 A4C9D1A1DFF for ; Wed, 26 Oct 2016 22:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1477545883; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xJHdybESKx6xGA7p+7jAmvW22rHbOK+nkxCapX/Eq6Q=; b=DSuksjBPrtEpFfI0Gnm+KuChp4/kqR9VNj26DhGRGIgceBiVDTryUNmBQRiQ13XR vkVnEh30aBD3qCYorpQhkmfQw38AVFE+9xUenWLv8+23FDaQtTtrsRHHVrS2jFy+ XVORIDFAtfhZ0zvZ+T2k0eU+rayNH97goFqzPmSQh74skNdMOU+OLlLFDAyhBb3A vJyAKctCqp4tmer/XTqWrP7DM0W/IK1Q0qKutZSKwYx9D4ruTsnIwGb+zgSUMjvb Li27QRqYqgU/0XvPkI4JUnI2nQOzL9/dfXpXu/SwSBPFBjf8I1ohGoqg9p2N8Ss0 tTnhTW7pncQHQFgd0QzRcw==; Received: from relay2.apple.com (relay2.apple.com [17.128.113.67]) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id DA.B2.12011.B9F81185; Wed, 26 Oct 2016 22:24:43 -0700 (PDT) X-AuditID: 11973e13-68e279a000002eeb-3f-58118f9bae62 Received: from nwk-mmpp-sz12.apple.com (nwk-mmpp-sz12.apple.com [17.128.115.204]) by relay2.apple.com (Apple SCV relay) with SMTP id AC.D1.09148.A9F81185; Wed, 26 Oct 2016 22:24:43 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.69.177] by nwk-mmpp-sz12.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0OFO004WMXP5SW70@nwk-mmpp-sz12.apple.com>; Wed, 26 Oct 2016 22:24:42 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Wed, 26 Oct 2016 22:24:41 -0700 Cc: "edk2-devel@lists.01.org" , "Shia, Cinnamon" Message-id: <88D9A338-D75C-4509-8079-2821EE9EF313@apple.com> References: <497D3E4E-A601-476E-897C-78F3ED389C46@apple.com> To: "Lin, Derek (HPS UEFI Dev)" X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRmVeSWpSXmKPExsUi2FDorDu7XzDCYMMkMYun/Z9YLXY0XmO3 2HPoKLMDs8euXY3sHt2z/7EEMEVx2aSk5mSWpRbp2yVwZbzed4al4JJcRfPldsYGxk3iXYyc HBICJhKLX2xl7GLk4hAS2MsocWD1L2aYxPxtG1lBbCGBQ4wSa3awgNi8AoISPybfA7I5OJgF 5CUOnpcFCTMLaEl8f9TKAjHnHaPE3E/zwOqFBcQl3p3ZxAxhe0lcu9HDCGKzCShLrJj/gR1k DqdAvMSRfm+QMIuAqsShR09ZIWYmS7x+fYoJYq2NxKINrVB3PmKU+PVpCzNIrwjQnX8eyoOY EgKyErN/eUFcv4VN4l5TwgRG4VlIjp6FcPQsJEcvYGRexSiUm5iZo5uZZ6qXWFCQk6qXnJ+7 iREU3NPthHcwnl5ldYhRgINRiYfXYJNAhBBrYllxZe4hRmkOFiVx3rp0oJBAemJJanZqakFq UXxRaU5q8SFGJg5OqQZGab6ypsfSC+bkVEzcdM3XXKb65aJV1puVvLd/+CUvuU53s3XhrwNJ z1Y/EX3/9/CB7Q9fdWs6s/eee3X6LgvboRj728sFHl1zdn4m/PT77f76Qxydy60/vbAW5Gm4 xNLAdNKD2SbSTUJJqd32O5tzT2vOywXXuQVKjfnW7raauGyjwDdT61+flViKMxINtZiLihMB LfPdLE8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42IRbCg+ozu7XzDC4MNaRoun/Z9YLXY0XmO3 2HPoKLMDs8euXY3sHt2z/7EEMEVx2aSk5mSWpRbp2yVwZbzed4al4JJcRfPldsYGxk3iXYyc HBICJhLzt21khbDFJC7cW88GYgsJHGKUWLODBcTmFRCU+DH5HpDNwcEsIC9x8LwsSJhZQEvi +6NWoDAXUPk7Rom5n+aB1QsLiEu8O7OJGcL2krh2o4cRxGYTUJZYMf8DO8gcToF4iSP93iBh FgFViUOPnrJCzEyWeP36FBPEWhuJRRtaGSHmP2KU+PVpCzNIrwjQzX8eyoOYEgKyErN/eU1g FJyF5NBZCIfOQnLoAkbmVYwCRak5iZVGeokFBTmpesn5uZsYwWFa6LyD8dgyq0OMAhyMSjy8 HVsEIoRYE8uKK3OBAcHBrCTC694tGCHEm5JYWZValB9fVJqTWnyIMRno/InMUqLJ+cAYyiuJ NzQxMTAxNjYzNjY3MSdNWEmc90Ao0FaB9MSS1OzU1ILUIpgtTBycUg2McRLiN77E1/w7m/z2 lknRgV8KW/z/t0iEdgcmdp09tI7VfY3EvYjJaXwnJCf+3HEh6arIt9rtpmzrbvSttJv761mZ cdDCE3b7cwvm3RRV0d2amcEYd+uTq3ZJ0cKnXtmZx+3q2cqb6457qCdJzAj+fETo0oS8nsr3 Kytspk2SOTRr5uY58Se3KLEUZyQaajEXFScCAGlft7aXAgAA 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:24:43 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > 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 patch minutes ago. > Derek, Thanks for sharing the fix. I noticed it introduced a build failure for a badly formed library INF file. I assume that means this fix is pulling in libraries that are in the DSC file, but not currently being built? That is not really a problem as it means you have too many GUID vs. not enough. I also noticed that your fix adds the FILE_GUID values for all the libraries. The FILE_GUID values for the any PEIM, DXE/UEFI driver that end up in an FV will be present in the ROM, but the library values do not end up in the ROM. Also 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. GuidDict = {} for Arch in ArchList: PlatformDataBase = 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 = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] - GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName)) + if ModuleFile in PlatformDataBase.Modules: + GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName)) for key, item in Module.Protocols.items(): GuidDict[key] = item for key, item in Module.Guids.items(): If your adding ModuleGuidDict was a performance fix, I guess I could just make it a list to keep order. Thanks, Andrew Fish > 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 does not end up in the Guid.xref file. > > It looks to me like this code is only extracting the GUIDs from the 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 > > for Arch in ArchList: > PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] > for ModuleFile in PlatformDataBase.Modules: > Module = 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] = item > for key, item in Module.Guids.items(): > GuidDict[key] = item > for key, item in Module.Ppis.items(): > GuidDict[key] = 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