public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
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
Subject: Re: [edk2-devel] [PATCH v3 2/2] OvmfPkg/Bhyve: use static PCI32Base address
Date: Fri, 2 Jul 2021 17:18:19 +0200	[thread overview]
Message-ID: <e5c46b55-3cce-8358-3998-4a0c9553fa55@redhat.com> (raw)
In-Reply-To: <20210701120152.27482-2-c.koehne@beckhoff.com>

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


  parent reply	other threads:[~2021-07-02 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 12:01 [PATCH v3 1/2] OvmfPkg/Bhyve: add USB support Corvin Köhne
2021-07-01 12:01 ` [PATCH v3 2/2] OvmfPkg/Bhyve: use static PCI32Base address Corvin Köhne
2021-07-01 23:46   ` Peter Grehan
2021-07-02 15:18   ` Laszlo Ersek [this message]
2021-07-02 17:05   ` Rebecca Cran
2021-07-01 23:45 ` [PATCH v3 1/2] OvmfPkg/Bhyve: add USB support Peter Grehan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5c46b55-3cce-8358-3998-4a0c9553fa55@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox