diff options
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/MemDetect.c | 7 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 26e4feafe8..b11631127b 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -168,5 +168,10 @@ InitializeRamRegions ( VOID
)
{
- QemuInitializeRam ();
+ if (!mXen) {
+ QemuInitializeRam ();
+ } else {
+ DEBUG ((EFI_D_INFO, "Using memory map provided by Xen\n"));
+ XenPublishRamRegions ();
+ }
}
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 90be3c33ad..a7221b317b 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -213,8 +213,6 @@ MemMapInitialization ( AddIoMemoryBaseSizeHob (0xFEC00000, SIZE_4KB);
AddIoMemoryBaseSizeHob (0xFED00000, SIZE_1KB);
AddIoMemoryBaseSizeHob (PcdGet32(PcdCpuLocalApicBaseAddress), SIZE_1MB);
- } else {
- XenPublishRamRegions ();
}
}
@@ -354,9 +352,7 @@ InitializePlatform ( PublishPeiMemory ();
- if (!mXen) {
- InitializeRamRegions ();
- }
+ InitializeRamRegions ();
if (mXen) {
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
|