acrn-config: keep HV_RAM_START 2M memory align

Refine HV_RAM_START to keep 2M memory align for new board config.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu 2020-03-06 11:06:05 +08:00 committed by wenlingz
parent 91b06a35ee
commit 27b6c82c0f

View File

@ -28,6 +28,8 @@ VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
7:0x10E00000,
}
MEM_ALIGN = 2 * board_cfg_lib.SIZE_M
def find_avl_memory(ram_range, hpa_size, hv_start_offset):
"""
@ -141,6 +143,7 @@ def generate_file(config):
total_size = reserved_ram + hv_ram_size
avl_start_addr = find_avl_memory(ram_range, str(total_size), hv_start_offset)
hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
hv_start_addr = board_cfg_lib.round_up(hv_start_addr, MEM_ALIGN)
print("{}".format(DESC), file=config)
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)