Date
1 - 4 of 4
[PATCH v3 2/2] OvmfPkg/Bhyve: use static PCI32Base address
Corvin Köhne
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 --- OvmfPkg/Bhyve/BhyveX64.dsc | 4 ++-- OvmfPkg/Bhyve/PlatformPei/Platform.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index a0a2071b86..c435dadc0a 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -537,8 +537,8 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0 gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize|0x0 - gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0 - gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0 + gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0xC0000000 + gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x20000000 gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x800000000 diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c index 3a414ffcb7..f38e74ccfc 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; } // -- 2.11.0 Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075
|
|
Peter Grehan
Reviewed-by: Peter Grehan <grehan@freebsd.org>
toggle quoted messageShow quoted text
It's neccessary to allocate a Graphics Stolen Memory area to enable
|
|
Laszlo Ersek
On 07/01/21 14:01, Corvin Köhne wrote:
It's neccessary to allocate a Graphics Stolen Memory area to enablePlease post a new version (with Peter's R-b picked up), with the following updates: - The commit messages (on both patches) seem to have some UTF-8 garbage at the start. Please remove that. - In the above "PcdGet64(PcdPciMmio32Base)" call, a space character is missing right before the opening paren. (I could fix it up, but I'd like contributors to get used to that space character.) Rebecca, any comments? An ACK would be appreciated (for v4). Thanks, Laszlo
|
|
Rebecca Cran
Acked-by: Rebecca Cran <rebecca@bsdio.com>
toggle quoted messageShow quoted text
On 7/1/21 6:01 AM, Corvin Köhne wrote:
It's neccessary to allocate a Graphics Stolen Memory area to enable
|
|