From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web09.11100.1625239106393346011 for ; Fri, 02 Jul 2021 08:18:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cERUh61r; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625239105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjB9+lDNcTnXwGpvxjUfEzxVZc0UKxiZGR5WLTelMsQ=; b=cERUh61rVO9Zh+JFKeH6+5cTYrUMl5qNoGi9xqeoYNnmCA832TmSEC1y5rmu8b0kb8YqYe pVTu3Da7Ju+1O8gliqwOBeGR4oRGZOE5gWMNnc9/d1g3WjmNivYf8vGbS2JQansSpRZrxV QUc6X/ZxvkCg4CgbJ2oyb48q0bZEqCA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-462-QcTmO5jHN0SvKRIV43WcGg-1; Fri, 02 Jul 2021 11:18:24 -0400 X-MC-Unique: QcTmO5jHN0SvKRIV43WcGg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC5B91084F66; Fri, 2 Jul 2021 15:18:22 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-34.ams2.redhat.com [10.36.112.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2ED3F60853; Fri, 2 Jul 2021 15:18:20 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 2/2] OvmfPkg/Bhyve: use static PCI32Base address To: devel@edk2.groups.io, c.koehne@beckhoff.com Cc: p.bruenn@beckhoff.com, grehan@freebsd.org, rebecca@bsdio.com, ardb+tianocore@kernel.org, jordan.l.justen@intel.com References: <20210701120152.27482-1-c.koehne@beckhoff.com> <20210701120152.27482-2-c.koehne@beckhoff.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 2 Jul 2021 17:18:19 +0200 MIME-Version: 1.0 In-Reply-To: <20210701120152.27482-2-c.koehne@beckhoff.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 07/01/21 14:01, Corvin Köhne wrote: > 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; > } > > // > Please 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