acrn-config: unify get_vuart_info_id api in config tool

1. unify get_vuart_info_id/get_vuart_id api in board/scenario/launch
config tool.
2. if vm use 'vuart1(tty)' method to power off, make sure this vm have
select the vuart1 'SOS_COM2_BASE'.

Tracked-On: #3854
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
2019-12-09 14:33:49 +08:00
committed by wenlingz
parent 212d030b9a
commit deb5ed1f76
6 changed files with 70 additions and 95 deletions

View File

@@ -531,6 +531,12 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
# pm_channel set
if dm['pm_channel'][vmid] and dm['pm_channel'][vmid] != None:
pm_key = dm['pm_channel'][vmid]
if pm_key == "vuart1(tty)":
vuart_base = launch_cfg_lib.get_vuart1_from_scenario(sos_vmid + vmid)
if vuart_base == "INVALID_COM_BASE":
err_key = "uos:id={}:poweroff_channel".format(vmid)
launch_cfg_lib.ERR_LIST[err_key] = "vuart1 of VM{} in scenario file should select 'SOS_COM2_BASE'".format(sos_vmid + vmid)
return
print(" {} \\".format(launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config)
# XHCI args set