From 19f74d84a641903c45b6fc437366e1bfe90c09c4 Mon Sep 17 00:00:00 2001 From: Toshiki Nishioka Date: Wed, 2 Sep 2020 18:45:45 +0900 Subject: [PATCH] acrn-config: refine p2sb mmio pass-thru macro definitions Always use P2SB_ as a prefix for all macro definitions related to P2SB MMIO passthru. And introduce the new P2SB_VGPIO_DM_ENABLED macro to indicate the presence of the pre-launched VM which requires the feature. This macro intends to be used to enclose source files with ifdef where macros defined by config-tool being used which are available only when the feature is enabled. It is required to avoid causing compilation errors when users build HV without enabling the feature. Tracked-On: #5246 Signed-off-by: Toshiki Nishioka Reviewed-by: Junjie Mao Acked-by: Eddie Dong --- misc/acrn-config/board_config/board_info_h.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/acrn-config/board_config/board_info_h.py b/misc/acrn-config/board_config/board_info_h.py index 009200986..cd5a4ecd4 100644 --- a/misc/acrn-config/board_config/board_info_h.py +++ b/misc/acrn-config/board_config/board_info_h.py @@ -95,11 +95,12 @@ def generate_file(config): scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM" and board_cfg_lib.is_p2sb_passthru_possible()): print("", file=config) + print("#define P2SB_VGPIO_DM_ENABLED", file=config) print("#define P2SB_BAR_ADDR\t\t\t0x{:X}UL".format(board_cfg_lib.find_p2sb_bar_addr()), file=config) if board_cfg_lib.is_matched_board(("ehl-crb-b")): print("", file=config) - print("#define BASE_GPIO_PORT_ID\t\t0x69U", file=config) - print("#define MAX_GPIO_COMMUNITIES\t0x6U", file=config) + print("#define P2SB_BASE_GPIO_PORT_ID\t\t0x69U", file=config) + print("#define P2SB_MAX_GPIO_COMMUNITIES\t0x6U", file=config) print(BOARD_INFO_ENDIF, file=config)