diff --git a/devicemodel/hw/pci/lpc.c b/devicemodel/hw/pci/lpc.c index bbd5afe86..3ef92117c 100644 --- a/devicemodel/hw/pci/lpc.c +++ b/devicemodel/hw/pci/lpc.c @@ -59,7 +59,7 @@ SYSRES_IO(NMISC_PORT, 1); static struct pci_vdev *lpc_bridge; -#define LPC_UART_NUM 2 +#define LPC_UART_NUM 4 static struct lpc_uart_vdev { struct uart_vdev *uart; const char *opts; @@ -68,7 +68,7 @@ static struct lpc_uart_vdev { int enabled; } lpc_uart_vdev[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" }; /* * LPC device configuration is in the following form: diff --git a/devicemodel/hw/uart_core.c b/devicemodel/hw/uart_core.c index 21679f135..e119beaa1 100644 --- a/devicemodel/hw/uart_core.c +++ b/devicemodel/hw/uart_core.c @@ -52,6 +52,10 @@ #define COM1_IRQ 4 #define COM2_BASE 0x2F8 #define COM2_IRQ 3 +#define COM3_BASE 0x3E8 +#define COM3_IRQ 6 +#define COM4_BASE 0x2E8 +#define COM4_IRQ 7 #define DEFAULT_RCLK 1843200 #define DEFAULT_BAUD 9600 @@ -83,6 +87,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 (ARRAY_SIZE(uart_lres))