]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[romprefix] Allow autoboot device filter to be disabled
authorMichael Brown <mcb30@ipxe.org>
Mon, 13 Apr 2015 13:49:02 +0000 (14:49 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 13 Apr 2015 13:49:02 +0000 (14:49 +0100)
Our current behaviour when booting as a ROM is to autoboot only from
devices which are attached via the PCI bus:dev.fn address passed to
the ROM's initialisation vector.

Add a build configuration option AUTOBOOT_ROM_FILTER (enabled by
default) to control this behaviour.  This allows for ROMs to be built
which will attempt to boot from any detected device, even if not
attached via the original PCI bus:dev.fn address.  (This is
particularly useful when building combined EHCI/xHCI ROMs for USB
network boot, since the BIOS may request a boot via the EHCI
controller but the xHCI driver will reroute the root hub ports to the
xHCI controller.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/prefix/romprefix.S
src/config/general.h

index 777b9e042acddc774b1821d65522c7960a98f10f..27b1627f25bbbf6e9c0ae7b4a3631dd566decbd6 100644 (file)
@@ -775,7 +775,9 @@ exec:       /* Set %ds = %cs */
 
        /* Store PCI bus:dev.fn, if applicable */
 .ifeqs BUSTYPE, "PCIR"
+#ifdef AUTOBOOT_ROM_FILTER
        movw    %ax, autoboot_busdevfn
+#endif /* AUTOBOOT_ROM_FILTER */
 .endif
 
        /* Call main() */
index 65c1f8554f22f6187fafeb7558da491ddc287010..7676f158894e2492e0d72d32686b9de5e5b12c24 100644 (file)
@@ -140,6 +140,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  *
  */
 #undef NONPNP_HOOK_INT19       /* Hook INT19 on non-PnP BIOSes */
+#define        AUTOBOOT_ROM_FILTER     /* Autoboot only devices matching our ROM */
 
 /*
  * Error message tables to include