HV: move vCOM setting from Kconfig to board configs
The settings of SOS VM COM1 which is used for console is board specific, and this result in SOS VM COM2 which used for VM communication is also board specific, so move the configure method from Kconfig to board configs folder. The MACRO definition will be handled by acrn-config tool in future. Tracked-On: #3602 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
5dd07f7113
commit
c8cdc7e807
|
@ -146,20 +146,6 @@ config SERIAL_PIO_BASE
|
|||
The base address of the serial ports. This is logically 16-bit but used
|
||||
as a 64-bit integer.
|
||||
|
||||
config COM_BASE
|
||||
hex "Base address of the vuart port"
|
||||
default 0 if RELEASE
|
||||
default 0x3f8 if !RELEASE
|
||||
help
|
||||
Base address of the vuart port.
|
||||
|
||||
config COM_IRQ
|
||||
int "IRQ of the vuart port"
|
||||
default 0 if RELEASE
|
||||
default 4 if !RELEASE
|
||||
help
|
||||
IRQ of the vuart port.
|
||||
|
||||
config CONSOLE_LOGLEVEL_DEFAULT
|
||||
int "Default loglevel on the serial console"
|
||||
depends on !RELEASE
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
||||
CONFIG_BOARD="apl-mrb"
|
||||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_COM_BASE=0x3e8
|
||||
CONFIG_COM_IRQ=6
|
||||
CONFIG_HV_RAM_START=0x6e000000
|
||||
CONFIG_HV_RAM_SIZE=0x07800000
|
||||
CONFIG_PLATFORM_RAM_SIZE=0x200000000
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_1
|
||||
#define SOS_CONSOLE "console=ttyS2 "
|
||||
#define SOS_COM1_BASE 0x3E8U
|
||||
#define SOS_COM1_IRQ 6U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define BOOTARG_DEBUG "hvlog=2M@0x6de00000 " \
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
CONFIG_BOARD="apl-up2"
|
||||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_SERIAL_PCI_BDF="0:18.0"
|
||||
CONFIG_COM_IRQ=6
|
||||
CONFIG_HV_RAM_START=0x5e000000
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_1
|
||||
#define SOS_CONSOLE "console=ttyS0 "
|
||||
#define SOS_COM1_BASE 0x3F8U
|
||||
#define SOS_COM1_IRQ 4U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define BOOTARG_DEBUG "hvlog=2M@0x6de00000 " \
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
#define SOS_CONSOLE "console=ttyS0 "
|
||||
#define SOS_COM1_BASE 0x3F8U
|
||||
#define SOS_COM1_IRQ 4U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
#define SOS_CONSOLE "console=ttyS0 "
|
||||
#define SOS_COM1_BASE 0x3F8U
|
||||
#define SOS_COM1_IRQ 4U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000"
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
#define SOS_CONSOLE "console=ttyS0 "
|
||||
#define SOS_COM1_BASE 0x3F8U
|
||||
#define SOS_COM1_IRQ 4U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
#define SOS_CONSOLE "console=ttyS0 "
|
||||
#define SOS_COM1_BASE 0x3F8U
|
||||
#define SOS_COM1_IRQ 4U
|
||||
|
||||
#ifndef CONFIG_RELEASE
|
||||
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000"
|
||||
|
|
|
@ -161,8 +161,8 @@ void vuart_toggle_intr(const struct acrn_vuart *vu)
|
|||
vioapic_get_rte(vu->vm, vu->irq, &rte);
|
||||
|
||||
/* TODO:
|
||||
* Here should assert vuart irq according to CONFIG_COM_IRQ polarity.
|
||||
* The best way is to get the polarity info from ACIP table.
|
||||
* Here should assert vuart irq according to vCOM1_IRQ polarity.
|
||||
* The best way is to get the polarity info from ACPI table.
|
||||
* Here we just get the info from vioapic configuration.
|
||||
* based on this, we can still have irq storm during guest
|
||||
* modify the vioapic setting, as it's only for debug uart,
|
||||
|
|
|
@ -64,8 +64,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = CONFIG_COM_BASE,
|
||||
.irq = CONFIG_COM_IRQ,
|
||||
.addr.port_base = SOS_COM1_BASE,
|
||||
.irq = SOS_COM1_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
|
|
|
@ -29,8 +29,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = CONFIG_COM_BASE,
|
||||
.irq = CONFIG_COM_IRQ,
|
||||
.addr.port_base = SOS_COM1_BASE,
|
||||
.irq = SOS_COM1_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
|
|
|
@ -31,8 +31,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = CONFIG_COM_BASE,
|
||||
.irq = CONFIG_COM_IRQ,
|
||||
.addr.port_base = SOS_COM1_BASE,
|
||||
.irq = SOS_COM1_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
|
|
|
@ -31,8 +31,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = CONFIG_COM_BASE,
|
||||
.irq = CONFIG_COM_IRQ,
|
||||
.addr.port_base = SOS_COM1_BASE,
|
||||
.irq = SOS_COM1_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
|
|
Loading…
Reference in New Issue