diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 743044d29e..d4df0c60e7 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -384,9 +384,7 @@ InitializePlatform ( PublishPeiMemory (); - if (mXen) { - PcdSetBool (PcdPciDisableBusEnumeration, TRUE); - } else { + if (!mXen) { TopOfMemory = MemDetect (); } diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index 3a2e358661..1886326f20 100644 --- a/OvmfPkg/PlatformPei/Xen.c +++ b/OvmfPkg/PlatformPei/Xen.c @@ -225,5 +225,7 @@ InitializeXen ( // AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000); + PcdSetBool (PcdPciDisableBusEnumeration, TRUE); + return EFI_SUCCESS; }