Skip to content

Commit 08bcf4b

Browse files
Wei Liuwenlingz
authored andcommitted
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 <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent d729960 commit 08bcf4b

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

misc/acrn-config/hv_config/board_defconfig.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
4:0xB400000,
2323
# 210M
2424
5:0xD200000,
25-
# 240M
26-
6:0xF000000,
27-
# 270M
28-
7:0x10E00000,
25+
# 250M
26+
6:0xFA00000,
27+
# 280M
28+
7:0x11800000,
29+
# 320M
30+
8:0x14000000,
2931
}
3032

3133
MEM_ALIGN = 2 * common.SIZE_M
@@ -141,8 +143,15 @@ def get_memory(hv_info, config):
141143
hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
142144
hv_start_addr = common.round_up(hv_start_addr, MEM_ALIGN)
143145

144-
print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
145-
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
146+
if not hv_info.mem.hv_ram_start:
147+
print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
148+
else:
149+
print("CONFIG_HV_RAM_START={}".format(hv_info.mem.hv_ram_start), file=config)
150+
if not hv_info.mem.hv_ram_size:
151+
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
152+
else:
153+
print("CONFIG_HV_RAM_SIZE={}".format(hv_info.mem.hv_ram_size), file=config)
154+
146155
print("CONFIG_PLATFORM_RAM_SIZE={}".format(hv_info.mem.platform_ram_size), file=config)
147156
print("CONFIG_LOW_RAM_SIZE={}".format(hv_info.mem.low_ram_size), file=config)
148157
print("CONFIG_SOS_RAM_SIZE={}".format(hv_info.mem.sos_ram_size), file=config)

misc/acrn-config/hv_config/hv_item.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ def get_info(self):
157157
def check_item(self):
158158
hv_cfg_lib.hv_size_check(self.stack_size, "MEMORY", "STACK_SIZE")
159159
hv_cfg_lib.hv_size_check(self.low_ram_size, "MEMORY", "LOW_RAM_SIZE")
160-
hv_cfg_lib.hv_size_check(self.hv_ram_size, "MEMORY", "HV_RAM_SIZE")
161-
hv_cfg_lib.hv_size_check(self.hv_ram_start, "MEMORY", "HV_RAM_START")
162160
hv_cfg_lib.hv_size_check(self.platform_ram_size, "MEMORY", "PLATFORM_RAM_SIZE")
163161
hv_cfg_lib.hv_size_check(self.sos_ram_size, "MEMORY", "SOS_RAM_SIZE")
164162
hv_cfg_lib.hv_size_check(self.uos_ram_size, "MEMORY", "UOS_RAM_SIZE")

0 commit comments

Comments
 (0)