diff options
author | jhb <jhb@FreeBSD.org> | 2005-07-13 15:41:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-07-13 15:41:16 +0000 |
commit | 373a6e31c98580fa8ace2a9d298d7ff62371d45b (patch) | |
tree | cc8990daff6a473a3c206f3e5127d8ef17b0558b /sys/i386/pci | |
parent | 3a366b4a761a126599d7ab78ef2c96e53286c7fe (diff) | |
download | FreeBSD-src-373a6e31c98580fa8ace2a9d298d7ff62371d45b.zip FreeBSD-src-373a6e31c98580fa8ace2a9d298d7ff62371d45b.tar.gz |
- Ignore BIOS IRQs (that is, IRQ settings left by the BIOS or a previous OS
in the PCI config registers) that are > 15 as $PIR can only route PCI
interrupts to ISA IRQs which are limited to the 0 to 15 range.
- Remove an extra word from a printf.
Reported by: othermark atkin901 at yahoo dot com
MFC after: 3 days
Diffstat (limited to 'sys/i386/pci')
-rw-r--r-- | sys/i386/pci/pci_pir.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index faeb0a7..caf5b6e 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -327,6 +327,15 @@ pci_pir_initial_irqs(struct PIR_entry *entry, struct PIR_intpin *intpin, if (irq == PCI_INVALID_IRQ || irq == pci_link->pl_irq) return; + /* Don't trust any BIOS IRQs greater than 15. */ + if (irq >= NUM_ISA_INTERRUPTS) { + printf( + "$PIR: Ignoring invalid BIOS IRQ %d from %d.%d.INT%c for link %#x\n", + irq, entry->pe_bus, entry->pe_device, pin + 'A', + pci_link->pl_id); + return; + } + /* * If we don't have an IRQ for this link yet, then we trust the * BIOS, even if it seems invalid from the $PIR entries. @@ -334,7 +343,7 @@ pci_pir_initial_irqs(struct PIR_entry *entry, struct PIR_intpin *intpin, if (pci_link->pl_irq == PCI_INVALID_IRQ) { if (!pci_pir_valid_irq(pci_link, irq)) printf( - "$PIR: Using invalid BIOS IRQ %d from %d.%d.INT%c is for link %#x\n", + "$PIR: Using invalid BIOS IRQ %d from %d.%d.INT%c for link %#x\n", irq, entry->pe_bus, entry->pe_device, pin + 'A', pci_link->pl_id); pci_link->pl_irq = irq; |