mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-18 07:18:45 +00:00
misc: refine vuart connection
We have redesign the vuart and the UI for user, so the config tool should change the schema and xform for the new xml, then change the static_allocators to alloc irq and io_port for new connection. This patch add a new vuart connection type and change the xforms to adapter the new type. Tracked-On: #6690 Reviewed-by: Junjie Mao <junjie.mao@intel.com> Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
This commit is contained in:
@@ -37,20 +37,6 @@ def main(args):
|
||||
user_vm_id = legacy_vuart.find('target_vm_id').text
|
||||
legacy_vuartid = int(legacy_vuart.attrib["id"])
|
||||
vuart_target_vmid[legacy_vuartid] = user_vm_id
|
||||
|
||||
vm_list = allocation_etree.xpath("//vm[load_order = 'SERVICE_VM']")
|
||||
for vm in vm_list:
|
||||
vuart_list = find_non_standard_uart(vm)
|
||||
if len(vuart_list) != 0:
|
||||
with open(args.out, "w+") as config_f:
|
||||
for uart_start_num, vuart in enumerate(vuart_list, start=START_VUART_DEV_NAME_NO):
|
||||
base = " port " + vuart.find('base').text
|
||||
vuart_id = int(vuart.attrib["id"])
|
||||
vm_id_note = "# User_VM_id: " + str(vuart_target_vmid[vuart_id]) + '\n'
|
||||
config_f.write(vm_id_note)
|
||||
conf = "/dev/ttyS" + str(uart_start_num) + base + UART_IRQ_BAUD + '\n'
|
||||
config_f.write(conf)
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--allocation", help="the XML file summarizing resource allocated by config tool")
|
||||
|
Reference in New Issue
Block a user