HV: vuart: refine vuart config

Add vuart config in acrn_vm_config struct, support configuring 2 vuarts for
each VM. The first vuart is used to work as VM's console. The second vuart
is used to connect to other VM's vuart. When the port base for a vuart
is set to 0, hypervisor will not create this vuart.

Tracked-On: #2987
Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Conghui Chen
2019-04-17 12:47:44 +08:00
committed by ACRN System Integration
parent 1234f4f7b1
commit 3c92d7bbc7
5 changed files with 87 additions and 4 deletions

View File

@@ -35,6 +35,17 @@
#define RX_BUF_SIZE 256U
#define TX_BUF_SIZE 8192U
#define COM1_BASE 0x3F8U
#define COM2_BASE 0x2F8U
#define COM3_BASE 0x3E8U
#define COM4_BASE 0x2E8U
#define INVALID_COM_BASE 0U
#define COM1_IRQ 4U
#define COM2_IRQ 3U
#define COM3_IRQ 6U
#define COM4_IRQ 7U
struct fifo {
char *buf;
uint32_t rindex; /* index to read from */