]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 27 Mar 2017 14:42:30 +0000 (15:42 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 15 Apr 2019 01:37:27 +0000 (18:37 -0700)
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.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c

index f6d679cbcde583abc3189214c2fe7f0725263908..c994ed5fe34b8cad0c1aac80230f5cd8df1952c4 100644 (file)
@@ -693,13 +693,6 @@ ProcessOpRomImage (
       goto NextImage;\r
     }\r
 \r
       goto NextImage;\r
     }\r
 \r
-    //\r
-    // Skip the EFI PCI Option ROM image if its machine type is not supported\r
-    //\r
-    if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (EfiRomHeader->EfiMachineType)) {\r
-      goto NextImage;\r
-    }\r
-\r
     //\r
     // Ignore the EFI PCI Option ROM image if it is an EFI application\r
     //\r
     //\r
     // Ignore the EFI PCI Option ROM image if it is an EFI application\r
     //\r