acrn-config: enable tpm for hybird_rt on ehl

enable tpm for hybrid_rt scenario on ehl board.

Tracked-On: #5506

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
Shuang Zheng 2020-11-13 18:19:18 +08:00 committed by wenlingz
parent 8838f0e661
commit 5ea9c55145
3 changed files with 10 additions and 8 deletions

View File

@ -374,6 +374,8 @@ def generate_file(config):
vm0_pre_launch = True vm0_pre_launch = True
if vm0_pre_launch and board_cfg_lib.is_tpm_passthru(): if vm0_pre_launch and board_cfg_lib.is_tpm_passthru():
tpm2_passthru_enabled = common.get_leaf_tag_map_bool(common.SCENARIO_INFO_FILE, "mmio_resources", "TPM2")
if 0 in tpm2_passthru_enabled and tpm2_passthru_enabled[0]:
print("#define VM0_PASSTHROUGH_TPM", file=config) print("#define VM0_PASSTHROUGH_TPM", file=config)
print("#define VM0_TPM_BUFFER_BASE_ADDR 0xFED40000UL", file=config) print("#define VM0_TPM_BUFFER_BASE_ADDR 0xFED40000UL", file=config)
gpa = common.hpa2gpa(0, 0xFED40000, 0x5000) gpa = common.hpa2gpa(0, 0xFED40000, 0x5000)

View File

@ -34,7 +34,7 @@ KNOWN_HIDDEN_PDEVS_BOARD_DB = {
TSN_DEVS = ["8086:4b30", "8086:4b31", "8086:4b32", "8086:4ba0", "8086:4ba1", "8086:4ba2", TSN_DEVS = ["8086:4b30", "8086:4b31", "8086:4b32", "8086:4ba0", "8086:4ba1", "8086:4ba2",
"8086:4bb0", "8086:4bb1", "8086:4bb2", "8086:a0ac", "8086:43ac", "8086:43a2"] "8086:4bb0", "8086:4bb1", "8086:4bb2", "8086:a0ac", "8086:43ac", "8086:43a2"]
GPIO_DEVS = ["8086:4b88", "8086:4b89"] GPIO_DEVS = ["8086:4b88", "8086:4b89"]
TPM_PASSTHRU_BOARD = ['whl-ipc-i5', 'whl-ipc-i7', 'tgl-rvp'] TPM_PASSTHRU_BOARD = ['whl-ipc-i5', 'whl-ipc-i7', 'tgl-rvp', 'ehl-crb-b']
KNOWN_CAPS_PCI_DEVS_DB = { KNOWN_CAPS_PCI_DEVS_DB = {
"VMSIX":TSN_DEVS + GPIO_DEVS, "VMSIX":TSN_DEVS + GPIO_DEVS,

View File

@ -598,7 +598,7 @@ def read_tpm_data(config):
:return: :return:
''' '''
try: try:
acpi_table_output = subprocess.check_output(['ls -l /sys/firmware/acpi/tables/']).decode('utf8') acpi_table_output = subprocess.check_output('ls -l /sys/firmware/acpi/tables/'.split()).decode('utf8')
except: except:
acpi_table_output = '' acpi_table_output = ''
if 'TPM2' in acpi_table_output: if 'TPM2' in acpi_table_output: