diff options
author | tegge <tegge@FreeBSD.org> | 1999-12-15 01:14:56 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1999-12-15 01:14:56 +0000 |
commit | ab33bd489f775de283b062f10a6d0710f0eb4e54 (patch) | |
tree | 9131eb9af6c6d933a3c542224ad00afbcac2c713 /sys/i386 | |
parent | 0340751edea8e97eb50e57ce0d0509cbedf29e6e (diff) | |
download | FreeBSD-src-ab33bd489f775de283b062f10a6d0710f0eb4e54.zip FreeBSD-src-ab33bd489f775de283b062f10a6d0710f0eb4e54.tar.gz |
apic_irq() returns -1 when there is no match for (IOAPIC, intpin) pair.
Adjust some comments to better match the code.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/mpapic.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index ee0a6b3..a008eb5 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -173,7 +173,7 @@ io_apic_setup(int apic) continue; irq = apic_irq(apic, pin); - if (irq == 0xff) + if (irq < 0) continue; /* determine the bus type for this pin */ @@ -182,17 +182,22 @@ io_apic_setup(int apic) continue; bustype = apic_bus_type(bus); - /* the "ISA" type INTerrupts */ if ((bustype == ISA) && (pin < IOAPIC_ISA_INTS) && (irq == pin) && (apic_polarity(apic, pin) == 0x1) && (apic_trigger(apic, pin) == 0x3)) { + /* + * A broken BIOS might describe some ISA + * interrupts as active-high level-triggered. + * Use default ISA flags for those interrupts. + */ flags = DEFAULT_ISA_FLAGS; - } - - /* PCI or other bus */ - else { + } else { + /* + * Program polarity and trigger mode according to + * interrupt entry. + */ flags = DEFAULT_FLAGS; level = trigger(apic, pin, &flags); if (level == 1) |