HardenedBSD/sys/dev
John Baldwin 0a34d050ae acpi: Narrow workaround for broken interrupt settings on x86
Commit 9a7bf07ccd from 2016 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 original message
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@lanter-it.ch> for tracking
down boot time issues on recent AMD systems to mismatched interrupt
polarity.

PR:		270707
Reported by:	aixdroix_OSS@protonmail.com, Michael Dexter
Reported by:	mfw_burn@pm.me, Hannes Hfauswedell <h2+fbsdports@fsfe.org>
Reported by:	Matthias Lanter <freebsd@lanter-it.ch>
Reported by:	William Bulley <web@umich.edu>
Reviewed by:	imp, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45554
2024-07-15 12:13:51 -07:00
..
aac
aacraid
acpi_support
acpica
adb
adlink
ae
age
agp
ahci
aic7xxx
al_eth
alc
ale
alpm
altera
amd_ecc_inject
amdgpio
amdpm
amdsbwd
amdsmb
amdsmn
amdtemp
arcmsr
asmc
ata
ath
atkbdc
atopcase
axgbe
backlight
bce
beri
bfe
bge
bhnd
bnxt
bwi
bwn
bxe
cadence
cardbus
cas
cesa
cfe
cfi
chromebook_platform
ciss
clk
coretemp
cpuctl
cpufreq
cxgb
cxgbe
cyapa
dc
dcons
dialog/da9063
dpaa
dpaa2
dpms
drm2
dwc
dwwdt
e1000
efidev
ena
enetc
enic
eqos
et
etherswitch
evdev
exca
fb
fdc
fdt
ffec
filemon
firewire
firmware
flash
ftgpio
ftwd
fxp
gem
glxiic
glxsb
goldfish
gpio
gve
hdmi
hid
hifn
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc
hwreset
hyperv
iavf
ic
ice
ichiic
ichsmb
ichwd
ida
igc
iicbus
imcsmb
intel
intpm
io
ioat
iommu
ipmi
ips
ipw
irdma
isci
iscsi
iser
isl
ismt
isp
ispfw
itwd
iwi
iwm
iwn
ixgbe
ixl
jedec_dimm
jme
kbd
kbdmux
ksyms
kvm_clock
le
led
lge
liquidio
mailbox/arm
malo
mana
mbox
md
mdio
mem
mfi
mgb
mge
mii
mlx
mlx4
mlx5
mlxfw
mmc
mmcnull
mpi3mr
mpr
mps
mpt
mrsas
msk
mthca
mvs
mwl
mxge
my
nctgpio
ncthwm
neta
netmap
nfe
nfsmb
nge
nmdm
ntb
null
nvd
nvdimm
nvme
nvmem
nvmf
nvram
oce
ocs_fc
ofw
otus
ow
p2sb
pbio
pccard
pccbb
pcf
pci
phy
pms
powermac_nvram
ppbus
ppc
proto
psci
pst
pty
puc
pwm
qat
qat_c2xxx
qcom_clk
qcom_dwc3
qcom_gcc
qcom_mdio
qcom_qup
qcom_rnd
qcom_tcsr
qcom_tlmm
qlnx
qlxgb
qlxgbe
qlxge
quicc
ral
random
rccgpio
re
regulator
rl
rndtest
rtsx
rtwn
safe
safexcel
sbni
scc
sdhci
sdio
sec
sff
sfxge
sge
siis
sis
sk
smartpqi
smbios
smbus
smc
snp
sound
speaker
spibus
sram
ste
stge
sume
superio
sym
syscon
syscons
tcp_log
tdfx
ti
tpm
tsec
tws
uart
usb
veriexec
vge
viapm
viawd
video
videomode
virtio
vkbd
vmd
vmgenc
vmware
vnic
vr
vt
vte
watchdog
wbwd
wdatwd
wg
wpi
wtap
xdma
xen
xilinx
xl
xz
zlib