From 08bcf4bed7770ee64df7b89436d542652999c62a Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 20 Apr 2020 16:57:40 +0800 Subject: [PATCH] acrn-config: refine the HV_RAM_SIZE/HV_RAM_START for board_defconfig Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would generate for them, otherwise, they would be set by the UI. Tracked-On: #4641 Signed-off-by: Wei Liu Acked-by: Victor Sun --- misc/acrn-config/hv_config/board_defconfig.py | 21 +++++++++++++------ misc/acrn-config/hv_config/hv_item.py | 2 -- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/misc/acrn-config/hv_config/board_defconfig.py b/misc/acrn-config/hv_config/board_defconfig.py index db28a7c17..3614b9b2d 100644 --- a/misc/acrn-config/hv_config/board_defconfig.py +++ b/misc/acrn-config/hv_config/board_defconfig.py @@ -22,10 +22,12 @@ VM_NUM_MAP_TOTAL_HV_RAM_SIZE = { 4:0xB400000, # 210M 5:0xD200000, - # 240M - 6:0xF000000, - # 270M - 7:0x10E00000, + # 250M + 6:0xFA00000, + # 280M + 7:0x11800000, + # 320M + 8:0x14000000, } MEM_ALIGN = 2 * common.SIZE_M @@ -141,8 +143,15 @@ def get_memory(hv_info, config): hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16) hv_start_addr = common.round_up(hv_start_addr, MEM_ALIGN) - print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config) - print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config) + if not hv_info.mem.hv_ram_start: + print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config) + else: + print("CONFIG_HV_RAM_START={}".format(hv_info.mem.hv_ram_start), file=config) + if not hv_info.mem.hv_ram_size: + print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config) + else: + print("CONFIG_HV_RAM_SIZE={}".format(hv_info.mem.hv_ram_size), file=config) + print("CONFIG_PLATFORM_RAM_SIZE={}".format(hv_info.mem.platform_ram_size), file=config) print("CONFIG_LOW_RAM_SIZE={}".format(hv_info.mem.low_ram_size), file=config) print("CONFIG_SOS_RAM_SIZE={}".format(hv_info.mem.sos_ram_size), file=config) diff --git a/misc/acrn-config/hv_config/hv_item.py b/misc/acrn-config/hv_config/hv_item.py index 37683a74d..74dbffbcb 100644 --- a/misc/acrn-config/hv_config/hv_item.py +++ b/misc/acrn-config/hv_config/hv_item.py @@ -157,8 +157,6 @@ class Memory: def check_item(self): hv_cfg_lib.hv_size_check(self.stack_size, "MEMORY", "STACK_SIZE") hv_cfg_lib.hv_size_check(self.low_ram_size, "MEMORY", "LOW_RAM_SIZE") - hv_cfg_lib.hv_size_check(self.hv_ram_size, "MEMORY", "HV_RAM_SIZE") - hv_cfg_lib.hv_size_check(self.hv_ram_start, "MEMORY", "HV_RAM_START") hv_cfg_lib.hv_size_check(self.platform_ram_size, "MEMORY", "PLATFORM_RAM_SIZE") hv_cfg_lib.hv_size_check(self.sos_ram_size, "MEMORY", "SOS_RAM_SIZE") hv_cfg_lib.hv_size_check(self.uos_ram_size, "MEMORY", "UOS_RAM_SIZE")