From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0707.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::707]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 745DA1A1E0E for ; Wed, 5 Oct 2016 13:39:08 -0700 (PDT) Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.151) by CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Wed, 5 Oct 2016 20:39:05 +0000 Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) by CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) with mapi id 15.01.0649.024; Wed, 5 Oct 2016 20:39:05 +0000 From: "Shah, Tapan" To: "Carsey, Jaben" , 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: AdIekL1EjMpAqwOYRWKk8YKyvfLMLgAjbAlwAACkBtAAB0V1AAAA2Y8AAAEEUoAAACH1QAAAc1uAAAAhBCA= Date: Wed, 5 Oct 2016 20:39:05 +0000 Message-ID: References: <93F01BC9-4B02-467E-B900-65C6775BB0F3@apple.com> <618fd786-24d4-653c-d6b8-cb774654c644@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=tapandshah@hpe.com; x-originating-ip: [15.203.227.10] x-ms-office365-filtering-correlation-id: 04198fa8-2064-46a8-ad8b-08d3ed5fa662 x-microsoft-exchange-diagnostics: 1; CS1PR84MB0229; 7:QvaNmAqjTF+CP2QJxZh+GWrU1MAz6wsNPm6QGKTlfLAStknFvZZk06o586bseb3ZWYNRN2fdgvMZEH7ety+IwlTzmj9BjAnNFeHI1RF75y92b0rCIjigDTagGvVmZXuffOJmCVzordPSOwIRmPT69xqwUASEEpEGQ2574KjR6iq3ZoLcyK2OR3poGzKYFcL5PIJNa81Ja2p3fwZgLHTMae4aWLSiC8tvRrsszkYKnPe52QVEEJCZQghUniN096WplpbUPKK5JWx9gqn24AweLS/mi7ki0UooG0DGodToI8TK64eOcltkUrOEBlaGa1vpTW/Ipy1q7SPAL4eoA7/WVg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0229; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(180628864354917)(31960201722614)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CS1PR84MB0229; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0229; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(57704003)(377454003)(13464003)(24454002)(189002)(68736007)(97736004)(189998001)(33656002)(586003)(6116002)(102836003)(3846002)(5001770100001)(2950100002)(86362001)(11100500001)(5660300001)(2900100001)(122556002)(7696004)(99286002)(77096005)(105586002)(93886004)(8666005)(106356001)(50986999)(54356999)(76176999)(74316002)(3660700001)(81156014)(81166006)(2906002)(7736002)(66066001)(92566002)(7846002)(8936002)(9686002)(8676002)(5890100001)(4326007)(19580405001)(3280700002)(19580395003)(101416001)(305945005)(87936001)(10400500002)(5002640100001)(7059030); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0229; H:CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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: 05 Oct 2016 20:39:05.5920 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0229 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:39:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes, it has to be case insensitive per the latest Shell spec. -----Original Message----- From: Carsey, Jaben [mailto:jaben.carsey@intel.com]=20 Sent: Wednesday, October 05, 2016 3:35 PM To: Shah, Tapan ; Laszlo Ersek ; And= rew Fish ; Daniil Egranov Cc: edk2-devel-01 ; Leif Lindholm ; Carsey, Jaben 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