From 1e2333647edac27a0d015c8ec47ae748e2cd111b Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 20 Nov 2019 19:04:34 +0800 Subject: [PATCH] acrn-config: skip the DRHDn_IGNORE when no device scope Skip to generate DRHDn_IGNORE to board.c, when there is no device scope type on target platform DRHD definition. Tracked-On: #3854 Signed-off-by: Wei Liu Acked-by: Victor Sun --- misc/acrn-config/board_config/board_c.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/acrn-config/board_config/board_c.py b/misc/acrn-config/board_config/board_c.py index 3ab009f13..93b625567 100644 --- a/misc/acrn-config/board_config/board_c.py +++ b/misc/acrn-config/board_config/board_c.py @@ -63,7 +63,8 @@ def gen_dmar_structure(config): print("\t\t.segment = DRHD{}_SEGMENT,".format(i_drhd_cnt), file=config) print("\t\t.flags = DRHD{}_FLAGS,".format(i_drhd_cnt), file=config) print("\t\t.reg_base_addr = DRHD{}_REG_BASE,".format(i_drhd_cnt), file=config) - print("\t\t.ignore = DRHD{}_IGNORE,".format(i_drhd_cnt), file=config) + if dev_cnt != 0: + print("\t\t.ignore = DRHD{}_IGNORE,".format(i_drhd_cnt), file=config) print("\t\t.devices = drhd{}_dev_scope".format(i_drhd_cnt), file=config) print("\t},", file=config)