mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-04 02:56:52 +00:00
acrn-config: add support to assign 3rd non-contiguous HPA regions for logical partition scenario
Currently config tool supports 2 non-contiguous HPA regions (HPA1 and HPA2), extend the code to support 3rd non-contiguous HPA region (HPA3) for logical partition scenario (hybrid scenario is not supported) Tracked-On: #6145 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
This commit is contained in:
parent
6f3dfb8a59
commit
16d517a84d
@ -150,6 +150,8 @@ class MemInfo:
|
||||
mem_size = {}
|
||||
mem_start_hpa2 = {}
|
||||
mem_size_hpa2 = {}
|
||||
mem_start_hpa3 = {}
|
||||
mem_size_hpa3 = {}
|
||||
|
||||
def __init__(self, scenario_file):
|
||||
self.scenario_info = scenario_file
|
||||
@ -167,6 +169,10 @@ class MemInfo:
|
||||
self.scenario_info, "memory", "start_hpa2")
|
||||
self.mem_size_hpa2 = common.get_leaf_tag_map(
|
||||
self.scenario_info, "memory", "size_hpa2")
|
||||
self.mem_start_hpa3 = common.get_leaf_tag_map(
|
||||
self.scenario_info, "memory", "start_hpa3")
|
||||
self.mem_size_hpa3 = common.get_leaf_tag_map(
|
||||
self.scenario_info, "memory", "size_hpa3")
|
||||
|
||||
def check_item(self):
|
||||
"""
|
||||
@ -177,6 +183,8 @@ class MemInfo:
|
||||
scenario_cfg_lib.mem_size_check(self.mem_size, "memory", "size")
|
||||
scenario_cfg_lib.mem_start_hpa_check(self.mem_start_hpa2, "memory", "start_hpa2")
|
||||
scenario_cfg_lib.mem_size_check(self.mem_size_hpa2, "memory", "size_hpa2")
|
||||
scenario_cfg_lib.mem_start_hpa_check(self.mem_start_hpa3, "memory", "start_hpa3")
|
||||
scenario_cfg_lib.mem_size_check(self.mem_size_hpa3, "memory", "size_hpa3")
|
||||
|
||||
|
||||
class CfgPci:
|
||||
|
@ -304,6 +304,8 @@ def gen_pre_launch_vm(vm_type, vm_i, scenario_items, config):
|
||||
print("\t\t\t.size = VM{0}_CONFIG_MEM_SIZE,".format(vm_i), file=config)
|
||||
print("\t\t\t.start_hpa2 = VM{0}_CONFIG_MEM_START_HPA2,".format(vm_i), file=config)
|
||||
print("\t\t\t.size_hpa2 = VM{0}_CONFIG_MEM_SIZE_HPA2,".format(vm_i), file=config)
|
||||
print("\t\t\t.start_hpa3 = VM{0}_CONFIG_MEM_START_HPA3,".format(vm_i), file=config)
|
||||
print("\t\t\t.size_hpa3 = VM{0}_CONFIG_MEM_SIZE_HPA3,".format(vm_i), file=config)
|
||||
print("\t\t},", file=config)
|
||||
is_need_epc(vm_info.epc_section, vm_i, config)
|
||||
print("\t\t.os_config = {", file=config)
|
||||
|
@ -57,6 +57,13 @@ def gen_pre_launch_vm(scenario_items, config):
|
||||
print("#define VM{0}_CONFIG_MEM_SIZE_HPA2 {1}UL".format(
|
||||
vm_i, vm_info.mem_info.mem_size_hpa2[vm_i]), file=config)
|
||||
|
||||
start_hpa3 = vm_info.mem_info.mem_start_hpa3.get(vm_i, '0')
|
||||
size_hpa3 = vm_info.mem_info.mem_size_hpa3.get(vm_i, '0')
|
||||
print("#define VM{0}_CONFIG_MEM_START_HPA3 {1}UL".format(
|
||||
vm_i, start_hpa3), file=config)
|
||||
print("#define VM{0}_CONFIG_MEM_SIZE_HPA3 {1}UL".format(
|
||||
vm_i, size_hpa3), file=config)
|
||||
|
||||
print("", file=config)
|
||||
vm_i += 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user