On 03/26/15 18:42, David Cox wrote:
> Hi,
>
> I have an efi I am trying to execute. I did not create the EFI so have
> no source. Loadimage(…) works, but startimage(…) fails with status 3,
> unsupported. If I build a simple hello world application, it runs this OK.
>
> Things I’ve checked, imagecodetype is 1 (same as launching
> application). The image size is very much larger than the binary size
> on disk when queried by loadedimageprotocol.
>
> I have tried converting binary into a C byte array and including in
> launch application (packing set to 8). Then allocating from pool and
> copying said byte array into pooled memory buffer, passing this as
> source buffer to loadimage(…). Again it works with my helloworld
> application but not with the actual binary I want to run.
>
> I have tried the efi binary shell package and I can successfully run the
> problem binary application from there fine.
>
> Any suggestions would be very helpful,
You can find the gBS->StartImage() implementation in function
CoreStartImage(), file "MdeModulePkg/Core/Dxe/Image/Image.c".
Add DEBUG messages after forks and joins in the control flow. I usually
add a variation of
DEBUG (("%a: %d\n", __FUNCTION__, __LINE__));
That will help identify the check or function call in CoreStartImage()
that fails. You can dig down there and repeat the process, until you
arrive at the exact image check that fails.
This shouldn't take longer than a few tens of builds & test runs,
assuming you can use QEMU and OVMF.
If you are not familiar with them, please see:
- short story: OvmfPkg/README
- long story:
http://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt
Thanks
Laszlo
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel