git: acpi: Narrow workaround for broken interrupt settings

Michael Neumann mneumann at crater.dragonflybsd.org
Wed Jul 24 16:05:38 PDT 2024


commit 8506772f4f44fcae9c78e61800e54be0399905f8
Author: Michael Neumann <mneumann at ntecs.de>
Date:   Thu Jul 25 00:11:34 2024 +0200

    acpi: Narrow workaround for broken interrupt settings
    
    Commit ad52dd3206 ("Sync acpi_resource with FreeBSD") introduced a
    workaround for some broken BIOSes that specified active-lo instead of
    active-hi polarity for ISA IRQs for UARTs.  The workaround assumed that
    edge-sensitive ISA IRQs on x86 should always be active-hi.  However,
    some recent AMD systems actually use active-lo edge-sensitive ISA IRQs
    (and not just for UARTs, but also for the keyboard and PS/2 mouse
    devices) and the override causes interrupts to be dropped resulting in
    boot time hangs, non-working keyboards, etc.
    
    Add a hw.acpi.override_isa_irq_polarity tunable (readable as a sysctl
    post-boot) to control this quirk.  It can be set to 1 to force enable
    the override and 0 to disable it.  The log of FreeBSD-PR (see below)
    mentions an Intel motherboard as the sample case, so default the
    tunable to 1 on systems with an Intel CPU and 0 otherwise.
    
    Special thanks to Matthias Lanter <freebsd at lanter-it.ch> for tracking
    down boot time issues on recent AMD systems to mismatched interrupt
    polarity.
    
    Taken-from: FreeBSD [1]
    
    FreeBSD-PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270707
    
    [1]: https://github.com/freebsd/freebsd-src/commit/0a34d050ae8ea14feddd3d2a62fd2f612613b2c5

Summary of changes:
 share/man/man4/acpi.4          |  8 +++++++-
 sys/dev/acpica/acpi.c          | 21 +++++++++++++++++++++
 sys/dev/acpica/acpi_resource.c | 11 ++++-------
 sys/dev/acpica/acpivar.h       | 12 ++++++++++++
 4 files changed, 44 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8506772f4f44fcae9c78e61800e54be0399905f8


-- 
DragonFly BSD source repository


More information about the Commits mailing list