On Sun, Apr 14, 2019 at 12:52:29PM -0700, Ard Biesheuvel wrote:
> Delete the explicit machine type check for option ROM images, and instead,
> rely on the LoadImage() boot service to decide whether an option ROM can
> be dispatched or not. This permits platforms to ship with emulators to
> execute option ROMs that are not native to the processor architecture.
> 
After applying this patch, my OVMF VM failed to boot if e1000 or iPXE
were enabled. It failed with the following message:

Loading driver at 0x0007E537000 EntryPoint=0x0007E53C06D 8086100e.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F003B98
ProtectUefiImageCommon - 0x7F002BC0
  - 0x000000007E537000 - 0x000000000009F900
Image type IA32 can't be started on X64 UEFI system.
ASSERT MdeModulePkg/Core/Dxe/Mem/Pool.c(698): Head->Signature == ((('p') | ('h' 
<< 8)) | ((('d') | ('0' << 8)) << 16)) || Head->Signature == ((('p') | ('h' << 
8)) | ((('d') | ('1' << 8)) << 16))

It seems OVMF was trying to load the IA32 driver and failed.

Gary Lin

> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
> Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>
> ---
>  MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c 
> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
> index c75ef1a82505..54cf4251cc86 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
> @@ -699,13 +699,6 @@ ProcessOpRomImage (
>        goto NextImage;
>      }
>  
> -    //
> -    // Skip the EFI PCI Option ROM image if its machine type is not supported
> -    //
> -    if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (EfiRomHeader->EfiMachineType)) {
> -      goto NextImage;
> -    }
> -
>      //
>      // Ignore the EFI PCI Option ROM image if it is an EFI application
>      //
> -- 
> 2.17.1
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39151): https://edk2.groups.io/g/devel/message/39151
Mute This Topic: https://groups.io/mt/31133142/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to