From 41604531cac69c5591316df32a45bc102effc2c3 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Mon, 3 Mar 2014 18:47:15 +0100 Subject: [PATCH 4/7] Ignore PCI autoboot device location if set to 00:00.0 RH-Author: Alex Williamson Message-id: <20140303184715.19235.4758.stgit@bling.home> Patchwork-id: 57979 O-Subject: [RHEL7 ipxe PATCH 4/4] [prefix] Ignore PCI autoboot device location if set to 00:00.0 Bugzilla: 1031518 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Paolo Bonzini RH-Acked-by: Vlad Yasevich RH-Acked-by: Stefan Hajnoczi From: Michael Brown Bugzilla: 1031518 Upstream: ff1e7fc72b138fe66de1452a311b7e871f33e201 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 Signed-off-by: Michael Brown --- src/arch/i386/core/pci_autoboot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Signed-off-by: Miroslav Rezanina --- src/arch/i386/core/pci_autoboot.c | 6 ++++-- 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 bbb4027..5e6197e 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 */ -- 1.7.1