X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FPlatformPei%2FPlatform.c;h=9c013613a1a0b35517bd5b7da039a5ede5c304b8;hp=fd8eccaf3e50cc133cfc1acb3adb949afc324fa1;hb=eb4d62b0779c3a5766174e4373c95a8b6a967cb7;hpb=305cd4f783fe522230677677d17ae7adc85ebc4b diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index fd8eccaf3e..9c013613a1 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -184,13 +184,14 @@ MemMapInitialization ( PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam; if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { // - // The 32-bit PCI host aperture is expected to fall between the top of - // low RAM and the base of the MMCONFIG area. + // The MMCONFIG area is expected to fall between the top of low RAM and + // the base of the 32-bit PCI host aperture. // PciExBarBase = FixedPcdGet64 (PcdPciExpressBaseAddress); - ASSERT (PciBase < PciExBarBase); + ASSERT (TopOfLowRam <= PciExBarBase); ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB); - PciSize = (UINT32)(PciExBarBase - PciBase); + PciBase = (UINT32)(PciExBarBase + SIZE_256MB); + PciSize = 0xFC000000 - PciBase; } else { PciSize = 0xFC000000 - PciBase; }