mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
4b455f7bf0
commit
c034906e10
|
@ -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 ();
|
||||
}
|
||||
|
|
|
@ -355,7 +355,7 @@ InitializePlatform (
|
|||
PublishPeiMemory ();
|
||||
|
||||
if (!mXen) {
|
||||
MemDetect ();
|
||||
InitializeRamRegions ();
|
||||
}
|
||||
|
||||
if (mXen) {
|
||||
|
|
|
@ -69,8 +69,8 @@ GetSystemMemorySizeBelow4gb (
|
|||
VOID
|
||||
);
|
||||
|
||||
EFI_PHYSICAL_ADDRESS
|
||||
MemDetect (
|
||||
VOID
|
||||
InitializeRamRegions (
|
||||
VOID
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue