summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Bhyve/PlatformPei
diff options
context:
space:
mode:
authorCorvin Köhne <c.koehne@beckhoff.com>2021-07-05 13:08:42 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-07-05 12:12:00 +0000
commit44ced03798d3af47577af3e7a865be33383766d0 (patch)
tree022bfbba98da7158c9b7aa90e7ec136f93161235 /OvmfPkg/Bhyve/PlatformPei
parent1e0c441c922d92dae736f1b47df05373490045ae (diff)
downloadedk2-44ced03798d3af47577af3e7a865be33383766d0.tar.gz
edk2-44ced03798d3af47577af3e7a865be33383766d0.tar.bz2
edk2-44ced03798d3af47577af3e7a865be33383766d0.zip
OvmfPkg/Bhyve: use static PCI32Base address
It's neccessary to allocate a Graphics Stolen Memory area to enable GPU-Passthrough for integrated Intel GPUs. Therefore, use a new memory layout with a static Pci32Baseaddress. Old layout: [... , lowmemlimit] RAM [lowmemlimit, 0xE000 0000] PCI Space New layout: [... , lowmemlimit] RAM [lowmemlimit, gsmbase ] Memory hole (may be absent) [gsmbase , 0xC000 0000] GSM (may be absent) [0xC000 0000, 0xE000 0000] PCI Space Reviewed-by: Peter Grehan <grehan@freebsd.org> Acked-by: Rebecca Cran <rebecca@bsdio.com> Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com> Message-Id: <20210705110842.14088-2-c.koehne@beckhoff.com>
Diffstat (limited to 'OvmfPkg/Bhyve/PlatformPei')
-rw-r--r--OvmfPkg/Bhyve/PlatformPei/Platform.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c
index 3a414ffcb7..d980e3fcb0 100644
--- a/OvmfPkg/Bhyve/PlatformPei/Platform.c
+++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c
@@ -191,7 +191,9 @@ MemMapInitialization (
ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB);
PciBase = (UINT32)(PciExBarBase + SIZE_256MB);
} else {
- PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;
+ PciBase = PcdGet64 (PcdPciMmio32Base);
+ if (PciBase == 0)
+ PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;
}
//