Skip to content

Commit 639c698

Browse files
xinyunliuacrnsi
authored andcommitted
dm: reserve 16M hole for gvt in e820 table
Add 16M@0xDF000000 for GVT usage as below. Currently, use 8M for GOP framebuf, it satisfies display resolution of 1920x1080@32bpp start end size Note [0x 00000000, 0x 000A0000] 640K [0x 000A0000, 0x 00100000] 384K [0x 00100000, 0x 7ff00000] 2G-1M lowmem-1M [0x 80000000, 0x 88000000] 128M [lowmem, +128M] [0x DF000000, 0x E0000000] 16M *gvt* [0x e0000000, 0x100000000] 512M [0x100000000, 0x140000000] 1G *gvt*: [0xDF000000, 0xDF800000] 8M GOP FB [0xDFFFD000, 0XE0000000] 12K opregion Tracked-On: #3624 Signed-off-by: Liu Xinyun <xinyun.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 32d8510 commit 639c698

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

devicemodel/core/sw_load_common.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ static char bootargs[BOOT_ARG_LEN];
5656
* 2: 0x100000 - lowmem RAM lowmem - 1MB
5757
* 3: lowmem - 0x80000000 (reserved) 2GB - lowmem
5858
* 4: 0x80000000 - 0x88000000 (reserved) 128MB
59-
* 5: 0xE0000000 - 0x100000000 MCFG, MMIO 512MB
60-
* 6: 0x100000000 - 0x140000000 64-bit PCI hole 1GB
61-
* 7: 0x140000000 - highmem RAM highmem - 5GB
59+
* 5: 0xDF000000 - 0xE0000000 (reserved) 16MB
60+
* 6: 0xE0000000 - 0x100000000 MCFG, MMIO 512MB
61+
* 7: 0x100000000 - 0x140000000 64-bit PCI hole 1GB
62+
* 8: 0x140000000 - highmem RAM highmem - 5GB
6263
*/
6364
const struct e820_entry e820_default_entries[NUM_E820_ENTRIES] = {
6465
{ /* 0 to video memory */
@@ -92,6 +93,13 @@ const struct e820_entry e820_default_entries[NUM_E820_ENTRIES] = {
9293
.type = E820_TYPE_RESERVED
9394
},
9495

96+
{
97+
/* reserve for GVT */
98+
.baseaddr = 0xDF000000,
99+
.length = 0x1000000,
100+
.type = E820_TYPE_RESERVED
101+
},
102+
95103
{ /* ECFG_BASE to 4GB */
96104
.baseaddr = PCI_EMUL_ECFG_BASE,
97105
.length = (4 * GB) - PCI_EMUL_ECFG_BASE,

devicemodel/include/sw_load.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
#define E820_TYPE_ACPI_NVS 4U /* EFI 10 */
4040
#define E820_TYPE_UNUSABLE 5U /* EFI 8 */
4141

42-
#define NUM_E820_ENTRIES 8
42+
#define NUM_E820_ENTRIES 9
4343
#define LOWRAM_E820_ENTRY 2
44-
#define HIGHRAM_E820_ENTRY 7
44+
#define HIGHRAM_E820_ENTRY 8
4545

4646
/* Defines a single entry in an E820 memory map. */
4747
struct e820_entry {

0 commit comments

Comments
 (0)