Support COM3 and COM4 serial ports.

Submitted by: Jan Poctavek <janci@binaryparadise.com>, otis
Reviewed by: grehan (bhyve), imp, 0mp (manpages)
Differential Revision: https://reviews.freebsd.org/D28207
This commit is contained in:
Peter Grehan 2021-01-20 03:30:22 +10:00
parent e6cc42f181
commit eed1cc6cdf
3 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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;

View File

@ -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]))