mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 06:29:19 +00:00
acrn-config: remove legacy vuart declaration
Improve the legacy vuart code. The legacy vuart insert the declaration without checking if it's enabled. Refined the logic that if the legacy is disabled, simply do not declare. Tracked-On: #5425 Signed-off-by: Yang,Yu-chu <yu-chu,yang>
This commit is contained in:
parent
0d9c2ac6aa
commit
a8fe9b906a
@ -45,6 +45,8 @@ def get_post_vm_type(vm_type, vm_i):
|
||||
|
||||
|
||||
def vuart0_output(i, vm_type, vm_info, config):
|
||||
if vm_info.vuart.v0_vuart[i]['base'] == "INVALID_COM_BASE":
|
||||
return
|
||||
"""
|
||||
This is generate vuart 0 setting
|
||||
:param i: vm id number
|
||||
@ -100,6 +102,8 @@ def vuart1_output(i, vm_type, vuart1_vmid_dic, vm_info, config):
|
||||
:return: None
|
||||
"""
|
||||
vuart_enable = vuart_map_enable(vm_info)
|
||||
if vm_info.vuart.v1_vuart[i]['base'] == "INVALID_COM_BASE":
|
||||
return
|
||||
# vuart1: {vmid:target_vmid}
|
||||
print("\t\t.vuart[1] = {", file=config)
|
||||
print("\t\t\t.type = {0},".format(vm_info.vuart.v1_vuart[i]['type']), file=config)
|
||||
@ -122,6 +126,7 @@ def vuart1_output(i, vm_type, vuart1_vmid_dic, vm_info, config):
|
||||
vm_info.vuart.v1_vuart[i]['target_vm_id']), file=config)
|
||||
print("\t\t\t.t_vuart.vuart_id = {0}U,".format(
|
||||
vm_info.vuart.v1_vuart[i]['target_uart_id']), file=config)
|
||||
print("\t\t},", file=config)
|
||||
|
||||
def vuart_output(vm_type, i, vm_info, config):
|
||||
"""
|
||||
@ -136,7 +141,6 @@ def vuart_output(vm_type, i, vm_info, config):
|
||||
|
||||
vuart0_output(i, vm_type, vm_info, config)
|
||||
vuart1_output(i, vm_type, vuart1_vmid_dic, vm_info, config)
|
||||
print("\t\t},", file=config)
|
||||
|
||||
|
||||
def is_need_epc(epc_section, i, config):
|
||||
|
Loading…
Reference in New Issue
Block a user