From 29cbce07f66261c6431315572856d5d7eff3f037 Mon Sep 17 00:00:00 2001 From: dongshen Date: Thu, 10 Sep 2020 15:24:42 -0700 Subject: [PATCH] acrn-config: fix hang issue for board EHL (hybrid_rt) P2SB_BAR_ADDR related macros should only be defined in misc_cfg.h only when p2sb is enabled in scenario xml. Tracked-On: #5340 Signed-off-by: dongshen --- misc/acrn-config/board_config/board_info_h.py | 4 +++- misc/vm_configs/scenarios/hybrid/ehl-crb-b/misc_cfg.h | 5 ----- misc/vm_configs/scenarios/hybrid_rt/ehl-crb-b/misc_cfg.h | 5 ----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/misc/acrn-config/board_config/board_info_h.py b/misc/acrn-config/board_config/board_info_h.py index 75edde94a..49c612d77 100644 --- a/misc/acrn-config/board_config/board_info_h.py +++ b/misc/acrn-config/board_config/board_info_h.py @@ -91,9 +91,11 @@ def generate_file(config): # generate HI_MMIO_START/HI_MMIO_END find_hi_mmio_window(config) + p2sb = common.get_leaf_tag_map_bool(common.SCENARIO_INFO_FILE, "mmio_resources", "p2sb") if (common.VM_TYPES.get(0) is not None and scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM" - and board_cfg_lib.is_p2sb_passthru_possible()): + and board_cfg_lib.is_p2sb_passthru_possible() + and p2sb.get(0, False)): print("", file=config) print("#define P2SB_VGPIO_DM_ENABLED", file=config) diff --git a/misc/vm_configs/scenarios/hybrid/ehl-crb-b/misc_cfg.h b/misc/vm_configs/scenarios/hybrid/ehl-crb-b/misc_cfg.h index 6d308fc2e..a3f18c4e6 100644 --- a/misc/vm_configs/scenarios/hybrid/ehl-crb-b/misc_cfg.h +++ b/misc/vm_configs/scenarios/hybrid/ehl-crb-b/misc_cfg.h @@ -74,11 +74,6 @@ #define VM2_VCPU_CLOS {0U} #endif -#define VM0_PASSTHROUGH_TPM -#define VM0_TPM_BUFFER_BASE_ADDR 0xFED40000UL -#define VM0_TPM_BUFFER_BASE_ADDR_GPA 0xFED40000UL -#define VM0_TPM_BUFFER_SIZE 0x5000UL - #define VM0_CONFIG_PCI_DEV_NUM 1U diff --git a/misc/vm_configs/scenarios/hybrid_rt/ehl-crb-b/misc_cfg.h b/misc/vm_configs/scenarios/hybrid_rt/ehl-crb-b/misc_cfg.h index 6ce2fd09d..d54aa43c5 100644 --- a/misc/vm_configs/scenarios/hybrid_rt/ehl-crb-b/misc_cfg.h +++ b/misc/vm_configs/scenarios/hybrid_rt/ehl-crb-b/misc_cfg.h @@ -74,11 +74,6 @@ #define VM2_VCPU_CLOS {0U} #endif -#define VM0_PASSTHROUGH_TPM -#define VM0_TPM_BUFFER_BASE_ADDR 0xFED40000UL -#define VM0_TPM_BUFFER_BASE_ADDR_GPA 0xFED40000UL -#define VM0_TPM_BUFFER_SIZE 0x5000UL - #define VM0_CONFIG_PCI_DEV_NUM 4U #define VM2_CONFIG_PCI_DEV_NUM 1U