summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2014-03-03 17:23:41 +0100
committerMichael Brown2014-03-03 17:28:43 +0100
commitff1e7fc72b138fe66de1452a311b7e871f33e201 (patch)
tree6f4131db5603b2fad38dc284da07129d719ab6ab /src
parent[romprefix] Store boot bus:dev.fn address as autoboot device location (diff)
downloadipxe-ff1e7fc72b138fe66de1452a311b7e871f33e201.tar.gz
ipxe-ff1e7fc72b138fe66de1452a311b7e871f33e201.tar.xz
ipxe-ff1e7fc72b138fe66de1452a311b7e871f33e201.zip
[prefix] Ignore PCI autoboot device location if set to 00:00.0
qemu can load an option ROM which is not associated with a particular PCI device using the "-option-rom" syntax. Under these circumstances, we should ignore the PCI bus:dev.fn address that we expect to find in %ax on entry to the initialisation vector. Fix by using the PCI bus:dev.fn address only if it is non-zero. Since 00:00.0 will always be the host bridge, it can never be the address of a network card. Reported-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/core/pci_autoboot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/i386/core/pci_autoboot.c b/src/arch/i386/core/pci_autoboot.c
index bbb402774..5e6197e2e 100644
--- a/src/arch/i386/core/pci_autoboot.c
+++ b/src/arch/i386/core/pci_autoboot.c
@@ -34,8 +34,10 @@ uint16_t __bss16 ( autoboot_busdevfn );
*/
static void pci_autoboot_init ( void ) {
- autoboot_device.bus_type = BUS_TYPE_PCI;
- autoboot_device.location = autoboot_busdevfn;
+ if ( autoboot_busdevfn ) {
+ autoboot_device.bus_type = BUS_TYPE_PCI;
+ autoboot_device.location = autoboot_busdevfn;
+ }
}
/** PCI autoboot device initialisation function */