From nobody Mon Mar 07 11:19:59 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7C1D61A06EDE; Mon, 7 Mar 2022 11:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KBwwc0gNgz4WbW; Mon, 7 Mar 2022 11:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646652000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npYNQnqfg+I4vpxz41tpzAis8sn3yN7DVnUqR6meyVQ=; b=p2RV5hPtoBDwgv9MAAxw+hxEgKYZYns1F2TihP9I0FrcFpxCJWwLISZ5yBUsRcBrb9duCB WPOoC6+rDmd00GLiG4sr1QufQZ/moY47/I7o2DK8tx8OB1SzsAPDHqnvJh52GQvTKWoJE6 9o/GlWqA2s74h9S9lBJ0/MngRAl1Jm/MY0CvxIUOlfBAUiluj90sgTBEiBvJxGxVwHiU4A inBzAjrJXBT34mCgzaBXEJM29CmhO1cTXf8eYafRGLv+V59tVv2KvSlEKePgyC3+Iciem9 9lxVmV69jWoJNhawmV2E7PfaePcEnKYcM+Tov3e7KPsUDW6LZx8XZWODu5lvLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9AEA273F6; Mon, 7 Mar 2022 11:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227BJxoX084575; Mon, 7 Mar 2022 11:19:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227BJx2x084574; Mon, 7 Mar 2022 11:19:59 GMT (envelope-from git) Date: Mon, 7 Mar 2022 11:19:59 GMT Message-Id: <202203071119.227BJx2x084574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marcin Wojtas Subject: git: 63f3afe497ff - stable/13 - uart_dev_ns8250: Switch ACPI UART subtype for Marvell SoCs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 63f3afe497ffa17cae3fa7a1c21aad076ff292e1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646652000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npYNQnqfg+I4vpxz41tpzAis8sn3yN7DVnUqR6meyVQ=; b=cWC7puxPTrOIYmn0w3zATYeE+fgiLsKs5TTNzT12RD/E5VZnMg4KU1etcChevLMicVBS8C PsemGzz840y6O2/AcrErNiKAzpXy8kc6GD21ugjn574HEYTcy+yK2c2Q+yibNfbACniJYG GikAav2n6P7hT7zskcZujbeKdV5+E94VSLdRagtmEIAeTDATYh7Bvz6jp/TTpqv0zgeR4B L51zs3U98wvUppto142yV6eA4k3JBn+vDjBYeaj300qwuPKFh+FPpRTloRl7tR1O/e0W3n aUAsdwlkM3TNPNcTGC0lRsm0IEeKap9QM+Q9px3ufnA5vxl6TzkgFkJbqdPDYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646652000; a=rsa-sha256; cv=none; b=NS+hYHMJrWZHZkHwX99tj1RjqzkqEKhLrgc+JPR9Q6EJviWLw2jByMhF0kYTqGnZt6wnOA miFu488VLeJYeb7NLmeiwiIsiW0G7HBEBqxEKJwHLqhiy33LovUn3h8m+NXisw21Zj7qPM ouJdF1AyPcwBzdiBdqLoW3303mwZKeM2igTwFMufu+WuoCLaaLkigZWHYk+HytIOxDTMuC 6Cu4RwaGxjHXsfsdZSiHNP9ZEQ1etrnGFh4yx7FHF4ZjMxsDQHOYwrXfWmippxbdY6eDXE /SUWS124nmVW28hzR5JuwNdZbS5m7+hMIPRS+Wveq9fg9SSxopDmdLkKlkonZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=63f3afe497ffa17cae3fa7a1c21aad076ff292e1 commit 63f3afe497ffa17cae3fa7a1c21aad076ff292e1 Author: Marcin Wojtas AuthorDate: 2021-05-20 21:37:02 +0000 Commit: Marcin Wojtas CommitDate: 2022-03-07 11:19:29 +0000 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 (cherry picked from commit 9cf66a0458f4913d34cb3c5f6b653c78f70de8a8) --- sys/dev/uart/uart_dev_ns8250.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 2b2f75cf5336..3950941d92b9 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef DEV_ACPI #include +#include #endif #include @@ -415,7 +416,7 @@ struct uart_class uart_ns8250_class = { static struct acpi_uart_compat_data acpi_compat_data[] = { {"AMD0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, {"AMDI0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, - {"MRVL0001", &uart_ns8250_class, 0, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, + {"MRVL0001", &uart_ns8250_class, ACPI_DBG2_16550_SUBSET, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, {"SCX0006", &uart_ns8250_class, 0, 2, 0, 62500000, UART_F_BUSY_DETECT, "SynQuacer / Synopsys Designware UART"}, {"HISI0031", &uart_ns8250_class, 0, 2, 0, 200000000, UART_F_BUSY_DETECT, "HiSilicon / Synopsys Designware UART"}, {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, 0, "Standard PC COM port"},