acrn-config: add PSRAM config in scenario setting

add CONFIG_PSRAM_ENABLED and CONFIG_PSRAM_PRE_RT_ENABLED config in
scenario setting and update Kconfig.

Tracked-On: #5418

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
Shuang Zheng 2020-10-21 00:08:11 +08:00 committed by wenlingz
parent 6df069f6ba
commit faeef67c20
5 changed files with 31 additions and 1 deletions

View File

@ -213,7 +213,7 @@ the source files will be generated into default path and overwirte the previous
{% for sub_elem in elem.getchildren() %}
{% set sub_elem_text = sub_elem.text if sub_elem.text != None else '' %}
{% if sub_elem.tag in ['RDT', 'IVSHMEM'] %}
{% if sub_elem.tag in ['RDT', 'IVSHMEM', 'PSRAM'] %}
{% for sub_elem_2 in sub_elem.getchildren() %}
{% set sub_elem_2_text = sub_elem_2.text if sub_elem_2.text != None else '' %}
{% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) in scenario_item_values %}

View File

@ -177,6 +177,10 @@ def get_features(hv_info, config):
print("CONFIG_ACPI_PARSE_ENABLED={}".format(hv_info.features.acpi_parse_enabled), file=config)
print("CONFIG_L1D_FLUSH_VMENTRY_ENABLED={}".format(hv_info.features.l1d_flush_vmentry_enabled), file=config)
print("CONFIG_MCE_ON_PSC_WORKAROUND_DISABLED={}".format(hv_info.features.mce_on_psc_workaround_disabled), file=config)
if hv_info.features.psram_enabled in ['y', 'n']:
print("CONFIG_PSRAM_ENABLED={}".format(hv_info.features.psram_enabled), file=config)
if hv_info.features.psram_enabled in ['y', 'n']:
print("CONFIG_PSRAM_PRE_RTVM_ENABLED={}".format(hv_info.features.psram_passthrough_pre_rtvm), file=config)
def get_capacities(hv_info, config):

View File

@ -109,6 +109,8 @@ class Features:
self.acpi_parse_enabled = ''
self.l1d_flush_vmentry_enabled = ''
self.mce_on_psc_workaround_disabled = ''
self.psram_enabled = ''
self.psram_passthrough_pre_rtvm = ''
def get_info(self):
self.multiboot2 = common.get_hv_item_tag(self.hv_file, "FEATURES", "MULTIBOOT2")
@ -123,6 +125,8 @@ class Features:
self.l1d_flush_vmentry_enabled = common.get_hv_item_tag(self.hv_file, "FEATURES", "L1D_VMENTRY_ENABLED")
self.mce_on_psc_workaround_disabled = common.get_hv_item_tag(self.hv_file, "FEATURES", "MCE_ON_PSC_DISABLED")
self.iommu_enforce_snp = common.get_hv_item_tag(self.hv_file, "FEATURES", "IOMMU_ENFORCE_SNP")
self.psram_enabled = common.get_hv_item_tag(self.hv_file, "FEATURES", "PSRAM", "PSRAM_ENABLED")
self.psram_passthrough_pre_rtvm = common.get_hv_item_tag(self.hv_file, "FEATURES", "PSRAM", "PSRAM_PASSTHROUGH_PRE_RTVM")
def check_item(self):
hv_cfg_lib.ny_support_check(self.multiboot2, "FEATURES", "MULTIBOOT2")
@ -137,6 +141,12 @@ class Features:
hv_cfg_lib.ny_support_check(self.l1d_flush_vmentry_enabled, "FEATURES", "L1D_VMENTRY_ENABLED")
hv_cfg_lib.ny_support_check(self.mce_on_psc_workaround_disabled, "FEATURES", "MCE_ON_PSC_DISABLED")
hv_cfg_lib.ny_support_check(self.iommu_enforce_snp, "FEATURES", "IOMMU_ENFORCE_SNP")
# hv_cfg_lib.ny_support_check(self.psram_enabled, "FEATURES", "PSRAM", "PSRAM_ENABLED")
# hv_cfg_lib.ny_support_check(self.psram_passthrough_pre_rtvm,
# "FEATURES", "PSRAM", "PSRAM_PASSTHROUGH_PRE_RTVM")
hv_cfg_lib.hv_psram_check(self.psram_enabled, self.cdp_enabled, "FEATURES", "PSRAM", "PSRAM_ENABLED")
hv_cfg_lib.hv_psram_passthrough_pre_rtvm_check(self.psram_passthrough_pre_rtvm, self.psram_enabled,
"FEATURES", "PSRAM", "PSRAM_PASSTHROUGH_PRE_RTVM")
class Memory:

View File

@ -231,3 +231,17 @@ def max_msix_table_num_check(max_msix_table_num, cap_str, max_msi_num_str):
if native_max_msix_line:
native_max_msix_num = native_max_msix_line[0].strip()
range_check(native_max_msix_num, "In board xml", max_msi_num_str, RANGE_DB['MSIX_TABLE_NUM'])
def hv_psram_check(psram_enabled, cpd_enabled, feature, tag, leaf):
key = 'hv,{},{},{}'.format(feature, tag, leaf)
if psram_enabled == 'y' and cpd_enabled == 'y':
ERR_LIST[key] = "PSRAM_ENABLED should not be y when CDP_ENABLED is y."
return
def hv_psram_passthrough_pre_rtvm_check(psram_passthrough_pre_rtvm, psram_enabled, feature, tag, leaf):
key = 'hv,{},{},{}'.format(feature, tag, leaf)
if psram_enabled == 'n' and psram_passthrough_pre_rtvm == 'y':
ERR_LIST[key] = "{} should not be y when {} is n.".format(leaf, tag)
return

View File

@ -84,6 +84,8 @@ def get_scenario_item_values(board_info, scenario_info):
scenario_item_values["hv,FEATURES,MCE_ON_PSC_DISABLED"] = hv_cfg_lib.N_Y
scenario_item_values["hv,FEATURES,IOMMU_ENFORCE_SNP"] = hv_cfg_lib.N_Y
scenario_item_values["hv,FEATURES,IVSHMEM,IVSHMEM_ENABLED"] = hv_cfg_lib.N_Y
scenario_item_values["hv,FEATURES,PSRAM,PSRAM_ENABLED"] = hv_cfg_lib.N_Y
scenario_item_values["hv,FEATURES,PSRAM,PSRAM_PASSTHROUGH_PRE_RTVM"] = hv_cfg_lib.N_Y
scenario_cfg_lib.ERR_LIST.update(hv_cfg_lib.ERR_LIST)
return scenario_item_values