1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

- 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
This commit is contained in:
John Baldwin 2005-07-13 15:41:16 +00:00
parent dfa9ef3d99
commit 11f3a4f069
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147968

View File

@ -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;