]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly
authorLaszlo Ersek <lersek@redhat.com>
Tue, 22 Jan 2019 19:37:31 +0000 (20:37 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 16 May 2019 19:18:41 +0000 (21:18 +0200)
In the MemMapInitialization() function, we currently have a common
PciSize assignment, shared between i440fx and q35. In order to simplify
the rest of this series, lift and duplicate the assignment identically to
both board-specific branches.

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>
OvmfPkg/PlatformPei/Platform.c

index 0876316eefbc7643aade7f8b1028a3ddd7e87fb9..5e0a15484230607876334c14e9e1c1db093b1d9e 100644 (file)
@@ -190,8 +190,10 @@ MemMapInitialization (
       ASSERT (TopOfLowRam <= PciExBarBase);\r
       ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB);\r
       PciBase = (UINT32)(PciExBarBase + SIZE_256MB);\r
+      PciSize = 0xFC000000 - PciBase;\r
     } else {\r
       PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;\r
+      PciSize = 0xFC000000 - PciBase;\r
     }\r
 \r
     //\r
@@ -207,7 +209,6 @@ MemMapInitialization (
     // 0xFED20000    gap                          896 KB\r
     // 0xFEE00000    LAPIC                          1 MB\r
     //\r
-    PciSize = 0xFC000000 - PciBase;\r
     AddIoMemoryBaseSizeHob (PciBase, PciSize);\r
     PcdStatus = PcdSet64S (PcdPciMmio32Base, PciBase);\r
     ASSERT_RETURN_ERROR (PcdStatus);\r