mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 11:47:30 +00:00
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>
This commit is contained in:
parent
3c425fa919
commit
b42c283b20
@ -8,9 +8,7 @@ import subprocess
|
|||||||
import board_cfg_lib
|
import board_cfg_lib
|
||||||
|
|
||||||
|
|
||||||
DESC = """
|
DESC = """# Board defconfig generated by acrn-config tool
|
||||||
# New board kconfig generated by vm config tool
|
|
||||||
# Modified by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
|
VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
|
||||||
@ -82,7 +80,7 @@ def get_serial_type():
|
|||||||
# Get ttySx information from board config file
|
# Get ttySx information from board config file
|
||||||
ttys_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "<TTYS_INFO>", "</TTYS_INFO>")
|
ttys_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "<TTYS_INFO>", "</TTYS_INFO>")
|
||||||
|
|
||||||
scenario_name = board_cfg_lib.get_scenario_name()
|
(err_dic, scenario_name) = board_cfg_lib.get_scenario_name()
|
||||||
if scenario_name == "logical_partition":
|
if scenario_name == "logical_partition":
|
||||||
ttyn = 'ttyS0'
|
ttyn = 'ttyS0'
|
||||||
else:
|
else:
|
||||||
@ -145,7 +143,11 @@ def generate_file(config):
|
|||||||
hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
|
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)
|
hv_start_addr = board_cfg_lib.round_up(hv_start_addr, MEM_ALIGN)
|
||||||
|
|
||||||
|
# add config scenario name
|
||||||
|
(err_dic, scenario_name) = board_cfg_lib.get_scenario_name()
|
||||||
|
|
||||||
print("{}".format(DESC), file=config)
|
print("{}".format(DESC), file=config)
|
||||||
|
print("CONFIG_{}=y".format(scenario_name.upper()), file=config)
|
||||||
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
|
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
|
||||||
|
|
||||||
(serial_type, serial_value) = get_serial_type()
|
(serial_type, serial_value) = get_serial_type()
|
||||||
@ -161,8 +163,12 @@ def generate_file(config):
|
|||||||
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
|
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
|
||||||
|
|
||||||
cpu_core_num = len(board_cfg_lib.get_processor_info())
|
cpu_core_num = len(board_cfg_lib.get_processor_info())
|
||||||
if cpu_core_num == 2:
|
if scenario_name == "sdc" and cpu_core_num > 2:
|
||||||
print("# KATA VM is not supported on dual-core systems", file=config)
|
print("CONFIG_MAX_KATA_VM_NUM=1", file=config)
|
||||||
|
else:
|
||||||
|
if cpu_core_num == 2:
|
||||||
|
print("# KATA VM is not supported on dual-core systems", file=config)
|
||||||
|
|
||||||
print("CONFIG_MAX_KATA_VM_NUM=0", file=config)
|
print("CONFIG_MAX_KATA_VM_NUM=0", file=config)
|
||||||
|
|
||||||
if is_rdt_supported():
|
if is_rdt_supported():
|
||||||
@ -170,4 +176,6 @@ def generate_file(config):
|
|||||||
else:
|
else:
|
||||||
print("CONFIG_RDT_ENABLED=n", file=config)
|
print("CONFIG_RDT_ENABLED=n", file=config)
|
||||||
|
|
||||||
|
print("CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y", file=config)
|
||||||
|
|
||||||
return err_dic
|
return err_dic
|
||||||
|
Loading…
Reference in New Issue
Block a user