summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_resource.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-07-16 14:42:16 +0000
committerjhb <jhb@FreeBSD.org>2013-07-16 14:42:16 +0000
commita198a61e54adc5c0185bed0927496abd5fb9f158 (patch)
tree7d8aa71e6156683888f50d5de672edb181a87d64 /sys/dev/acpica/acpi_resource.c
parent06ff98bcf15108a6569c26262ea42cc18edbb0d3 (diff)
downloadFreeBSD-src-a198a61e54adc5c0185bed0927496abd5fb9f158.zip
FreeBSD-src-a198a61e54adc5c0185bed0927496abd5fb9f158.tar.gz
Workaround some broken BIOSes that specify edge-sensitive but active-low
settings for ACPI-enumerated serial ports by forcing any IRQs that use an ISA IRQ value with these settings to active-high instead of active-low. This is known to occur with the BIOS on an Intel D2500CCE motherboard. Tested by: Robert Ames <robertames@hotmail.com>, lev Submitted by: Juergen Weiss weiss at uni-mainz.de (original patch)
Diffstat (limited to 'sys/dev/acpica/acpi_resource.c')
-rw-r--r--sys/dev/acpica/acpi_resource.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index 0878d96..1d710dd 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -135,6 +135,17 @@ acpi_config_intr(device_t dev, ACPI_RESOURCE *res)
default:
panic("%s: bad resource type %u", __func__, res->Type);
}
+
+#if defined(__amd64__) || defined(__i386__)
+ /*
+ * XXX: Certain BIOSes have buggy AML that specify an IRQ that is
+ * edge-sensitive and active-lo. However, edge-sensitive IRQs
+ * should be active-hi. Force IRQs with an ISA IRQ value to be
+ * active-hi instead.
+ */
+ if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW)
+ pol = ACPI_ACTIVE_HIGH;
+#endif
BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ?
INTR_POLARITY_HIGH : INTR_POLARITY_LOW);
OpenPOWER on IntegriCloud