summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/Platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/PlatformPei/Platform.c')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 9c013613a1..fd8eccaf3e 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -184,14 +184,13 @@ MemMapInitialization (
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
- // the base of the 32-bit PCI host aperture.
+ // The 32-bit PCI host aperture is expected to fall between the top of
+ // low RAM and the base of the MMCONFIG area.
//
PciExBarBase = FixedPcdGet64 (PcdPciExpressBaseAddress);
- ASSERT (TopOfLowRam <= PciExBarBase);
+ ASSERT (PciBase < PciExBarBase);
ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB);
- PciBase = (UINT32)(PciExBarBase + SIZE_256MB);
- PciSize = 0xFC000000 - PciBase;
+ PciSize = (UINT32)(PciExBarBase - PciBase);
} else {
PciSize = 0xFC000000 - PciBase;
}