From nobody Sat May 18 12:29:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77044+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77044+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1624514745; cv=none; d=zohomail.com; s=zohoarc; b=kbdtgYXocnLMWY7yPIEXfICbIEZJY+AKsT9eHycdJAL3n8AWr3n72ldcULRgAsHx9RLfOfnR26htu/283VTA8si9l+0BG4GMpUmKbbP5sdZA/hZojybm/LQnU5YR0d6EBwpFTYTDVOGlspvYCIvfob3QpbBSovRZOMuWpUs10qA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624514745; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=pjDvtvVfLRBLAwo8UJIAuAC7fTZbohyUtkzUwAmXT9I=; b=HgRZCagyLiZqCRA4yC33+hChxtL8esRf4gB5fMFte1oQoQp41+lFuLcbYzLPawzlpF5YxNbwFBSaJ5cHt9aMeQUp6cP/yodmWmUk1ozEr2RDd33988GEpxUobyzZP+p0A6fwrWCXAyezYdhJ1b25i0NI5qtSCW9KKfvJnsyvW4E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77044+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624514745446536.9183491750052; Wed, 23 Jun 2021 23:05:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DvMZYY1788612x3vkxqtzkKp; Wed, 23 Jun 2021 23:05:45 -0700 X-Received: from netsrv01.beckhoff.com (netsrv01.beckhoff.com [62.159.14.10]) by mx.groups.io with SMTP id smtpd.web11.3596.1624514739253479643 for ; Wed, 23 Jun 2021 23:05:39 -0700 X-Received: from 172.17.5.173 by netsrv01.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Thu, 24 Jun 2021 06:05:38 GMT X-Received: from ex05.beckhoff.com (172.17.2.171) by ex08.beckhoff.com (172.17.5.173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Thu, 24 Jun 2021 08:05:36 +0200 X-Received: from NT-MAIL06.beckhoff.com (10.1.0.30) by ex05.beckhoff.com (172.17.2.171) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.2242.10 via Frontend Transport; Thu, 24 Jun 2021 08:05:36 +0200 X-Received: from CorvinK-NB03.fritz.box (172.17.204.62) by NT-Mail06.beckhoff.com (10.1.0.30) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 24 Jun 2021 08:05:36 +0200 From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: CC: , , , , , , =?UTF-8?q?Corvin=20K=C3=B6hne?= Subject: [edk2-devel] [PATCH v2 1/2] OvmfPkg/Bhyve: add USB support Date: Thu, 24 Jun 2021 08:05:15 +0200 Message-ID: <20210624060516.211-2-c.koehne@beckhoff.com> In-Reply-To: <20210624060516.211-1-c.koehne@beckhoff.com> References: <20210624060516.211-1-c.koehne@beckhoff.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.62] X-OLX-Disclaimer: Done Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,c.koehne@beckhoff.com X-Gm-Message-State: JiKuJxXAHj27mltKXh1NcbyZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624514745; bh=QVPdpU9s+TgmqakbUh2WxbR4cEfkSInphrC8cT2t7To=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=L69tCtk/o2HjUfAWhAVus7YUed27vav/rtCKGkIcD5Dm8yGfIzPQZlCUbtmJJIHuWRS 523IwxRabCm2Cus2w7f1YCArdRpLV5cxZj7x6XDw3czHqY6t2KgPXEW5rA/8kvwjEj5MI wu/3vJsEG4HuxsJNmXnPjrIu+266Gu+9rEE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" =EF=BB=BFAn USB driver is required to use a keyboard or mouse while install= ing an OS or while in a bootloader menu like grub when using GPU + USB Passthrough. --- OvmfPkg/Bhyve/BhyveX64.dsc | 11 +++++++++++ OvmfPkg/Bhyve/BhyveX64.fdf | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index d8792812ab..22a6f11069 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -163,6 +163,7 @@ FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeS= ecurityManagementLib.inf + UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVar= iablesLib.inf QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibNull.inf QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf @@ -777,6 +778,16 @@ !endif OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 + # + # Usb Support + # + MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf + MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf + MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf + MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf + MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + !ifdef $(CSM_ENABLE) IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf { diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf index 3eff36dac1..f081b82137 100644 --- a/OvmfPkg/Bhyve/BhyveX64.fdf +++ b/OvmfPkg/Bhyve/BhyveX64.fdf @@ -291,6 +291,16 @@ INF MdeModulePkg/Logo/LogoDxe.inf !include NetworkPkg/Network.fdf.inc INF OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 +# +# Usb Support +# +INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf +INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf +INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf +INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf +INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf +INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + !ifdef $(CSM_ENABLE) INF IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf !endif --=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 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77044): https://edk2.groups.io/g/devel/message/77044 Mute This Topic: https://groups.io/mt/83755216/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 18 12:29:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77045+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77045+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1624514741; cv=none; d=zohomail.com; s=zohoarc; b=iHuqinaSTyZ2rOXQNay6ilEnu5/ru5fKSfHg/4QuKzo0uPfdHso1DYGjjIk0P2c5ZY0ry+KSD/hh4WOyKI5PWUUK2/TP/dQJuZ0ehUevwGkIk4HEUmFrSWq3jTLMmK6hfBaM+pj9XYJ2NnoS37KPao53H1PyDuTWLoUE4PJUzCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624514741; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=WZsBbZ0uqL9rYKCEU2W8lSsprjfeX5fqJienKcqCwb8=; b=SHLOvMW45P5+2oIVt3n09OBi9Tic5AXziUIyTwwIDb2TxCdF/nJN5/iv1rgbs2KrvEVmDO4rTw9M/s+JiB/AW0DI55mpVZnE1WeRBSfruDZ7B4tk8MCTLWeX+uy2QIXKHfb0sa1jXKC5BdYxLGs1dpr8uJypDONX6fhVSFR9wNk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77045+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 162451474124294.3239083493396; Wed, 23 Jun 2021 23:05:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DZwMYY1788612x6YyzPlhE2q; Wed, 23 Jun 2021 23:05:40 -0700 X-Received: from netsrv01.beckhoff.com (netsrv01.beckhoff.com [62.159.14.10]) by mx.groups.io with SMTP id smtpd.web11.3597.1624514739748655688 for ; Wed, 23 Jun 2021 23:05:40 -0700 X-Received: from 172.17.5.63 by netsrv01.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Thu, 24 Jun 2021 06:05:38 GMT X-Received: from ex04.beckhoff.com (172.17.5.170) by ex02.beckhoff.com (172.17.5.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Thu, 24 Jun 2021 08:05:37 +0200 X-Received: from NT-MAIL06.beckhoff.com (10.1.0.30) by ex04.beckhoff.com (172.17.5.170) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.2242.10 via Frontend Transport; Thu, 24 Jun 2021 08:05:37 +0200 X-Received: from CorvinK-NB03.fritz.box (172.17.204.62) by NT-Mail06.beckhoff.com (10.1.0.30) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 24 Jun 2021 08:05:37 +0200 From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: CC: , , , , , , =?UTF-8?q?Corvin=20K=C3=B6hne?= Subject: [edk2-devel] [PATCH v2 2/2] OvmfPkg/Bhyve: use static PCI32Base address Date: Thu, 24 Jun 2021 08:05:16 +0200 Message-ID: <20210624060516.211-3-c.koehne@beckhoff.com> In-Reply-To: <20210624060516.211-1-c.koehne@beckhoff.com> References: <20210624060516.211-1-c.koehne@beckhoff.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.62] X-OLX-Disclaimer: Done Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,c.koehne@beckhoff.com X-Gm-Message-State: sww5RxaYLoiAHayKGgkJkPq2x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624514740; bh=eKLaDbd2/+kDtLwRUO3Si2XT8BZk+ULvK3dR883VtWA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=i7JDotQ9g1idFIH6vT77fOHEDFNzbRU1Q15zd3Z04pSsC+j18pD7GLt8BoNdex+4SVh eSxMYi1QczbzRyd0mGAreZHIIRx409b3dV8AJFEhkSq5mcl84ldwFw5gQPTzbbI+cJdfn FNolJ+O7cak9Q1CIkg8KMylOVGf3EwGIVI4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" =EF=BB=BFIt'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 22a6f11069..b678029b40 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 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77045): https://edk2.groups.io/g/devel/message/77045 Mute This Topic: https://groups.io/mt/83755217/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-