acrn-config: minor fix for generating CONFIG_PCI_BDF

Modify the pattern to grap the correct PCI BDF from board information
file.

Tracked-On: #4530
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu 2020-03-17 16:22:45 +08:00 committed by wenlingz
parent b42c283b20
commit 4e9e052bcb
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ def get_serial_type():
if ttys_type == "portio": if ttys_type == "portio":
ttys_value = line.split()[2].split(':')[1] ttys_value = line.split()[2].split(':')[1]
elif ttys_type == "mmio": elif ttys_type == "mmio":
ttys_value = line.split()[-1].split(':')[1] ttys_value = line.split()[-1].split('"')[1:-1][0]
break break
return (ttys_type, ttys_value) return (ttys_type, ttys_value)
@ -157,7 +157,7 @@ def generate_file(config):
print("CONFIG_SERIAL_PIO_BASE={}".format(serial_value), file=config) print("CONFIG_SERIAL_PIO_BASE={}".format(serial_value), file=config)
if serial_type == "mmio": if serial_type == "mmio":
print("CONFIG_SERIAL_PCI=y", file=config) print("CONFIG_SERIAL_PCI=y", file=config)
print("CONFIG_SERIAL_PCI_BDF={}".format(serial_value), file=config) print('CONFIG_SERIAL_PCI_BDF="{}"'.format(serial_value), file=config)
print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config) print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config) print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)

View File

@ -214,7 +214,7 @@
</BLOCK_DEVICE_INFO> </BLOCK_DEVICE_INFO>
<TTYS_INFO> <TTYS_INFO>
seri:/dev/ttyS0 type:mmio base:0x91420000 irq:4 seri:/dev/ttyS0 type:mmio base:0x91420000 irq:4 bdf:"00:18.0"
</TTYS_INFO> </TTYS_INFO>
<AVAILABLE_IRQ_INFO> <AVAILABLE_IRQ_INFO>