It appears you are using the EDK Shell (not the UEFI shell) since you are using
ShellEnvironment2. Is that your intention?
In the UEFI shell, this would be ShellPkg/Include/Protocol/EfiShell.h and the
corresponding function is:
typedef
EFI_STATUS
(EFIAPI *EFI_SHELL_EXECUTE) (
IN EFI_HANDLE *ParentImageHandle,
IN CHAR16 *CommandLine OPTIONAL,
IN CHAR16 **Environment OPTIONAL,
OUT EFI_STATUS *StatusCode OPTIONAL
);
Tim
From: J. E. [mailto:[email protected]]
Sent: Thursday, September 18, 2014 10:22 PM
To: [email protected]
Subject: Re: [edk2] ShellExecute crashing in NT emulator
Yep thats the first thing I did, search all of UDK for SHELLENV_GET_ENV using
Agent Ransack which searches binary and unicode as well.
I found nothing except for the EfiShellEnvironment2.h and UefiShellLib.lib
files.
No idea where SHELLENV_GET_ENV is defined, it doesnt make sense.
If I boot and run the app in the proper EFI Shell, ShellExecute doesn't hang,
but execution fails. Status is always EFI_SUCCESS
The echo commands in the NSH file do not output text onscreen, and the efi file
in the NSH doesn't launch.
Status = ShellExecute(ImageHandle, L"fs1:", TRUE, NULL, NULL);
Status = ShellExecute(ImageHandle, L"cd fs1:\\TEST", TRUE, NULL, NULL);
Status = ShellExecute(ImageHandle, L"run.nsh", TRUE, NULL, NULL);
The above commands work fine if I type them in manually in the EFI shell.
ShellExecute just seems broken, I can find the code so I cant debug it.
Everything compiles ok.
Maybe I should download the latest source instead of using the UDK2014 release,
or change the compiler to GCC or Intel.
________________________________
From: [email protected]<mailto:[email protected]>
Date: Thu, 18 Sep 2014 18:48:25 -0700
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] ShellExecute crashing in NT emulator
Sent from my iPhone
On Sep 18, 2014, at 6:01 PM, J. E.
<[email protected]<mailto:[email protected]>> wrote:
It is crashing in SHELLENV_EXECUTE but I cant seem to find the c source for
this function in
UDK\ShellPkg\Include\Protocol\EfiShellEnvironment2.h
typedef
EFI_STATUS
(EFIAPI *SHELLENV_EXECUTE) (
IN EFI_HANDLE *ParentImageHandle,
IN CHAR16 *CommandLine,
IN BOOLEAN DebugOutput
);
Which c file has the actual source code?
For protocols look at the global, EFI_GUID. Grep for that global. The producer
will pass it as an argument to install protocol boot service.
Thanks,
Andrew Fish
________________________________
From: [email protected]<mailto:[email protected]>
Date: Thu, 18 Sep 2014 16:38:51 -0700
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] ShellExecute crashing in NT emulator
On Sep 18, 2014, at 4:24 PM, J. E.
<[email protected]<mailto:[email protected]>> wrote:
I am compiling and running secmain from the command line with no debugger,
compiler is VS2005.
Perhaps there is a way to dump the exception to file?
Not sure as I don't use VC++.
It happens in Windows 7 64 as well.
I'll see if I can debug the ShellExecute function directly to find out which
line is crashing out
Look at: http://tianocore.sourceforge.net/wiki/NT32
Thanks,
Andrew Fish
________________________________
From: [email protected]<mailto:[email protected]>
Date: Thu, 18 Sep 2014 10:25:30 -0700
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] ShellExecute crashing in NT emulator
On Sep 18, 2014, at 6:22 AM, J. E.
<[email protected]<mailto:[email protected]>> wrote:
The below code is crashing the emulator, any ideas?
Do you get a stack trace and error messages from the crash?
Thanks,
Andrew Fish
Is it a Windows 8 thing? (can't test a Win7 system or via proper EFI shell
right now)
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
Status = ShellExecute(ImageHandle, L"startup.nsh", FALSE, NULL, NULL); //
Crash dxecore.dll
Status = ShellExecute(ImageHandle, NULL, FALSE, NULL, NULL); // Crash
dxecore.dll
}
UDK2014
Win8.1 64bit
UEFI Mode
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________ edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________ edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________ edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel