mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 20:22:46 +00:00
acrn-config: add 'poweroff_channel' support for launch config
Add pm_channel support to parse and get 'poweroff_channel' item value from launch config files, these values are selectable by user. Tracked-On: #4212 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
7446d41f20
commit
212d030b9a
@ -501,15 +501,6 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
||||||
if uos_type in ("ANDROID", "ALIOS"):
|
if uos_type in ("ANDROID", "ALIOS"):
|
||||||
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
|
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
|
||||||
if board_name == "apl-up2":
|
|
||||||
print(" --pm_notify_channel power_button \\", file=config)
|
|
||||||
if board_name == "apl-mrb":
|
|
||||||
print(" --pm_notify_channel ioc \\", file=config)
|
|
||||||
|
|
||||||
if is_nuc_whl_clr(names, vmid):
|
|
||||||
print(" --pm_notify_channel uart \\", file=config)
|
|
||||||
print(' --pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\', file=config)
|
|
||||||
print(' -l com2,/run/acrn/life_mngr_$vm_name \\', file=config)
|
|
||||||
|
|
||||||
# mac_seed
|
# mac_seed
|
||||||
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
||||||
@ -521,7 +512,6 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
print(" --lapic_pt \\", file=config)
|
print(" --lapic_pt \\", file=config)
|
||||||
print(" --rtvm \\", file=config)
|
print(" --rtvm \\", file=config)
|
||||||
print(" --virtio_poll 1000000 \\", file=config)
|
print(" --virtio_poll 1000000 \\", file=config)
|
||||||
print(" --pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1 \\", file=config)
|
|
||||||
|
|
||||||
# vxworks
|
# vxworks
|
||||||
if uos_type == "VXWORKS":
|
if uos_type == "VXWORKS":
|
||||||
@ -538,7 +528,12 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
print("{} \\".format(dm_str), file=config)
|
print("{} \\".format(dm_str), file=config)
|
||||||
print(" --windows \\", file=config)
|
print(" --windows \\", file=config)
|
||||||
|
|
||||||
# WA: XHCI args set
|
# pm_channel set
|
||||||
|
if dm['pm_channel'][vmid] and dm['pm_channel'][vmid] != None:
|
||||||
|
pm_key = dm['pm_channel'][vmid]
|
||||||
|
print(" {} \\".format(launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config)
|
||||||
|
|
||||||
|
# XHCI args set
|
||||||
xhci_args_set(dm, vmid, config)
|
xhci_args_set(dm, vmid, config)
|
||||||
|
|
||||||
# VIRTIO args set
|
# VIRTIO args set
|
||||||
|
@ -46,6 +46,7 @@ def get_launch_item_values(board_info):
|
|||||||
|
|
||||||
launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
|
launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
|
||||||
launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0
|
launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0
|
||||||
|
launch_item_values['uos,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL
|
||||||
launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS
|
launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS
|
||||||
|
|
||||||
return launch_item_values
|
return launch_item_values
|
||||||
|
@ -20,6 +20,7 @@ class AcrnDmArgs:
|
|||||||
self.args["gvt_args"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "gvt_args")
|
self.args["gvt_args"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "gvt_args")
|
||||||
self.args["vbootloader"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vbootloader")
|
self.args["vbootloader"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vbootloader")
|
||||||
self.args["vuart0"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vuart0")
|
self.args["vuart0"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vuart0")
|
||||||
|
self.args["pm_channel"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "poweroff_channel")
|
||||||
self.args["off_pcpus"] = launch_cfg_lib.get_leaf_tag_map(self.scenario_info, "vcpu_affinity", "pcpu_id")
|
self.args["off_pcpus"] = launch_cfg_lib.get_leaf_tag_map(self.scenario_info, "vcpu_affinity", "pcpu_id")
|
||||||
self.args["xhci"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "usb_xhci")
|
self.args["xhci"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "usb_xhci")
|
||||||
|
|
||||||
|
@ -48,6 +48,14 @@ PT_SLOT = {
|
|||||||
|
|
||||||
|
|
||||||
POST_UUID_DIC = {}
|
POST_UUID_DIC = {}
|
||||||
|
PM_CHANNEL = ['', 'IOC', 'PowerButton', 'vuart1(pty)', 'vuart1(tty)']
|
||||||
|
PM_CHANNEL_DIC = {
|
||||||
|
None:'',
|
||||||
|
'IOC':'--pm_notify_channel ioc',
|
||||||
|
'PowerButton':'--pm_notify_channel power_button',
|
||||||
|
'vuart1(pty)':'--pm_notify_channel uart \\\n\t--pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\\n\t-l com2,/run/acrn/life_mngr_$vm_name',
|
||||||
|
'vuart1(tty)':'--pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def prepare(check_git):
|
def prepare(check_git):
|
||||||
|
Loading…
Reference in New Issue
Block a user