Skip to content

Commit c980b36

Browse files
Wei Liuwenlingz
authored andcommitted
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>
1 parent 6f8a7ba commit c980b36

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

misc/acrn-config/board_config/new_board_kconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def get_serial_type():
9999
if ttys_type == "portio":
100100
ttys_value = line.split()[2].split(':')[1]
101101
elif ttys_type == "mmio":
102-
ttys_value = line.split()[-1].split(':')[1]
102+
ttys_value = line.split()[-1].split('"')[1:-1][0]
103103
break
104104

105105
return (ttys_type, ttys_value)
@@ -157,7 +157,7 @@ def generate_file(config):
157157
print("CONFIG_SERIAL_PIO_BASE={}".format(serial_value), file=config)
158158
if serial_type == "mmio":
159159
print("CONFIG_SERIAL_PCI=y", file=config)
160-
print("CONFIG_SERIAL_PCI_BDF={}".format(serial_value), file=config)
160+
print('CONFIG_SERIAL_PCI_BDF="{}"'.format(serial_value), file=config)
161161

162162
print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
163163
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)

misc/acrn-config/xmls/board-xmls/nuc6cayh.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
</BLOCK_DEVICE_INFO>
215215

216216
<TTYS_INFO>
217-
seri:/dev/ttyS0 type:mmio base:0x91420000 irq:4
217+
seri:/dev/ttyS0 type:mmio base:0x91420000 irq:4 bdf:"00:18.0"
218218
</TTYS_INFO>
219219

220220
<AVAILABLE_IRQ_INFO>

0 commit comments

Comments
 (0)