Hi Daryl,

Thanks for your advice. Currently I just have the workaround that my UEFI
driver invoking a application by LoadImage or ShellExecute, of cause the
application should be built with StdLib.
But I encountered some problems when using LoadImage and ShellExecute:

Case 1:
For ShellExecute, I have an absolute file path of application for parameter
in ShellExecute. I always get EFI_SUCCESS from Status, but it seems that
the StdLibApp.efi is never executed.
*My UEFI Driver--ShellExecute-->StdLibApp*
e.g.
*ShellExecute (ImageHandle, L"folder1\folder2\StdLibApp.efi", FALSE, NULL,
&Status);*

Case 2:
For LoadImage, also have the absolute file path for LoadImage function.
*My UEFI Driver--LoadImage/StartImage-->StdLibApp*
e.g.
*gBS->LoadImage(FALSE, ImageHandle, FilePath, NULL, 0, &Handle);*
*gBS->StartImage(Handle, NULL, NULL );*
But I got an error EFI_STATUS from StartImage.
I tried to change the StdLibApp to a PURE EFI Application, it works.
Case 3:
Base on the result from case 2, an idea as below.
*My UEFI Driver--LoadImage/StartImage-->PureEFIApp--ShellExecute-->StdLibApp
*

Unfortunately, also failed in case 3. I got the situation when calling
ShellExeute which is same as case 1.

Maybe my method and idea are a bit tortuous, but above are solutions I can
think of so far.
Now I am back to case 2 and studying any solution can load a StdLibApp in
an UEFI Driver.

Thanks

Jeffrey
2013/5/11 Mcdaniel, Daryl <[email protected]>

>  Jeffrey,****
>
> ** **
>
> The current version of StdLib is designed to only work as a Shell
> Application.  Many of the services that StdLib relies upon are not
> available until the BDS phase, or later.  As such, it is strongly
> recommended that StdLib not be used in drivers.  It is my desire to provide
> a “standalone” version of StdLib in the future, but it is not currently
> scheduled.****
>
> ** **
>
> Daryl McDaniel
>
> *“In the pun, two strings of thought are tangled into one acoustic knot.”
> -- Arthur Koestler*
>
> ****
>
> ** **
>
> *From:* Jeffrey Chou [mailto:[email protected]]
> *Sent:* Tuesday, May 07, 2013 3:20 AM
> *To:* edk2-devel
> *Subject:* [edk2] Using StdLib in UEFI_DRIVER Type****
>
> ** **
>
> Hi all,****
>
>  ****
>
> I am trying to use StbLib in an uefi driver module, and it seems the
> StbLib is only supported on UEFI_APPLICATION. So I have an idea that my
> uefi driver invoking an uefi application built with StdLib thru
> ShellExecute or LoadImage. But I am facing a problem that I don't know how
> to pass auguments to the application (in loadimage) and get the return
> value from the application. Any suggestions?****
>
>  ****
>
> Thanks****
>
> Jeffrey****
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to