[coreboot] [PATCH] v3: die() if the PCI scan code is broken

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Oct 24 02:35:39 CEST 2008

Since revision 845, we had a really loud error message in the coreboot
boot log at least on qemu:
ERROR: pci_scan_bus called with incorrect bus->dev->path.type, path is
Since this means we completely ignore the static device tree, upgrade
the error message to die().

A port with a bug in the PCI scan code should not be allowed to keep
people scratching their heads about why the static device tree and
associated settings are ignored. Instead, the boot should fail loudly.

This will break booting at least on qemu.
Try applying it if your target shows any PCI/HT related funnies.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: corebootv3-pci_scan_bus_die/device/pci_device.c
--- corebootv3-pci_scan_bus_die/device/pci_device.c	(Revision 951)
+++ corebootv3-pci_scan_bus_die/device/pci_device.c	(Arbeitskopie)
@@ -1101,9 +1101,11 @@
 	printk(BIOS_DEBUG, "%s start bus %p, bus->dev %p\n", __func__, bus,
-	if (bus->dev->path.type != DEVICE_PATH_PCI_BUS)
+	if (bus->dev->path.type != DEVICE_PATH_PCI_BUS) {
 		printk(BIOS_ERR, "ERROR: pci_scan_bus called with incorrect "
 		       "bus->dev->path.type, path is %s\n", dev_path(bus->dev));
+		die("The PCI scan code is broken");
+	}
 	printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %04x:%02x\n",


More information about the coreboot mailing list