summaryrefslogtreecommitdiff
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-02-01 21:22:48 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-02-01 21:22:48 +0000
commitc034906e107080a55361693964d3c18ba9ffda66 (patch)
treebd4d6fd15727be322c8f29545d5d78bf00ff6d33 /OvmfPkg/PlatformPei
parent4b455f7bf0da7ab11a6366a1ab9ac3c8905411a4 (diff)
downloadedk2-platforms-c034906e107080a55361693964d3c18ba9ffda66.tar.xz
OvmfPkg/PlatformPei: Add InitializeRamRegions function
In the next commit we will update the Xen boot path to also use this function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15206 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c25
-rw-r--r--OvmfPkg/PlatformPei/Platform.c2
-rw-r--r--OvmfPkg/PlatformPei/Platform.h4
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
);