diff --git a/misc/acrn-config/hv_config/board_defconfig.py b/misc/acrn-config/hv_config/board_defconfig.py
index 3d51ce4bd..4cb498ecd 100644
--- a/misc/acrn-config/hv_config/board_defconfig.py
+++ b/misc/acrn-config/hv_config/board_defconfig.py
@@ -37,6 +37,7 @@ def get_serial_type():
""" Get serial console type specified by user """
ttys_type = ''
ttys_value = ''
+ pci_mmio = False
# Get ttySx information from board config file
ttys_lines = board_cfg_lib.get_info(common.BOARD_INFO_FILE, "", "")
@@ -58,11 +59,12 @@ def get_serial_type():
elif ttys_type == "mmio":
if 'bdf' in line:
ttys_value = line.split()[-1].split('"')[1:-1][0]
+ pci_mmio = True
else:
- common.print_yel("You have chosen a MMIO PCI serial that BDF does not existed for HV console.", warn=True)
+ ttys_value = line.split()[2].split(':')[1]
break
- return (ttys_type, ttys_value)
+ return (ttys_type, ttys_value, pci_mmio)
def get_memory(hv_info, config):
@@ -111,14 +113,18 @@ def get_memory(hv_info, config):
def get_serial_console(config):
- (serial_type, serial_value) = get_serial_type()
+ (serial_type, serial_value, pci_mmio) = get_serial_type()
if serial_type == "portio":
print("CONFIG_SERIAL_LEGACY=y", file=config)
print("CONFIG_SERIAL_PIO_BASE={}".format(serial_value), file=config)
- if serial_type == "mmio":
+ elif serial_type == "mmio" and pci_mmio:
print("CONFIG_SERIAL_PCI=y", file=config)
if serial_value:
print('CONFIG_SERIAL_PCI_BDF="{}"'.format(serial_value), file=config)
+ else:
+ print("CONFIG_SERIAL_MMIO=y", file=config)
+ if serial_value:
+ print('CONFIG_SERIAL_MMIO_BASE={}'.format(serial_value), file=config)
def get_miscfg(hv_info, config):
diff --git a/misc/vm_configs/xmls/board-xmls/ehl-crb-b.xml b/misc/vm_configs/xmls/board-xmls/ehl-crb-b.xml
index cb7741419..40563c1d3 100644
--- a/misc/vm_configs/xmls/board-xmls/ehl-crb-b.xml
+++ b/misc/vm_configs/xmls/board-xmls/ehl-crb-b.xml
@@ -397,10 +397,11 @@
seri:/dev/ttyS0 type:mmio base:0x83449000 irq:33 bdf:"00:19.2"
seri:/dev/ttyS1 type:mmio base:0x8344A000 irq:16 bdf:"00:1e.0"
seri:/dev/ttyS2 type:mmio base:0x8344B000 irq:17 bdf:"00:1e.1"
+ seri:/dev/ttyS3 type:mmio base:0xfe042000 irq:3
- 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15
+ 4, 5, 6, 7, 10, 11, 12, 13, 14, 15
diff --git a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/industry.xml b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/industry.xml
index 0aa6372bc..ba17674f5 100644
--- a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/industry.xml
+++ b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/industry.xml
@@ -3,7 +3,7 @@
n
- /dev/ttyS0
+ /dev/ttyS3
5
5
3