aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-02-21 09:12:23 -0700
committerKevin O'Connor <kevin@koconnor.net>2013-02-24 12:02:04 -0500
commit88cb66ea542906ffff8a80ef397b9e3adbb33116 (patch)
tree2f980b506bc7ffbba2214e9118b0cb67ac4cbb0c
parent985a9d3b019f0c50b0a0751fe3d7feb672ef4c0e (diff)
downloadseabios-88cb66ea542906ffff8a80ef397b9e3adbb33116.zip
seabios-88cb66ea542906ffff8a80ef397b9e3adbb33116.tar.gz
seabios-88cb66ea542906ffff8a80ef397b9e3adbb33116.tar.bz2
seabios: Add a dummy PCI slot to irq mapping functionrel-1.7.2.1
This should never get called, but if we somehow get a new chipset that fails to implement their own pci_slot_get_irq function, fail gracefully and add a debug log message. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r--src/pciinit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pciinit.c b/src/pciinit.c
index c670a2b..b3f359f 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -91,7 +91,15 @@ const u8 pci_irqs[4] = {
10, 10, 11, 11
};
-static int (*pci_slot_get_irq)(struct pci_device *pci, int pin);
+static int dummy_pci_slot_get_irq(struct pci_device *pci, int pin)
+{
+ dprintf(1, "pci_slot_get_irq called with unknown routing\n");
+
+ return 0xff; /* PCI defined "unknown" or "no connection" for x86 */
+}
+
+static int (*pci_slot_get_irq)(struct pci_device *pci, int pin) =
+ dummy_pci_slot_get_irq;
// Return the global irq number corresponding to a host bus device irq pin.
static int piix_pci_slot_get_irq(struct pci_device *pci, int pin)