diff options
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/MemDetect.c | 25 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 2 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.h | 4 |
3 files changed, 20 insertions, 11 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 851850b50d..26e4feafe8 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -122,19 +122,19 @@ PublishPeiMemory ( /**
- Peform Memory Detection
-
- @return Top of memory
+ Peform Memory Detection for QEMU / KVM
**/
-EFI_PHYSICAL_ADDRESS
-MemDetect (
+STATIC
+VOID
+QemuInitializeRam (
+ VOID
)
{
UINT64 LowerMemorySize;
UINT64 UpperMemorySize;
- DEBUG ((EFI_D_ERROR, "MemDetect called\n"));
+ DEBUG ((EFI_D_INFO, "%a called\n", __FUNCTION__));
//
// Determine total memory size available
@@ -157,7 +157,16 @@ MemDetect ( MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
}
-
- return LowerMemorySize;
}
+/**
+ Publish system RAM and reserve memory regions
+
+**/
+VOID
+InitializeRamRegions (
+ VOID
+ )
+{
+ QemuInitializeRam ();
+}
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index c48fe974be..90be3c33ad 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -355,7 +355,7 @@ InitializePlatform ( PublishPeiMemory ();
if (!mXen) {
- MemDetect ();
+ InitializeRamRegions ();
}
if (mXen) {
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index 48996ab7ff..5cce7961bc 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -69,8 +69,8 @@ GetSystemMemorySizeBelow4gb ( VOID
);
-EFI_PHYSICAL_ADDRESS
-MemDetect (
+VOID
+InitializeRamRegions (
VOID
);
|