]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei: Call PublishPeiMemory in one place
[mirror_edk2.git] / OvmfPkg / PlatformPei / Platform.c
index 3dc30973fc060cb991edad15aa0d3aace7f11fc2..10ae623dddbc4b9c09440a740c31d010bc9463dd 100644 (file)
@@ -412,13 +412,21 @@ InitializePlatform (
   EFI_PHYSICAL_ADDRESS  TopOfMemory;\r
   UINT32 XenLeaf;\r
 \r
+  TopOfMemory = 0;\r
+\r
   DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));\r
 \r
   DebugDumpCmos ();\r
 \r
   XenLeaf = XenDetect ();\r
 \r
-  TopOfMemory = MemDetect ();\r
+  PublishPeiMemory ();\r
+\r
+  if (XenLeaf != 0) {\r
+    PcdSetBool (PcdPciDisableBusEnumeration, TRUE);\r
+  } else {\r
+    TopOfMemory = MemDetect ();\r
+  }\r
 \r
   if (XenLeaf != 0) {\r
     DEBUG ((EFI_D_INFO, "Xen was detected\n"));\r
@@ -429,7 +437,11 @@ InitializePlatform (
 \r
   PeiFvInitialization ();\r
 \r
-  MemMapInitialization (TopOfMemory);\r
+  if (XenLeaf != 0) {\r
+    XenMemMapInitialization ();\r
+  } else {\r
+    MemMapInitialization (TopOfMemory);\r
+  }\r
 \r
   MiscInitialization ();\r
 \r