From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from Internet2.beckhoff.com (Internet2.beckhoff.com [194.25.186.210]) by mx.groups.io with SMTP id smtpd.web11.5941.1625140956725498548 for ; Thu, 01 Jul 2021 05:02:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: beckhoff.com, ip: 194.25.186.210, mailfrom: c.koehne@beckhoff.com) Received: from 172.17.5.172 by Internet2.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Thu, 01 Jul 2021 12:02:33 GMT Received: from ex07.beckhoff.com (172.17.5.172) by ex07.beckhoff.com (172.17.5.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.8; Thu, 1 Jul 2021 14:02:33 +0200 Received: from NT-MAIL06.beckhoff.com (10.1.0.30) by ex07.beckhoff.com (172.17.5.172) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.2308.8 via Frontend Transport; Thu, 1 Jul 2021 14:02:33 +0200 Received: from CorvinK-NB03.fritz.box (172.17.204.83) by NT-Mail06.beckhoff.com (10.1.0.30) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 1 Jul 2021 14:02:32 +0200 From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: CC: , , , , , , =?UTF-8?q?Corvin=20K=C3=B6hne?= Subject: [PATCH v3 2/2] OvmfPkg/Bhyve: use static PCI32Base address Date: Thu, 1 Jul 2021 14:01:52 +0200 Message-ID: <20210701120152.27482-2-c.koehne@beckhoff.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210701120152.27482-1-c.koehne@beckhoff.com> References: <20210701120152.27482-1-c.koehne@beckhoff.com> MIME-Version: 1.0 Return-Path: C.Koehne@beckhoff.com X-Originating-IP: [172.17.204.83] X-OLX-Disclaimer: Done Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =EF=BB=BFIt's neccessary to allocate a Graphics Stolen Memory area to enabl= e 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 =20 diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformP= ei/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 <=3D MAX_UINT32 - SIZE_256MB); PciBase =3D (UINT32)(PciExBarBase + SIZE_256MB); } else { - PciBase =3D (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam; + PciBase =3D PcdGet64(PcdPciMmio32Base); + if (PciBase =3D=3D 0) + PciBase =3D (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam; } =20 // --=20 2.11.0 Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Bec= khoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075