Comment 4 for bug 1882671

Revision history for this message
Laszlo Ersek (Red Hat) (lersek) wrote : Re: qemu-system-x86_64 (ver 4.2) stuck at boot with OVMF bios

Vladislav,

The OVMF debug log ends like this (with UEFI protocol GUIDs decoded as
their textual identifiers in edk2):

> [Security] 3rd party image[6D19D18] can be loaded after EndOfDxe: PciRoot(0x0)/Pci(0x3,0x0)/Offset(0x16400,0x4B1FF).
> InstallProtocolInterface: [EfiLoadedImageProtocol] 6D187C0
> Loading driver at 0x00006B1F000 EntryPoint=0x00006B25497 82540em.efi
> InstallProtocolInterface: [EfiLoadedImageDevicePathProtocol] 6D18498
> ProtectUefiImageCommon - 0x6D187C0
> - 0x0000000006B1F000 - 0x00000000000B6E60
> InstallProtocolInterface: [EfiDriverBindingProtocol] 6B50C00
> InstallProtocolInterface: [EfiComponentName2Protocol] 6B50BD0
> ASSERT /home/jenkins/workspace/edk2/rpms/build/edk2-g6ff7c838d0/MdeModulePkg/Core/Dxe/Image/Image.c(1676): Image->Tpl == gEfiCurrentTpl

This final log snippet confirms that a UEFI device driver called
"82540em.efi" is being loaded and started from the option ROM BAR of the
PCI device that is at slot 3, function 0, of the root bridge.

When this UEFI device driver is started, it trips an assert in the
platform firmware. Namely, in the CoreStartImage() function in the
"MdeModulePkg/Core/Dxe/Image/Image.c" source file of edk2:

  //
  // Image has completed. Verify the tpl is the same
  //
  ASSERT (Image->Tpl == gEfiCurrentTpl);

This suggests that the "82540em.efi" driver exits its entry point
function after having raised, but not having restored, the TPL (Task
Priority Level). In other words, the symptom indicates a bug in the UEFI
driver.

I *suspect* (but am not sure) that you are using an e1000 emulated NIC,
and the "82540em.efi" driver exposed in its oprom comes from the iPXE
project:

src/drivers/net/intel.c: PCI_ROM ( 0x8086, 0x100e, "82540em", "82540EM", 0 ),

Therefore I suspect a bug in the iPXE version that the Ubuntu 20.04
upgrade brought to you.

(I can see a number of TPL-related patches in the iPXE git history,
around Feb-Mar 2018. And QEMU loads the iPXE oprom into the emulated
NICs ROM BAR.)

Please try installing different versions of the iPXE package on your
Ubuntu host, and re-run your test (without changing any other elements
of your setup).

Thanks.