From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from msmail.insydesw.com.tw (ms.insydesw.com [211.75.113.220]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 422D01A1E1B for ; Wed, 5 Oct 2016 13:44:23 -0700 (PDT) Received: from msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05]) by msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05%11]) with mapi id 14.01.0438.000; Thu, 6 Oct 2016 04:44:21 +0800 From: Tim Lewis To: "Carsey, Jaben" , "Shah, Tapan" , Laszlo Ersek , Andrew Fish , Daniil Egranov CC: edk2-devel-01 , Leif Lindholm Thread-Topic: [edk2] Assert in ShellPkg with latest tianocore edk2 source on the Reference Platform Thread-Index: AdIekL1EjMpAqwOYRWKk8YKyvfLMLgAjbAlwAACkBtD//7QPAIAABswAgAAII4CAAAHsAIAAAr6A//94KYA= Date: Wed, 5 Oct 2016 20:44:20 +0000 Message-ID: <7236196A5DF6C040855A6D96F556A53F3F3F6D@msmail.insydesw.com.tw> References: <93F01BC9-4B02-467E-B900-65C6775BB0F3@apple.com> <618fd786-24d4-653c-d6b8-cb774654c644@redhat.com> In-Reply-To: Accept-Language: en-US, zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.100.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 20:44:23 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jaben -- In which cases would you have the Shell protocol present and not have the U= nicode Collation protocol? By my count, the Shell itself cannot function without it (see ProcessComman= dLine()).=20 Tim -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Cars= ey, Jaben Sent: Wednesday, October 05, 2016 1:35 PM To: Shah, Tapan ; Laszlo Ersek ; And= rew Fish ; Daniil Egranov Cc: Carsey, Jaben ; edk2-devel-01 ; Leif Lindholm Subject: Re: [edk2] Assert in ShellPkg with latest tianocore edk2 source on= the Reference Platform That should work. We also need to initialize the variable to NULL in the c= onstructor. Do we need to be case insensitive for this? Can we use memcmp instead of t= he prototol? -Jaben > -----Original Message----- > From: Shah, Tapan [mailto:tapandshah@hpe.com] > Sent: Wednesday, October 05, 2016 1:25 PM > To: Laszlo Ersek ; Andrew Fish ;=20 > Daniil Egranov > Cc: Carsey, Jaben ; edk2-devel-01 devel@ml01.01.org>; Leif Lindholm > Subject: RE: [edk2] Assert in ShellPkg with latest tianocore edk2=20 > source on the Reference Platform > Importance: High >=20 > How about moving protocol locate from constructor to the actual=20 > function level and returning an error if it fails to locate (See attached= patch file). >=20 > Tapan >=20 > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Wednesday, October 05, 2016 3:18 PM > To: Andrew Fish ; Daniil Egranov=20 > > Cc: Carsey, Jaben ; edk2-devel-01 devel@ml01.01.org>; Leif Lindholm ; Shah, Tapan=20 > > Subject: Re: [edk2] Assert in ShellPkg with latest tianocore edk2=20 > source on the Reference Platform >=20 > On 10/05/16 21:48, Andrew Fish wrote: > > > >> On Oct 5, 2016, at 12:24 PM, Daniil Egranov=20 > >> > wrote: > >> > >> I have the same ASSERT issue on Juno platform even the=20 > >> EnglishDxe.inf is > included to the platform build. If UefiShellLib has such dependency on=20 > the protocol then according to EDKII Module Writer's Guide you need to=20 > specify the dependency on protocol in the module .inf to ensure the=20 > drivers proper load sequence. > >> > >> 8.6 Dependency Expressions > >> A dependency expression specifies the protocols that the DXE driver=20 > >> requires to execute. In EDK II, it is specified in the [Depex]=20 > >> section of INF > file. > >> > > > > The Dependency Expression is for DXE Drivers that are dispatched by=20 > > the > DXE Core. A UEFI Driver from an option ROM or an Application does not=20 > get dispatched by the dispatch and the Depex will not help. The Depex=20 > ends up being a section in the FV and it has nothing to do with the=20 > PE/COFF image of the an application or option ROM. > > > > IMHO the shell should try as hard as possible to function and should=20 > > not > ASSERT if some newer Protocol is missing. >=20 > (Background: commit 583448b441650.) >=20 > In this specific case, the protocol dependency seems possible to eliminat= e: >=20 > - Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c > includes the CharToUpper() function, which is minimal -- could even be=20 > copied or moved over -- and can translate the ASCII subset of UCS-2, >=20 > - once the ASCII characters of the input string have been translated=20 > to upper case, the result could be searched for / compared against L"NULL= " > using BaseLib.h APIs. >=20 > (Given that L"NULL" only contains characters from the ASCII subset, it=20 > suffices to upper-case ASCII chars in the input string. No non-ASCII=20 > character in the BMP can translate to ASCII N/U/L via upcasing, even=20 > with the real collation protocol (I trust), and no other ASCII=20 > characters than n/u/l will translate to N/U/L. This means that we=20 > won't miss an instance of NULL because we didn't upcate it (because it=20 > was non-ascii), and it also means we won't mistakenly match something=20 > non-NULL as NULL.) >=20 > Just my two cents. >=20 > Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel