def validate_launch_setting(board_info, scenario_info, launch_info): """ This is validate the data setting from scenario xml :param board_info: it is a file what contains board information for script to read from :param scenario_info: it is a file what user have already setting to :return: return a dictionary contain errors """ common.SCENARIO_INFO_FILE = scenario_info common.get_vm_types() launch_cfg_lib.ERR_LIST = {} common.BOARD_INFO_FILE = board_info common.SCENARIO_INFO_FILE = scenario_info common.LAUNCH_INFO_FILE = launch_info # init available pt devices and get selected pt devices pt_avl = AvailablePthru(board_info) pt_sel = PthruSelected(launch_info, pt_avl.bdf_desc_map, pt_avl.bdf_vpid_map) pt_sel.get_bdf() pt_sel.get_vpid() pt_sel.get_slot() pt_sel.check_item() # virt-io devices virtio = VirtioDeviceSelect(launch_info) virtio.get_virtio() virtio.check_virtio() # acrn dm arguments dm = AcrnDmArgs(board_info, scenario_info, launch_info) dm.get_args() dm.check_item() return (launch_cfg_lib.ERR_LIST, pt_sel, virtio, dm)
def validate_launch_setting(board_info, scenario_info, launch_info): """ This is validate the data setting from scenario xml :param board_info: it is a file what contains board information for script to read from :param scenario_info: it is a file what user have already setting to :return: return a dictionary contain errors """ launch_cfg_lib.ERR_LIST = {} launch_cfg_lib.BOARD_INFO_FILE = board_info launch_cfg_lib.SCENARIO_INFO_FILE = scenario_info launch_cfg_lib.LAUNCH_INFO_FILE = launch_info # init available pt devices and get selected pt devices pt_avl = AvailablePthru(board_info) pt_sel = PthruSelected(launch_info, pt_avl.bdf_desc_map, pt_avl.bdf_vpid_map) dm = AcrnDmArgs(board_info, scenario_info, launch_info) # get bdf/vpid list from config xml pt_sel.get_bdf() pt_sel.get_vpid() pt_sel.get_slot() dm.get_args() # check items in config xml pt_sel.check_item() dm.check_item() return (launch_cfg_lib.ERR_LIST, pt_sel, dm)
def get_launch_item_values(board_info, scenario_info=None): """ Get items which capable multi select for user :param board_info: it is a file what contains board information for script to read from :param sceanrio_info: it is a file what contains scenario information for script to read from """ common.BOARD_INFO_FILE = board_info launch_item_values = {} # passthrough devices pthru = AvailablePthru(board_info) pthru.get_pci_dev() pthru.insert_nun() # pre passthrough device for ui launch_item_values["user_vm,passthrough_devices,usb_xdci"] = pthru.avl[ "usb_xdci"] launch_item_values["user_vm,passthrough_devices,gpu"] = pthru.avl["gpu"] launch_item_values["user_vm,passthrough_devices,ipu"] = pthru.avl["ipu"] launch_item_values["user_vm,passthrough_devices,ipu_i2c"] = pthru.avl[ "ipu_i2c"] launch_item_values["user_vm,passthrough_devices,cse"] = pthru.avl["cse"] launch_item_values["user_vm,passthrough_devices,audio"] = pthru.avl[ "audio"] launch_item_values["user_vm,passthrough_devices,audio_codec"] = pthru.avl[ "audio_codec"] launch_item_values["user_vm,passthrough_devices,sd_card"] = pthru.avl[ "sd_card"] launch_item_values["user_vm,passthrough_devices,wifi"] = pthru.avl["wifi"] launch_item_values["user_vm,passthrough_devices,ethernet"] = pthru.avl[ "ethernet"] launch_item_values["user_vm,passthrough_devices,sata"] = pthru.avl["sata"] launch_item_values["user_vm,passthrough_devices,nvme"] = pthru.avl["nvme"] launch_item_values["user_vm,passthrough_devices,bluetooth"] = pthru.avl[ "bluetooth"] # acrn dm available optargs launch_item_values['user_vm,user_vm_type'] = launch_cfg_lib.USER_VM_TYPES launch_item_values["user_vm,rtos_type"] = launch_cfg_lib.RTOS_TYPE launch_item_values["user_vm,vbootloader"] = launch_cfg_lib.BOOT_TYPE launch_item_values['user_vm,vuart0'] = launch_cfg_lib.DM_VUART0 launch_item_values['user_vm,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL launch_item_values[ "user_vm,cpu_affinity"] = board_cfg_lib.get_processor_info() launch_item_values['user_vm,enable_ptm'] = launch_cfg_lib.y_n launch_item_values['user_vm,allow_trigger_s5'] = launch_cfg_lib.y_n launch_cfg_lib.set_shm_regions(launch_item_values, scenario_info) launch_cfg_lib.set_pci_vuarts(launch_item_values, scenario_info) return launch_item_values
def get_launch_item_values(board_info): """ Get items which capable multi select for user :param board_info: it is a file what contains board information for script to read from """ launch_item_values = {} # passthrough devices pthru = AvailablePthru(board_info) pthru.get_pci_dev() pthru.insert_nun() # pre passthrough device for ui launch_item_values["uos,passthrough_devices,usb_xdci"] = pthru.avl[ "usb_xdci"] launch_item_values["uos,passthrough_devices,ipu"] = pthru.avl["ipu"] launch_item_values["uos,passthrough_devices,ipu_i2c"] = pthru.avl[ "ipu_i2c"] launch_item_values["uos,passthrough_devices,cse"] = pthru.avl["cse"] launch_item_values["uos,passthrough_devices,audio"] = pthru.avl["audio"] launch_item_values["uos,passthrough_devices,audio_codec"] = pthru.avl[ "audio_codec"] launch_item_values["uos,passthrough_devices,sd_card"] = pthru.avl[ "sd_card"] launch_item_values["uos,passthrough_devices,wifi"] = pthru.avl["wifi"] launch_item_values["uos,passthrough_devices,ethernet"] = pthru.avl[ "ethernet"] launch_item_values["uos,passthrough_devices,sata"] = pthru.avl["sata"] launch_item_values["uos,passthrough_devices,nvme"] = pthru.avl["nvme"] launch_item_values["uos,passthrough_devices,bluetooth"] = pthru.avl[ "bluetooth"] # acrn dm available optargs launch_item_values['uos,uos_type'] = launch_cfg_lib.UOS_TYPES launch_item_values["uos,rtos_type"] = launch_cfg_lib.RTOS_TYPE launch_item_values["uos,rootfs_dev"] = launch_cfg_lib.get_rootdev_info( board_info) launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE launch_item_values['uos,console_type'] = launch_cfg_lib.REDIRECT_CONSOLE launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS return launch_item_values
def get_launch_item_values(board_info): """ Get items which capable multi select for user :param board_info: it is a file what contains board information for script to read from """ launch_item_values = {} # passthrough devices pthru = AvailablePthru(board_info) pthru.get_pci_dev() pthru.insert_nun() # pre passthrough device for ui launch_item_values["uos,passthrough_devices,usb_xdci"] = pthru.avl[ "usb_xdci"] launch_item_values["uos,passthrough_devices,ipu"] = pthru.avl["ipu"] launch_item_values["uos,passthrough_devices,ipu_i2c"] = pthru.avl[ "ipu_i2c"] launch_item_values["uos,passthrough_devices,cse"] = pthru.avl["cse"] launch_item_values["uos,passthrough_devices,audio"] = pthru.avl["audio"] launch_item_values["uos,passthrough_devices,audio_codec"] = pthru.avl[ "audio_codec"] launch_item_values["uos,passthrough_devices,sd_card"] = pthru.avl[ "sd_card"] launch_item_values["uos,passthrough_devices,wifi"] = pthru.avl["wifi"] launch_item_values["uos,passthrough_devices,ethernet"] = pthru.avl[ "ethernet"] launch_item_values["uos,passthrough_devices,sata"] = pthru.avl["sata"] launch_item_values["uos,passthrough_devices,nvme"] = pthru.avl["nvme"] launch_item_values["uos,passthrough_devices,bluetooth"] = pthru.avl[ "bluetooth"] # acrn dm available optargs launch_item_values['uos,uos_type'] = launch_cfg_lib.UOS_TYPES launch_item_values["uos,rtos_type"] = launch_cfg_lib.RTOS_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,cpu_sharing'] = launch_cfg_lib.CPU_SHARING launch_item_values['uos,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL return launch_item_values