hv: debug: Convert PCI UART paramter from a BDF string to a hex value

BDF string can be parsed by the configuration tool. A 16bit WORD value with
format (B:8, D:5, F:3) can be passed from configuration to the
hypervisor directly to save some BDF string parse code.

Tracked-On: #4937
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shuo A Liu
2020-08-27 17:45:19 +08:00
committed by wenlingz
parent 9af694dfbc
commit d6b9682581
3 changed files with 19 additions and 50 deletions

View File

@@ -134,11 +134,12 @@ config SERIAL_MMIO
endchoice
config SERIAL_PCI_BDF
string "BDF of serial PCI device"
hex "BDF of serial PCI device"
depends on SERIAL_PCI
default "0:18.2"
default 0x00c2
help
BDF: bus, device and function of the serial PCI device; for an example,
BDF: bus, device and function of the serial PCI device. The BDF is packed
into a 16bit WORD with format (B:8, D:5, F:3). For an example,
PCI device ttyS2: 0:18.2.
config SERIAL_PIO_BASE