opnsense-src/sys/dev/uart
Marcin Wojtas fab2a758cc Fix AccessWidth and BitWidth parsing in SPCR table
The ACPI Specification defines a Generic Address Structure (GAS),
which is used to describe UART controller register layout in the
SPCR table. The driver responsible for parsing it (uart_cpu_acpi)
wrongly associates the Access Size field to the uart_bas's regshft
and the register BitWidth to the regiowidth - according to
the definitions it should be opposite.

This problem remained hidden most likely because the majority of platforms
use 32-bit registers (BitWidth) which are accessed with the according
size (Dword). However on Marvell Armada 8k / Cn913x platforms,
the 32-bit registers should be accessed with Byte granulity, which
unveiled the issue.

This patch fixes above by proper values assignment and slightly improved
parsing.

Note that handling of the AccessWidth set to EFI_ACPI_6_0_UNDEFINED is
needed to work around a buggy SPCR table on EC2 x86 "bare metal" instances.

Reviewed by: manu, imp, cperciva, greg_unrelenting.technology
Obtained from: Semihalf
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25373
2020-06-24 12:15:27 +00:00
..
uart.h Add busy detect quirk to list of console options 2018-07-22 23:32:21 +00:00
uart_bus.h Export a sysctl count of RX FIFO overrun events. 2020-04-13 20:59:09 +00:00
uart_bus_acpi.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_fdt.c add snps IP uart support / genaralize UART 2018-08-19 21:10:21 +00:00
uart_bus_isa.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_pccard.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_pci.c Add Denverton UART PCI ID 2020-02-28 15:59:35 +00:00
uart_bus_puc.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_scc.c add snps IP uart support / genaralize UART 2018-08-19 21:10:21 +00:00
uart_core.c Export a sysctl count of RX FIFO overrun events. 2020-04-13 20:59:09 +00:00
uart_cpu.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_cpu_acpi.c Fix AccessWidth and BitWidth parsing in SPCR table 2020-06-24 12:15:27 +00:00
uart_cpu_acpi.h Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_cpu_arm64.c Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_cpu_fdt.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_cpu_fdt.h Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
uart_cpu_powerpc.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_cpu_x86.c Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_dbg.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_imx.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_imx.h Remove a duplicate definition. 2015-12-05 15:09:19 +00:00
uart_dev_lowrisc.c Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_lowrisc.h Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_msm.c Support for UART device found in Qualcomm Snapdragon 410E SoC. 2018-01-18 17:43:32 +00:00
uart_dev_msm.h UART Clock Selection Register holds a divider value for a supplied clock, 2018-01-18 18:19:31 +00:00
uart_dev_mu.c Add a driver for the BCM2835 Mini-UART as seen on the RPi3 2018-06-12 13:26:31 +00:00
uart_dev_mvebu.c Disable EARLY_PRINTF from the Armada 3700 uart, it breaks when we want 2018-02-01 15:05:17 +00:00
uart_dev_ns8250.c Correct baud rate error calculation. 2020-04-13 20:43:57 +00:00
uart_dev_ns8250.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_pl011.c Add quirk for ignoring SPCR AccessWidth values on the PL011 UART 2019-04-15 13:41:53 +00:00
uart_dev_quicc.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_sab82532.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_snps.c Remove "all rights reserved" from copyright for the file that Jared McNeill 2019-12-03 21:05:33 +00:00
uart_dev_ti8250.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_z8530.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_if.m
uart_ppstypes.h Restore uart PPS signal capture polarity to its historical norm, and add an 2016-01-12 18:42:00 +00:00
uart_subr.c Add busy detect quirk to list of console options 2018-07-22 23:32:21 +00:00
uart_tty.c Some devices take undesired actions when RTS and DTR are 2019-06-12 18:07:04 +00:00