summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-06-02 10:42:15 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-06-03 09:06:44 +0000
commitbd10d4e20143ec776c748cc1f5ffcd3812492800 (patch)
tree53570086d5e7f9c66fefac613eef4be16067ef53 /OvmfPkg/PlatformPei
parentad3bafa7d5ec61848e9a86929ba7a7c7cbcc8eff (diff)
downloadedk2-bd10d4e20143ec776c748cc1f5ffcd3812492800.tar.gz
edk2-bd10d4e20143ec776c748cc1f5ffcd3812492800.tar.bz2
edk2-bd10d4e20143ec776c748cc1f5ffcd3812492800.zip
OvmfPkg/Microvm/pcie: mPhysMemAddressWidth tweak
microvm places the 64bit mmio space at the end of the physical address space. So mPhysMemAddressWidth must be correct, otherwise the pci host bridge setup throws an error because it thinks the 64bit mmio window is not addressable. On microvm we can simply use standard cpuid to figure the address width because the host-phys-bits option (-cpu ${name},host-phys-bits=on) is forced to be enabled. Side note: For 'pc' and 'q35' this is not the case for backward compatibility reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index f006755d5f..009db67ee6 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -357,12 +357,12 @@ InitializePlatform (
S3Verification ();
BootModeInitialization (&mPlatformInfoHob);
- AddressWidthInitialization (&mPlatformInfoHob);
//
// Query Host Bridge DID
//
mPlatformInfoHob.HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);
+ AddressWidthInitialization (&mPlatformInfoHob);
MaxCpuCountInitialization (&mPlatformInfoHob);