From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 99827818F2 for ; Tue, 27 Dec 2016 20:16:30 -0800 (PST) Received: by mail-lf0-x22e.google.com with SMTP id t196so198005503lff.3 for ; Tue, 27 Dec 2016 20:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=NPlbe9bgBW9s74Xch8EfXWpQY/56w+I/R9JU8DQp3U4=; b=gGcVGO7dhYkdAKeuqKgcW3MrJnfbsI1lZ695LLed9c60FUC1Ykzm45bBaqaZCBwpzc cgS7dMTvDMDXN545uC9WKTAW0zsm+u7MuNwYsWZ5Ww9A0dQajPIRvqiBbFTSXG2MagiE V7pkMLHjf/eXI9QvNxceV/+1yEClZF2/URmQIVjbASzzQDXq0Jthi0pLL8VCqeuaAZ3W NjvAkAe5vzlziV4yocHboDsoOLObI0HShA6MdRzOafFFO0kmab2t7Pbz+56DR1sqOfCq oiNpRxHS0iGtj+q3Awngximif2wkX42RUapxBu6Ch5CnfDiiJCKs6olOcnAyi6uP7EUN fFQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=NPlbe9bgBW9s74Xch8EfXWpQY/56w+I/R9JU8DQp3U4=; b=bMmJytxD91FFG4rv6T6uXCzgkLg3qhUdeR1nmiHhBZhVWvpjWKMJbiiiZYUAAkxKGT geuvfkt0r92feU5yltOoGdAMSULNc4ZQioXgF+uF2/lTCksbOqiaNNarnez19n8Wpm3e QcX4ct8q3DNExztm+eAqhlY0twwJta+Patgu5sCnX0PX3z03nkqDtQEd/gATVUE+bWnf xMhh/WBl/NPEJqwgufdIEC7QsnSRTEKeoQjgvxx8TgmihrRg5gOsXsMaz1WurroPA6lu XIIh59QcbEZNS1PuRp2xgTxqYlXm2FfSW6wEj4KsW1R76BYnDaOjgLWNiGeqPkZ2EEt2 WZIg== X-Gm-Message-State: AIkVDXJNB7veAA++1NZMSNsbN4lYpxkt6yJHAyp3U2eRQX482RcLoyj7Rwj+0ya7alQxoOuVQucg24NCTZyPlw== X-Received: by 10.25.157.5 with SMTP id g5mr9686471lfe.112.1482898588449; Tue, 27 Dec 2016 20:16:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: GN Keshava Date: Wed, 28 Dec 2016 04:16:17 +0000 Message-ID: To: "Carsey, Jaben" , "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: LocateHandle for gEfiShellProtocolGuid is failing in my application 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, 28 Dec 2016 04:16:31 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks a lot for the help, Jaben. *>>Maybe it is EDK Shell and not UEFI Shell?* How I can understand if it is EDK shell or UEFI shell? (I'm using *UEFI x86 Shell *or *MinShell *from efi\MyWorkSpace\ShellBinPkg\ directory). Is it OK to use this? Is it possible for you to give me an UEFI shell binary for x86 (Intel i5 3470), so that I can try it right away? *>>I wonder if the firmware supplier is using an older version of the shell binary?* For Intel i5 3470, how to check what is the firmware version? Thanks again. Regards, Keshava GN On Wed, 28 Dec 2016 at 04:58 Carsey, Jaben wrote: > I wonder if the firmware supplier is using an older version of the shell > binary? Maybe it is EDK Shell and not UEFI Shell? I am unsure how to fi= x > the issue. > > -Jaben > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > GN Keshava > > Sent: Thursday, December 22, 2016 8:07 PM > > To: Carsey, Jaben ; edk2-devel@lists.01.org > > Subject: Re: [edk2] LocateHandle for gEfiShellProtocolGuid is failing i= n > my > > application > > Importance: High > > > > Hi Jaben, > > > > Version is 2.31... Revision is 4.653 > > > > Thanks. > > Regards, > > Keshava > > > > On Thu, 22 Dec 2016 at 22:26 Carsey, Jaben > wrote: > > > > > That function is not in the shell library. > > > > > > > > > > > > LocateHandle would be useful is you wanted to find the image handle f= or > > > the shell binary whereas LocaetProtocol would be just getting a > pointer to > > > the protocol. > > > > > > > > > > > > Which version of the UEFI Shell are you using? (what does =E2=80=9Cv= er=E2=80=9D > command > > > say) > > > > > > > > > > > > -Jaben > > > > > > > > > > > > *From:* GN Keshava [mailto:keshava.gn@gmail.com] > > > *Sent:* Thursday, December 22, 2016 2:07 AM > > > *To:* Carsey, Jaben ; edk2-devel@lists.01.org > > > *Subject:* Re: [edk2] LocateHandle for gEfiShellProtocolGuid is faili= ng > > > in my application > > > *Importance:* High > > > > > > > > > > > > Hi Jaben and Andrew, Thanks for the replies. Here's a small update. > > > > > > > > > > > > I tried using *LocateProtocol*, and I get "*Status Not Found*" (%r > would > > > print "Status Not Found"). > > > > > > I'm getting the same error status for *LocateHandle *too. I'm using > > > *BufferSize=3D0* and *Buffer=3DNULL* for getting the BufferSize. > > > > > > What this would mean? Is there any specific requirement my applicatio= n > > > should meet, to use ShellProtocol? Or, as I mentioned in previous > mail, I > > > want to use GetMapFromDevicePath function. Is there any alternate way > > to do > > > it? > > > > > > > > > > > > Thanks for your help. > > > > > > Regards, > > > > > > Keshava > > > > > > > > > > > > On Thu, 22 Dec 2016 at 15:01 GN Keshava wrote: > > > > > > Hi Jaben, > > > > > > > > > > > > *>> Is there a reason that you are not using ShellLib to facilitate > your > > > app functionality? That library makes lots of things a lot easier.* > > > > > > > > > > > > I want to use EFI_SHELL_PROTOCOL->*GetMapFromDevicePath* in my > > app. Is > > > there any way to use it using ShellLib ? > > > > > > > > > > > > *>> Why do you use LocateHandle and not LocateProtocol?* > > > > > > > > > > > > Got LocateHandle in my reference. I would like to know more about > > > difference and usage of these in different scenario. > > > > > > > > > > > > *>> Are you running the UEFI Shell and then your application?* > > > > > > > > > > > > Yes. I'm running my application from UEFI shell as : > > > > > > > > > > > > *fs1:\> MyApp.exe Arg1 Arg2* > > > > > > > > > > > > Thanks for the help.. > > > > > > > > > > > > Regards, > > > > > > Keshava > > > > > > > > > > > > On Thu, 22 Dec 2016 at 00:06 Carsey, Jaben > > wrote: > > > > > > Hi Keshava, > > > > > > few questions: > > > Is there a reason that you are not using ShellLib to facilitate your > app > > > functionality? That library makes lots of things a lot easier. > > > Why do you use LocateHandle and not LocateProtocol? > > > Are you sure about that return code? Usually most-sig-bit is set for > > > error returns. > > > > > > Does the following snippet of code find a valid instance? > > > > > > Status =3D gBS->LocateProtocol( > > > &gEfiShellProtocolGuid, > > > NULL, > > > (VOID **)&gEfiShellProtocol > > > ); > > > if (EFI_ERROR(Status)) { > > > gEfiShellProtocol =3D NULL; > > > } > > > > > > Are you running the UEFI Shell and then your application? > > > > > > > > > -Jaben > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf > Of > > > > GN Keshava > > > > Sent: Tuesday, December 20, 2016 11:32 PM > > > > To: edk2-devel@lists.01.org > > > > Subject: [edk2] LocateHandle for gEfiShellProtocolGuid is failing i= n > my > > > > application > > > > Importance: High > > > > > > > > Hi, > > > > > > > > I'm developing a shell application. A call to LocateHandle for > > > > gEfiShellProtocolGuid is failing with Status 0x0E. > > > > > > > > Below is my code. Please let me know what I'm doing wrong. > > > > > > > > Status =3D gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NU= LL, > > > > &BufferSize, Buffer); // Get BufferSize > > > > if (EFI_ERROR(Status)) > > > > Print(L"LocateHandle Status 0x%x\n",Status); > > > > > > > > Status =3D gBS->AllocatePool(EfiBootServicesData, BufferSize, > > > > (void**)&Buffer); > > > > if (EFI_ERROR(Status)) > > > > Print(L"AllocatePool Status 0x%x\n",Status); > > > > > > > > Status =3D gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NU= LL, > > > > &BufferSize, Buffer); > > > > if (EFI_ERROR(Status)) > > > > Print(L"LocateHandle Status 0x%x\n",Status); > > > > > > > > All calls failing with Status being 0x0E. Please help me to solve > this. > > > Is > > > > there any special requirement for using this protocol? > > > > > > > > Thanks. > > > > Regards, > > > > Keshava > > > > _______________________________________________ > > > > 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 >