aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-04-16 19:46:30 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-04-16 19:46:30 +0000
commitf203f177f43ae492de3e9ecceabfc336b86bffc4 (patch)
tree082d45a3146644d0de47ab9f2183380edcbd7a8b /sys
parent79cdd799f623b272453b3c0128e6ec1571110696 (diff)
downloadsrc-f203f177f43ae492de3e9ecceabfc336b86bffc4.tar.gz
src-f203f177f43ae492de3e9ecceabfc336b86bffc4.zip
Revert part of the "BIOS brain damage" from rev 1.10. It seems that
different BIOSs use the same exact settings to mean two very different and incompatible things for the SCI. Thus, if the SCI is remapped to a PCI interrupt, we now trust the trigger/polarity that the MADT provides by default. However, the SCI can be forced to level/lo as 1.10 did by setting the tunable "hw.acpi.force_sci_lo" to a non-zero value from the loader. Thus, if rev 1.10 caused an interrupt storm, it should nwo fix your machine. If rev 1.10 fixed an interrupt storm on your machine, you probably need to set the aforementioned tunable in /boot/loader.conf to prevent the interrupt storm. The more general problem of getting the SCI's trigger/polarity programmed "correctly" (for some value of correctly meaning several workarounds for broken BIOSs and inconsistent "implementations" of the ACPI standard) is going to require more work, but this band-aid should improve the current situation somewhat. Requested by: njl
Notes
Notes: svn path=/head/; revision=128329
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/acpica/madt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/i386/acpica/madt.c b/sys/i386/acpica/madt.c
index 8116d2a63582..bde59508ceb2 100644
--- a/sys/i386/acpica/madt.c
+++ b/sys/i386/acpica/madt.c
@@ -69,6 +69,8 @@ struct lapic_info {
u_int la_apic_id:8;
} lapics[NLAPICS + 1];
+static int force_sci_lo;
+TUNABLE_INT("hw.acpi.force_sci_lo", &force_sci_lo);
static MULTIPLE_APIC_TABLE *madt;
static vm_paddr_t madt_physaddr;
static vm_offset_t madt_length;
@@ -545,14 +547,13 @@ madt_parse_interrupt_override(MADT_INTERRUPT_OVERRIDE *intr)
}
/*
- * If the SCI is remapped to a non-ISA global interrupt,
- * force it to level trigger and active-lo polarity.
* If the SCI is identity mapped but has edge trigger and
- * active-hi polarity, also force it to use level/lo.
+ * active-hi polarity or the force_sci_lo tunable is set,
+ * force it to use level/lo.
*/
force_lo = 0;
if (intr->Source == AcpiGbl_FADT->SciInt)
- if (intr->Interrupt > 15 || (intr->Interrupt == intr->Source &&
+ if (force_sci_lo || (intr->Interrupt == intr->Source &&
intr->TriggerMode == TRIGGER_EDGE &&
intr->Polarity == POLARITY_ACTIVE_HIGH))
force_lo = 1;