[Midnightbsd-cvs] src [7300] trunk/sys/dev/acpica/acpi_resource.c: Some BIOSes specify an IRQ that is edge sensitive and active lo.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 5 07:44:41 EDT 2015


Revision: 7300
          http://svnweb.midnightbsd.org/src/?rev=7300
Author:   laffer1
Date:     2015-09-05 07:44:41 -0400 (Sat, 05 Sep 2015)
Log Message:
-----------
Some BIOSes specify an IRQ that is edge sensitive and active lo. Work around this problem. Obtained from: FreeBSD

Modified Paths:
--------------
    trunk/sys/dev/acpica/acpi_resource.c

Modified: trunk/sys/dev/acpica/acpi_resource.c
===================================================================
--- trunk/sys/dev/acpica/acpi_resource.c	2015-09-05 11:34:07 UTC (rev 7299)
+++ trunk/sys/dev/acpica/acpi_resource.c	2015-09-05 11:44:41 UTC (rev 7300)
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: release/9.2.0/sys/dev/acpica/acpi_resource.c 223383 2011-06-21 21:30:20Z jhb $");
+__FBSDID("$FreeBSD: stable/9/sys/dev/acpica/acpi_resource.c 267835 2014-06-24 19:58:18Z jhb $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -136,6 +136,17 @@
     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);



More information about the Midnightbsd-cvs mailing list