DM: gvt: Identical mapping for GPU DSM

Windows graphic driver obtains DSM address from in-BAR mmio register
which has passthroughed. Not like the other platforms obtained from
pci configure space register which has virtualized. So TGL has to
keep identical mapping to avoid trap mmio BAR to do the emulation.

To keep simple, this patch hardcode the TGL DSM region in vE820
table, this will cause memory waste here. In the near future, we
need refine the entire vE820 logic as it is hard to maintained
due to many reserved regions have introduced in recently.

Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Tracked-On: #5461
This commit is contained in:
Sun Peng
2020-11-03 04:07:39 +00:00
committed by wenlingz
parent b02776a9d4
commit 73f21a41ad
3 changed files with 90 additions and 42 deletions

View File

@@ -39,9 +39,9 @@
#define E820_TYPE_ACPI_NVS 4U /* EFI 10 */
#define E820_TYPE_UNUSABLE 5U /* EFI 8 */
#define NUM_E820_ENTRIES 6
#define NUM_E820_ENTRIES 9
#define LOWRAM_E820_ENTRY 1
#define HIGHRAM_E820_ENTRY 5
#define HIGHRAM_E820_ENTRY 6
/* Defines a single entry in an E820 memory map. */
struct e820_entry {