From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: suse.com, ip: 195.135.221.5, mailfrom: glin@suse.com) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) by groups.io with SMTP; Mon, 15 Apr 2019 23:02:44 -0700 Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Tue, 16 Apr 2019 08:02:42 +0200 Received: from GaryWorkstation (nwb-a10-snat.microfocus.com [10.120.13.201]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Tue, 16 Apr 2019 07:02:29 +0100 Date: Tue, 16 Apr 2019 14:02:24 +0800 From: "Gary Lin" To: devel@edk2.groups.io, ard.biesheuvel@linaro.org Cc: Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi , Jian J Wang , Hao Wu Subject: Re: [edk2-devel] [PATCH v6 3/7] MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures Message-ID: <20190416060224.GH21677@GaryWorkstation> References: <20190414195233.30045-1-ard.biesheuvel@linaro.org> <20190414195233.30045-4-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20190414195233.30045-4-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.11.3 (2019-02-01) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > Reviewed-by: Michael D Kinney > --- > 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 > > > > >