summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-11-05 23:15:52 +0000
committerjhb <jhb@FreeBSD.org>2003-11-05 23:15:52 +0000
commit42eeb428c1944d6e0b27ec8a44b0cb09d0862853 (patch)
tree2b9c8dcae5172dc5af27853f727af741e1d4b60b /sys/i386/acpica
parentcdd8fcfaa1eb0a646370a3a5133e5aa8d48150f5 (diff)
downloadFreeBSD-src-42eeb428c1944d6e0b27ec8a44b0cb09d0862853.zip
FreeBSD-src-42eeb428c1944d6e0b27ec8a44b0cb09d0862853.tar.gz
When remapping an ISA interrupt from one intpin to another, disable the
pin that is used by the default identity mapping if it still maps to the old vector. The ACPI case might need some tweaking for the SCI interrupt case since ACPI likes to address the intpin using both the IRQ remapped to it as well as the previous existing PCI IRQ mapped to it. Reported by: kan
Diffstat (limited to 'sys/i386/acpica')
-rw-r--r--sys/i386/acpica/madt.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/i386/acpica/madt.c b/sys/i386/acpica/madt.c
index 0c5d615..6fcf92e 100644
--- a/sys/i386/acpica/madt.c
+++ b/sys/i386/acpica/madt.c
@@ -521,25 +521,33 @@ madt_find_interrupt(int intr, void **apic, u_int *pin)
static void
madt_parse_interrupt_override(INTERRUPT_SOURCE_OVERRIDE *intr)
{
- void *ioapic;
- u_int pin;
+ void *new_ioapic, *old_ioapic;
+ u_int new_pin, old_pin;
if (bootverbose)
printf("MADT: intr override: source %u, irq %u\n",
intr->Source, intr->GlobalSystemInterrupt);
KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero"));
- if (madt_find_interrupt(intr->GlobalSystemInterrupt,
- &ioapic, &pin) != 0) {
+ if (madt_find_interrupt(intr->GlobalSystemInterrupt, &new_ioapic,
+ &new_pin) != 0) {
printf("MADT: Could not find APIC for vector %d (IRQ %d)\n",
intr->GlobalSystemInterrupt, intr->Source);
return;
}
- if (intr->Source != intr->GlobalSystemInterrupt)
- ioapic_remap_vector(ioapic, pin, intr->Source);
- ioapic_set_triggermode(ioapic, pin,
+ if (intr->Source != intr->GlobalSystemInterrupt) {
+ ioapic_remap_vector(new_ioapic, new_pin, intr->Source);
+ if (madt_find_interrupt(intr->Source, &old_ioapic,
+ &old_pin) != 0)
+ printf("MADT: Could not find APIC for source IRQ %d\n",
+ intr->Source);
+ else
+ ioapic_disable_pin(old_ioapic, old_pin);
+ }
+ ioapic_set_triggermode(new_ioapic, new_pin,
interrupt_trigger(intr->TriggerMode));
- ioapic_set_polarity(ioapic, pin, interrupt_polarity(intr->Polarity));
+ ioapic_set_polarity(new_ioapic, new_pin,
+ interrupt_polarity(intr->Polarity));
}
/*
OpenPOWER on IntegriCloud