Skip to content

Commit 6f8a7ba

Browse files
Wei Liuwenlingz
authored andcommitted
acrn-config: add some configs in board defconfig
1. add CONFIG_scenario=y config in $(BOARD).config file so that SCENARIO parameter will not be needed when build with xmls. 2. add CONFIG_MAX_KATA_VM_NUM; 3. add CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y because all ACPI info generated by acrn-config has been validated; Tracked-On: #3854 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent 2eb8e0f commit 6f8a7ba

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

misc/acrn-config/board_config/new_board_kconfig.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
import board_cfg_lib
99

1010

11-
DESC = """
12-
# New board kconfig generated by vm config tool
13-
# Modified by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
11+
DESC = """# Board defconfig generated by acrn-config tool
1412
"""
1513

1614
VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
@@ -82,7 +80,7 @@ def get_serial_type():
8280
# Get ttySx information from board config file
8381
ttys_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "<TTYS_INFO>", "</TTYS_INFO>")
8482

85-
scenario_name = board_cfg_lib.get_scenario_name()
83+
(err_dic, scenario_name) = board_cfg_lib.get_scenario_name()
8684
if scenario_name == "logical_partition":
8785
ttyn = 'ttyS0'
8886
else:
@@ -145,7 +143,11 @@ def generate_file(config):
145143
hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
146144
hv_start_addr = board_cfg_lib.round_up(hv_start_addr, MEM_ALIGN)
147145

146+
# add config scenario name
147+
(err_dic, scenario_name) = board_cfg_lib.get_scenario_name()
148+
148149
print("{}".format(DESC), file=config)
150+
print("CONFIG_{}=y".format(scenario_name.upper()), file=config)
149151
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
150152

151153
(serial_type, serial_value) = get_serial_type()
@@ -161,13 +163,19 @@ def generate_file(config):
161163
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
162164

163165
cpu_core_num = len(board_cfg_lib.get_processor_info())
164-
if cpu_core_num == 2:
165-
print("# KATA VM is not supported on dual-core systems", file=config)
166+
if scenario_name == "sdc" and cpu_core_num > 2:
167+
print("CONFIG_MAX_KATA_VM_NUM=1", file=config)
168+
else:
169+
if cpu_core_num == 2:
170+
print("# KATA VM is not supported on dual-core systems", file=config)
171+
166172
print("CONFIG_MAX_KATA_VM_NUM=0", file=config)
167173

168174
if is_rdt_supported():
169175
print("CONFIG_RDT_ENABLED=y", file=config)
170176
else:
171177
print("CONFIG_RDT_ENABLED=n", file=config)
172178

179+
print("CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y", file=config)
180+
173181
return err_dic

0 commit comments

Comments
 (0)