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 E5D471A1EE0 for ; Wed, 5 Oct 2016 14:15:59 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 05 Oct 2016 14:15:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,302,1473145200"; d="scan'208";a="1060972794" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 05 Oct 2016 14:16:00 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 5 Oct 2016 14:15:58 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.167]) by fmsmsx156.amr.corp.intel.com ([169.254.13.152]) with mapi id 14.03.0248.002; Wed, 5 Oct 2016 14:15:58 -0700 From: "Carsey, Jaben" To: Andrew Fish , Daniil Egranov CC: edk2-devel-01 , Leif Lindholm , "Carsey, Jaben" Thread-Topic: [edk2] Assert in ShellPkg with latest tianocore edk2 source on the Reference Platform Thread-Index: AdIekL1EjMpAqwOYRWKk8YKyvfLMLgAjbAlwAACkBtAAFfCNAAAA2Y4AAAJCKwAAAG/CAAAOeDMA Date: Wed, 5 Oct 2016 21:15:58 +0000 Message-ID: References: <93F01BC9-4B02-467E-B900-65C6775BB0F3@apple.com> <6ac805ec-66c2-a291-7852-3429efa018cd@arm.com> <9F98A80B-A3F4-4956-9D84-33C166384EB6@apple.com> In-Reply-To: <9F98A80B-A3F4-4956-9D84-33C166384EB6@apple.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTk3YTVkYzYtNmU3OC00OGYyLWJmNjctOGIyMDA4ZDYzNjNkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImxPekN5U0pWczc3STVJeFwvVWRGU1ZHK0dsSXRSUWxFbk9jWVd6ZWNFckVZPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: Assert in ShellPkg with latest tianocore edk2 source on the Reference Platform 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, 05 Oct 2016 21:16:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable All, What are your thoughts about Tapan's suggestion to move the protocol locati= on to the only function that needs it? Andrew, We cannot publish a dependency. There are DXE driver dynamic shell command= s that launch before the shell runs and produce the appropriate protocol so= that the shell will call into them. These drivers must be allowed to succ= essfully launch before the shell runs. Danil, Can you elaborate what your DXE driver is doing with the library? -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Andrew Fish > Sent: Wednesday, October 05, 2016 2:06 PM > To: Daniil Egranov > Cc: Carsey, Jaben ; edk2-devel-01 devel@lists.01.org>; Leif Lindholm > Subject: Re: [edk2] Assert in ShellPkg with latest tianocore edk2 source = on > the Reference Platform > Importance: High >=20 >=20 > > On Oct 5, 2016, at 1:53 PM, Daniil Egranov > wrote: > > > > > > > > On 10/05/2016 02:48 PM, Andrew Fish wrote: > >>> On Oct 5, 2016, at 12:24 PM, Daniil Egranov > wrote: > >>> > >>> I have the same ASSERT issue on Juno platform even the EnglishDxe.inf > is included to the platform build. If UefiShellLib has such dependency on= the > protocol then according to EDKII Module Writer's Guide you need to specif= y > the dependency on protocol in the module .inf to ensure the drivers prope= r > load sequence. > >>> > >>> 8.6 Dependency Expressions > >>> A dependency expression specifies the protocols that the DXE driver > requires to > >>> execute. In EDK II, it is specified in the [Depex] section of INF fil= e. > >>> > >> The Dependency Expression is for DXE Drivers that are dispatched by th= e > DXE Core. A UEFI Driver from an option ROM or an Application does not get > dispatched by the dispatch and the Depex will not help. The Depex ends up > being a section in the FV and it has nothing to do with the PE/COFF image= of > the an application or option ROM. > >> > >> IMHO the shell should try as hard as possible to function and should n= ot > ASSERT if some newer Protocol is missing. > >> > >> Thanks, > >> > >> Andre wFish > > I had to put a context of the ASSERT message in the original message to > make it more clear: > > > > add-symbol-file > /home/user1/workspace/juno_16.09/uefi/edk2/Build/ArmJuno/DEBUG_GC > C49/AARCH64/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJuno > Dxe/DEBUG/ArmJunoDxe.dll 0xF8AB9000 > > Loading driver at 0x000F8AB8000 EntryPoint=3D0x000F8AB9048 > ArmJunoDxe.efi > > > > ASSERT_EFI_ERROR (Status =3D Not Found) > > ASSERT [ArmJunoDxe] > /home/danegr01/workspace/juno_16.09/uefi/edk2/ShellPkg/Library/UefiSh > ellLib/UefiShellLib.c(305): !EFI_ERROR (Status) > > > > If driver includes a module which has dependency on one of the protocol= s, > should the driver know about this dependency? Probably not. It should be > inherited from the module. Adding [Depex] to UefiShellLib corrected > dispatching ArmJunoDxe and EnglishDxe by the Dxe Core. > > >=20 > Daniil, >=20 > Sorry, I was assuming the UefiShellLib only supported UEFI Applications. > Thats what I get for not looking at the code :(, my bad. >=20 > https://github.com/tianocore/edk2/blob/master/ShellPkg/Library/UefiShellL > ib/UefiShellLib.inf#L23 > lLib/UefiShellLib.inf#L23> > LIBRARY_CLASS =3D ShellLib|UEFI_APPLICATION UEFI_DRIVE= R > DXE_RUNTIME_DRIVER DXE_DRIVER >=20 > Given the library supports DXE_RUNTIME_DRIVER and DXE_DRIVER I think > you are right it should publish a Depex if it has a hard dependency. >=20 > I'm guessing that your DXE Driver is dispatching prior UEFI Driver that > publishes the protocol. >=20 > Thanks, >=20 > Andrew Fish >=20 >=20 > >> > >> > >>> The following dependency in UefiShellLib.inf fixes ASSERT problem: > >>> > >>> [Depex] > >>> gEfiUnicodeCollation2ProtocolGuid > >>> > >>> > >>> Thanks, > >>> > >>> Daniil > >>> > >>> > >>> On 10/05/2016 11:02 AM, Shah, Tapan wrote: > >>>> It's possible. But I think gEfiUnicodeCollation2ProtocolGuid protoco= l is > necessary for even other Shell libraries other than UefiShellLib in order= to > have Shell parser and other command line processing to work properly. > That's why I added ASSERT if UefiShellLib fails to locate the protocol. > >>>> Reference platform should have EnglishDxe module to have this > protocol installed properly. > >>>> > >>>> > MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf > >>>> > >>>> -----Original Message----- > >>>> From: Carsey, Jaben [mailto:jaben.carsey@intel.com] > >>>> Sent: Wednesday, October 05, 2016 10:41 AM > >>>> To: Supreeth Venkatesh ; edk2- > devel-01 ; Shah, Tapan > >>>> Cc: Leif Lindholm ; Carsey, Jaben > > >>>> Subject: RE: Assert in ShellPkg with latest tianocore edk2 source on= the > Reference Platform > >>>> > >>>> Tapan, > >>>> > >>>> Could this be a side effect of your patch? Should we allow the > UefiShellLib to continue without this protocol and then return an error o= nly > when the OpenFile is called? > >>>> > >>>> Also, it looks like we never properly initialize > mUnicodeCollationProtocol. We check for NULL in Constructor, but nothing > else... > >>>> > >>>> -Jaben > >>>> > >>>>> -----Original Message----- > >>>>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On > Behalf Of > >>>>> Supreeth Venkatesh > >>>>> Sent: Tuesday, October 04, 2016 3:51 PM > >>>>> To: edk2-devel-01 > >>>>> Cc: Leif Lindholm > >>>>> Subject: [edk2] Assert in ShellPkg with latest tianocore edk2 sourc= e > >>>>> on the Reference Platform > >>>>> Importance: High > >>>>> > >>>>> All, > >>>>> > >>>>> Recently, I updated to latest edk2 master (yesterday's) and I am > >>>>> actually encountering assert in > >>>>> ShellPkg/Library/UefiShellLib/UefiShellLib.c > >>>>> > >>>>> if (mUnicodeCollationProtocol =3D=3D NULL) { > >>>>> Status =3D gBS->LocateProtocol (&gEfiUnicodeCollation2ProtocolG= uid, > >>>>> NULL, (VOID**)&mUnicodeCollationProtocol); > >>>>> ASSERT_EFI_ERROR (Status); > >>>>> } > >>>>> > >>>>> It was working few weeks back and has now stopped working. > >>>>> It's probably because the platform is unable to locate this protoc= ol > >>>>> "UnicodeCollationProtocol". > >>>>> Is Anyone else facing the same issue? > >>>>> Does the new ShellPkg requires additional packages/infs to be > included > >>>>> in the platform description file to work with latest changes to ge= t > >>>>> past this error? > >>>>> > >>>>> Thanks, > >>>>> Supreeth > >>>>> IMPORTANT NOTICE: The contents of this email and any attachments > are > >>>>> confidential and may also be privileged. If you are not the intende= d > >>>>> recipient, please notify the sender immediately and do not disclose > >>>>> the contents to any other person, use it for any purpose, or store = or > >>>>> copy the information in any medium. Thank you. > >>>>> _______________________________________________ > >>>>> edk2-devel mailing list > >>>>> edk2-devel@lists.01.org > >>>>> https://lists.01.org/mailman/listinfo/edk2-devel > >>>> _______________________________________________ > >>>> edk2-devel mailing list > >>>> edk2-devel@lists.01.org > >>>> https://lists.01.org/mailman/listinfo/edk2-devel > >>> _______________________________________________ > >>> edk2-devel mailing list > >>> edk2-devel@lists.01.org > >>> https://lists.01.org/mailman/listinfo/edk2-devel > >> _______________________________________________ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://lists.01.org/mailman/listinfo/edk2-devel > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel