From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
Gerd Hoffmann <kraxel@redhat.com>,
Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH 2/4] OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching
Date: Thu, 16 May 2019 09:53:55 +0200 [thread overview]
Message-ID: <CAKv+Gu8GnYVYi9Sfs=M_L2+JV=pjD7VgDcaHWjbMsL+98nCrpg@mail.gmail.com> (raw)
In-Reply-To: <20190504000716.7525-3-lersek@redhat.com>
On Sat, 4 May 2019 at 02:07, Laszlo Ersek <lersek@redhat.com> wrote:
>
> In the MemMapInitialization() function, we currently assign PciBase
> different values, on both branches of the board type check. Hoist the
> PciBase assignment from the i440fx branch in front of the "if". This is a
> no-op for the i440fx branch. On the q35 branch, we overwrite this value,
> hence the change is a no-op on q35 as well.
>
> This is another refactoring for simplifying the rest of this series.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> OvmfPkg/PlatformPei/Platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> index 5e0a15484230..9c013613a1a0 100644
> --- a/OvmfPkg/PlatformPei/Platform.c
> +++ b/OvmfPkg/PlatformPei/Platform.c
> @@ -181,6 +181,7 @@ MemMapInitialization (
>
> TopOfLowRam = GetSystemMemorySizeBelow4gb ();
> PciExBarBase = 0;
> + PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;
> if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) {
> //
> // The MMCONFIG area is expected to fall between the top of low RAM and
> @@ -192,7 +193,6 @@ MemMapInitialization (
> PciBase = (UINT32)(PciExBarBase + SIZE_256MB);
> PciSize = 0xFC000000 - PciBase;
> } else {
> - PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;
> PciSize = 0xFC000000 - PciBase;
> }
>
> --
> 2.19.1.3.g30247aa5d201
>
>
next prev parent reply other threads:[~2019-05-16 7:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 0:07 [PATCH 0/4] OvmfPkg/PlatformPei: fix two assertion failures with weird RAM sizes Laszlo Ersek
2019-05-04 0:07 ` [PATCH 1/4] OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly Laszlo Ersek
2019-05-06 11:06 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-05-06 12:04 ` Laszlo Ersek
2019-05-16 7:52 ` Ard Biesheuvel
2019-05-04 0:07 ` [PATCH 2/4] OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching Laszlo Ersek
2019-05-06 11:08 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-05-16 7:53 ` Ard Biesheuvel [this message]
2019-05-04 0:07 ` [PATCH 3/4] OvmfPkg/PlatformPei: reorder the 32-bit PCI hole vs. the PCIEXBAR on q35 Laszlo Ersek
2019-05-16 8:00 ` [edk2-devel] " Ard Biesheuvel
2019-05-16 12:18 ` Laszlo Ersek
2019-05-16 12:24 ` Philippe Mathieu-Daudé
2019-05-16 19:15 ` Laszlo Ersek
2019-05-04 0:07 ` [PATCH 4/4] OvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits clear Laszlo Ersek
2019-05-08 7:33 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-05-08 9:10 ` Laszlo Ersek
2019-05-16 8:05 ` Ard Biesheuvel
2019-05-15 10:36 ` [edk2-devel] [PATCH 0/4] OvmfPkg/PlatformPei: fix two assertion failures with weird RAM sizes Laszlo Ersek
2019-05-15 11:56 ` Leif Lindholm
2019-05-15 12:44 ` Laszlo Ersek
2019-05-15 16:42 ` Michael D Kinney
2019-05-16 19:33 ` Laszlo Ersek
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='CAKv+Gu8GnYVYi9Sfs=M_L2+JV=pjD7VgDcaHWjbMsL+98nCrpg@mail.gmail.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