Adding back Michael (author of the syslinux list message that you
reference below). Also adding Gerd.

On 04/06/15 21:23, BALATON Zoltan wrote:
> Hello,
> 
> I'm trying to find out why pxe boot with syslinux is failing on QEMU with 
> OVMF. 
> The problem is already described here in detail:
> 
> http://www.syslinux.org/archives/2014-November/022804.html

Note "iPXE" from the boot screen capture.

> Since it is reported to work on real hardware (presumably with a different 
> UEFI 
> implementation) I suspect a bug in OVMF. I've tried to debug it but could not 
> get very far. Syslinux starts with this code (the whole function can be seen 
> at 
> http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/efi/main.c#n1252):
> 
> status = uefi_call_wrapper(BS->HandleProtocol, 3, image,
>                          &LoadedImageProtocol, (void **)&info);
> if (status != EFI_SUCCESS) {
>       Print(L"Failed to lookup LoadedImageProtocol\n");
>       goto out;
> }
> 
> status = uefi_call_wrapper(BS->HandleProtocol, 3, info->DeviceHandle,
>                          &PxeBaseCodeProtocol, (void **)&pxe);
> if (status != EFI_SUCCESS) {
>       /*
>        * Use device handle to set up the volume root to
>        * proceed with ADV init.
>        */
>       if (EFI_ERROR(efi_set_volroot(info->DeviceHandle))) {
>               Print(L"Failed to locate root device to prep for ");
>               Print(L"file operations & ADV initialization\n");
>               goto out;
>       }
> 
>       efi_derivative(SYSLINUX_FS_SYSLINUX);
>       ops[0] = &vfat_fs_ops;
> } else {
>       efi_derivative(SYSLINUX_FS_PXELINUX);
>       ops[0] = &pxe_fs_ops;
> }
> 
> but it seems to fail to get the PxeBaseCode

Right. This is the important part.

> and takes the wrong path and trying 
> to read from a vfat volume instead of pxe hence the error message about 
> failing 
> read blocks. If I force it to always use pxe it will fail at
> http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/efi/pxe.c#n51
> when trying to do:
> 
> status = LibLocateHandle(ByProtocol, &PxeBaseCodeProtocol,
>                        NULL, &nr_handles, &handles);
> 
> Does the above make sense to anyone with better understanding of edk2/Ovmf 
> and 
> could hint at why it fails? Any insight is greatly appreciated.

This is a known iPXE problem that has manifested in various forms.

Instead of rehashing all the messages posted around this in the past,
let me just dump a number of links at you:

RHBZ (with many dupes), for  background only:
- https://bugzilla.redhat.com/show_bug.cgi?id=1181980

Detailed discussion of the bug:
- http://lists.ipxe.org/pipermail/ipxe-devel/2015-February/003979.html

Pending patches:
- http://lists.ipxe.org/pipermail/ipxe-devel/2015-March/004007.html

In summary, please ask Gerd to rebuild the ipxe binaries that are
bundled with upstream qemu such that they include those two iPXE patches
of ours (see the last reference).

-*-

You can also work around the issue with the following qemu option:

  -device virtio-net-pci,...,romfile=

This will select virtio-net, plus disable the iPXE option ROM for it.

OVMF has a builtin SimpleNetworkProtocol driver for virtio-net. If you
pass the above command line option, the full edk2 network stack (...
well, the modules built into OVMF anyway) should be erected on top of
OVMF's virtio-net SNP, *including* PxeBaseCode. Then EFI applications
looking for that protocol should succeed.

Thanks
Laszlo

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to