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
|
Peform Memory Detection for QEMU / KVM
|
||||||
|
|
||||||
@return Top of memory
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_PHYSICAL_ADDRESS
|
STATIC
|
||||||
MemDetect (
|
VOID
|
||||||
|
QemuInitializeRam (
|
||||||
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT64 LowerMemorySize;
|
UINT64 LowerMemorySize;
|
||||||
UINT64 UpperMemorySize;
|
UINT64 UpperMemorySize;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "MemDetect called\n"));
|
DEBUG ((EFI_D_INFO, "%a called\n", __FUNCTION__));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine total memory size available
|
// Determine total memory size available
|
||||||
|
@ -157,7 +157,16 @@ MemDetect (
|
||||||
|
|
||||||
MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
|
MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
return LowerMemorySize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Publish system RAM and reserve memory regions
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
InitializeRamRegions (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
QemuInitializeRam ();
|
||||||
|
}
|
||||||
|
|
|
@ -355,7 +355,7 @@ InitializePlatform (
|
||||||
PublishPeiMemory ();
|
PublishPeiMemory ();
|
||||||
|
|
||||||
if (!mXen) {
|
if (!mXen) {
|
||||||
MemDetect ();
|
InitializeRamRegions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mXen) {
|
if (mXen) {
|
||||||
|
|
|
@ -69,8 +69,8 @@ GetSystemMemorySizeBelow4gb (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_PHYSICAL_ADDRESS
|
VOID
|
||||||
MemDetect (
|
InitializeRamRegions (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue