From f10c937b40dee1ff42da2cb35172ca0e0b5c22a9 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 5 Nov 2019 09:33:39 +0800 Subject: [PATCH] acrn-config: correct value of DRHDx_IGNORE macro The DRHDx_IGNORE should be defined to true when DRHD device BDF equal to the given CONFIG_GPU_SBDF. Tracked-On: #3854 Signed-off-by: Wei Liu Acked-by: Victor Sun --- misc/acrn-config/target/dmar.py | 8 ++++++-- misc/acrn-config/xmls/board-xmls/apl-mrb.xml | 2 +- misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml | 2 +- misc/acrn-config/xmls/board-xmls/apl-up2.xml | 2 +- misc/acrn-config/xmls/board-xmls/nuc6cayh.xml | 2 +- misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/misc/acrn-config/target/dmar.py b/misc/acrn-config/target/dmar.py index 01d9be1b8..5868c3836 100644 --- a/misc/acrn-config/target/dmar.py +++ b/misc/acrn-config/target/dmar.py @@ -186,6 +186,11 @@ class DmarTbl: self.path_offset = 0 +# TODO: Get board information is independent part of acrn-config tools, it does not get the GPU_SBDF default +# config from the other part of tools, so hard code the GPU_SBDF to gernerate DRHDx_IGNORE macro +CONFIG_GPU_SBDF = 0x10 + + class PathDevFun: """Path Device Function meta data""" def __init__(self): @@ -218,9 +223,8 @@ def walk_pci_bus(tmp_pdf, dmar_tbl, dmar_hw_list, n_cnt, drhd_cnt): dmar_tbl.path_offset += ctypes.sizeof(DevScopePath) n_cnt -= 1 - # this not support to warning if no dedicated iommu for gpu if ((dmar_tbl.dmar_drhd.segment << 16) | ( - dmar_tbl.dmar_dev_scope.bus << 8) | scope_path.function) == 0x10: + dmar_tbl.dmar_dev_scope.bus << 8) | tmp_pdf.path) == CONFIG_GPU_SBDF: dmar_hw_list.hw_ignore[drhd_cnt] = 'true' else: dmar_hw_list.hw_ignore[drhd_cnt] = 'false' diff --git a/misc/acrn-config/xmls/board-xmls/apl-mrb.xml b/misc/acrn-config/xmls/board-xmls/apl-mrb.xml index f38cd12d9..305b35ed0 100644 --- a/misc/acrn-config/xmls/board-xmls/apl-mrb.xml +++ b/misc/acrn-config/xmls/board-xmls/apl-mrb.xml @@ -200,7 +200,7 @@ #define DRHD0_SEGMENT 0U #define DRHD0_FLAGS 0U #define DRHD0_REG_BASE 0xFED64000UL - #define DRHD0_IGNORE false + #define DRHD0_IGNORE true #define DRHD0_DEVSCOPE0_BUS 0x0U #define DRHD0_DEVSCOPE0_PATH 0x10U #define DRHD0_DEVSCOPE1_BUS 0x0U diff --git a/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml b/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml index 9373ffd3a..720be080c 100644 --- a/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml +++ b/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml @@ -186,7 +186,7 @@ #define DRHD0_SEGMENT 0U #define DRHD0_FLAGS 0U #define DRHD0_REG_BASE 0xFED64000UL - #define DRHD0_IGNORE false + #define DRHD0_IGNORE true #define DRHD0_DEVSCOPE0_BUS 0x0U #define DRHD0_DEVSCOPE0_PATH 0x10U #define DRHD0_DEVSCOPE1_BUS 0x0U diff --git a/misc/acrn-config/xmls/board-xmls/apl-up2.xml b/misc/acrn-config/xmls/board-xmls/apl-up2.xml index a8ed7cdd5..f4587f03a 100644 --- a/misc/acrn-config/xmls/board-xmls/apl-up2.xml +++ b/misc/acrn-config/xmls/board-xmls/apl-up2.xml @@ -186,7 +186,7 @@ #define DRHD0_SEGMENT 0U #define DRHD0_FLAGS 0U #define DRHD0_REG_BASE 0xFED64000UL - #define DRHD0_IGNORE false + #define DRHD0_IGNORE true #define DRHD0_DEVSCOPE0_BUS 0x0U #define DRHD0_DEVSCOPE0_PATH 0x10U #define DRHD0_DEVSCOPE1_BUS 0x0U diff --git a/misc/acrn-config/xmls/board-xmls/nuc6cayh.xml b/misc/acrn-config/xmls/board-xmls/nuc6cayh.xml index 0aaa8efac..4442ff62c 100644 --- a/misc/acrn-config/xmls/board-xmls/nuc6cayh.xml +++ b/misc/acrn-config/xmls/board-xmls/nuc6cayh.xml @@ -138,7 +138,7 @@ #define DRHD0_SEGMENT 0U #define DRHD0_FLAGS 0U #define DRHD0_REG_BASE 0xFED64000UL - #define DRHD0_IGNORE false + #define DRHD0_IGNORE true #define DRHD0_DEVSCOPE0_BUS 0x0U #define DRHD0_DEVSCOPE0_PATH 0x10U #define DRHD0_DEVSCOPE1_BUS 0x0U diff --git a/misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml b/misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml index 7689c3496..066d1c93d 100644 --- a/misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml +++ b/misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml @@ -129,7 +129,7 @@ #define DRHD0_SEGMENT 0U #define DRHD0_FLAGS 0U #define DRHD0_REG_BASE 0xFED90000UL - #define DRHD0_IGNORE false + #define DRHD0_IGNORE true #define DRHD0_DEVSCOPE0_BUS 0x0U #define DRHD0_DEVSCOPE0_PATH 0x10U #define DRHD0_DEVSCOPE1_BUS 0x0U