mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
HV: fix bug adapt uart mmio to bdf for HV cmdline
now PCI uart changed from MMIO configure to BDF configure, it need change this interface too; this interface is used to dynamically configure debug uart by HV command line. Tracked-On: #2031 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -214,7 +214,13 @@ void uart16550_set_property(bool enabled, bool port_mapped, uint64_t base_addr)
|
||||
{
|
||||
uart_enabled = enabled;
|
||||
serial_port_mapped = port_mapped;
|
||||
uart_base_address = base_addr;
|
||||
|
||||
if (port_mapped) {
|
||||
uart_base_address = base_addr;
|
||||
} else {
|
||||
const char *bdf = (const char *)base_addr;
|
||||
strncpy_s(pci_bdf_info, MAX_BDF_LEN, bdf, MAX_BDF_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
bool is_pci_dbg_uart(union pci_bdf bdf_value)
|
||||
|
||||
Reference in New Issue
Block a user