From ebab980d3e7c263e6d8b7d962891be1e618d7fd3 Mon Sep 17 00:00:00 2001 From: Shuang Zheng Date: Thu, 4 Feb 2021 23:40:58 +0800 Subject: [PATCH] config_tools: is_tpm_passthru is checked by scenario config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add check for is_tpm_passthru by tpm config from scenario config. Tracked-On: #5710 Signed-off-by: Shuang Zheng --- misc/config_tools/library/board_cfg_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/config_tools/library/board_cfg_lib.py b/misc/config_tools/library/board_cfg_lib.py index ff2b7e67c..98d9175f5 100644 --- a/misc/config_tools/library/board_cfg_lib.py +++ b/misc/config_tools/library/board_cfg_lib.py @@ -612,7 +612,8 @@ def is_tpm_passthru(): tpm_passthru = False (_, board) = common.get_board_name() - if board in TPM_PASSTHRU_BOARD: + tpm2_passthru_enabled = common.get_leaf_tag_map_bool(common.SCENARIO_INFO_FILE, "mmio_resources", "TPM2") + if board in TPM_PASSTHRU_BOARD and tpm2_passthru_enabled and tpm2_passthru_enabled == 'y': tpm_passthru = True return tpm_passthru