]> xenbits.xensource.com Git - people/royger/freebsd.git/commit
uart_dev_ns8250: Switch ACPI UART subtype for Marvell SoCs
authorMarcin Wojtas <mw@FreeBSD.org>
Thu, 20 May 2021 21:37:02 +0000 (23:37 +0200)
committerMarcin Wojtas <mw@FreeBSD.org>
Wed, 2 Jun 2021 07:55:19 +0000 (09:55 +0200)
commit9cf66a0458f4913d34cb3c5f6b653c78f70de8a8
tree9d259023fcffe19b68e7a037b45a4571e365ebe7
parent847b7d505490ae407a5c876e14e7788a4add7737
uart_dev_ns8250: Switch ACPI UART subtype for Marvell SoCs

DBG2 ACPI table description [1] specifies three subtypes
related to 16550 UART:
0x0 - 16550 compatible
0x1 - 16550 subset
0x12 - 16550 compatible with parameters defined in Generic Address Structure (GAS)

It turned out however, that the Windows OS treats 0x0 subtype as
legacy x86 UART with 8-bit access. ARM SoCs can use types 0x1 (16550 with
fixed mmio32 access) or 0x12 (16550 with fully respected GAS contents).

Switch Marvell SoCs ACPI UART subtype to 0x1 - thanks to that the same firmware
can run properly with UART output in FreeBSD, Windows 10, Linux and ESXI
hypervisor. Tests showed the older firmware versions that use 0x0
UART subtype in SPCR table continue to display output properly.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table

Obtained from: Semihalf
Sponsored by: ARM
Differential revision: https://reviews.freebsd.org/D30386
MFC after: 2 weeks
sys/dev/uart/uart_dev_ns8250.c