diff options
author | Laszlo Ersek <lersek@redhat.com> | 2019-01-22 20:44:47 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-05-16 21:18:52 +0200 |
commit | 9a2e8d7c65ef7f39c6754d27e52954b616bc6628 (patch) | |
tree | e07a0b9d138c29bca410c5b73fd8325b737d2bf8 /OvmfPkg/PlatformPei | |
parent | 60e95bf5094fbb9b728729ccfaf32184b3662317 (diff) | |
download | edk2-9a2e8d7c65ef7f39c6754d27e52954b616bc6628.zip edk2-9a2e8d7c65ef7f39c6754d27e52954b616bc6628.tar.gz edk2-9a2e8d7c65ef7f39c6754d27e52954b616bc6628.tar.bz2 |
OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching
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.tianocore.org/show_bug.cgi?id=1814
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 5e0a154..9c01361 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;
}
|