From owner-dev-commits-src-all@freebsd.org Tue Jan 19 08:23:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D8554EB766; Tue, 19 Jan 2021 08:23:14 +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 4DKhVp3Z2wz4pQq; Tue, 19 Jan 2021 08:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6D2DC23617; Tue, 19 Jan 2021 08:23:14 +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 10J8NE8P045382; Tue, 19 Jan 2021 08:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10J8NE2a045381; Tue, 19 Jan 2021 08:23:14 GMT (envelope-from git) Date: Tue, 19 Jan 2021 08:23:14 GMT Message-Id: <202101190823.10J8NE2a045381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: eed1cc6cdfa7 - main - Support COM3 and COM4 serial ports. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eed1cc6cdfa743e52ac3ea0b788e95b069a5f2f3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 08:23:14 -0000 The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=eed1cc6cdfa743e52ac3ea0b788e95b069a5f2f3 commit eed1cc6cdfa743e52ac3ea0b788e95b069a5f2f3 Author: Peter Grehan AuthorDate: 2021-01-19 17:30:22 +0000 Commit: Peter Grehan CommitDate: 2021-01-19 17:30:22 +0000 Support COM3 and COM4 serial ports. Submitted by: Jan Poctavek , otis Reviewed by: grehan (bhyve), imp, 0mp (manpages) Differential Revision: https://reviews.freebsd.org/D28207 --- usr.sbin/bhyve/bhyve.8 | 6 +++--- usr.sbin/bhyve/pci_lpc.c | 4 ++-- usr.sbin/bhyve/uart_emul.c | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index a3ea7be0b579..5d8f37813e7f 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2020 +.Dd January 18, 2021 .Dt BHYVE 8 .Os .Sh NAME @@ -153,8 +153,8 @@ If this option is not specified, virtual CPUs will use 100% of a host CPU. Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices .Ar com1 -and -.Ar com2 , +through +.Ar com4 , the boot ROM device .Ar bootrom , and the debug/test device diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index 3f7df55b5ffd..aa5997848f24 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -70,7 +70,7 @@ static struct pci_devinst *lpc_bridge; static const char *romfile; -#define LPC_UART_NUM 2 +#define LPC_UART_NUM 4 static struct lpc_uart_softc { struct uart_softc *uart_softc; const char *opts; @@ -79,7 +79,7 @@ static struct lpc_uart_softc { int enabled; } lpc_uart_softc[LPC_UART_NUM]; -static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2" }; +static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2", "COM3", "COM4" }; static bool pctestdev_present; diff --git a/usr.sbin/bhyve/uart_emul.c b/usr.sbin/bhyve/uart_emul.c index a89974590a1f..1b55231b2bf5 100644 --- a/usr.sbin/bhyve/uart_emul.c +++ b/usr.sbin/bhyve/uart_emul.c @@ -62,6 +62,10 @@ __FBSDID("$FreeBSD$"); #define COM1_IRQ 4 #define COM2_BASE 0x2F8 #define COM2_IRQ 3 +#define COM3_BASE 0x3E8 +#define COM3_IRQ 4 +#define COM4_BASE 0x2E8 +#define COM4_IRQ 3 #define DEFAULT_RCLK 1843200 #define DEFAULT_BAUD 9600 @@ -89,6 +93,8 @@ static struct { } uart_lres[] = { { COM1_BASE, COM1_IRQ, false}, { COM2_BASE, COM2_IRQ, false}, + { COM3_BASE, COM3_IRQ, false}, + { COM4_BASE, COM4_IRQ, false}, }; #define UART_NLDEVS (sizeof(uart_lres) / sizeof(uart_lres[0]))