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 <[email protected]> --- OvmfPkg/PlatformPei/MemDetect.c | 25 +++++++++++++++++-------- OvmfPkg/PlatformPei/Platform.c | 2 +- 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 851850b..26e4fea 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 395ffaf..a17f636 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 48996ab..5cce796 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -69,8 +69,8 @@ GetSystemMemorySizeBelow4gb ( VOID ); -EFI_PHYSICAL_ADDRESS -MemDetect ( +VOID +InitializeRamRegions ( VOID ); -- 1.8.5.3 ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
