mirror of https://github.com/acidanthera/audk.git
PeiInstallPeiMemory should only be called one time.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7867 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2c0bbf4392
commit
3152f167db
|
@ -89,6 +89,17 @@ PeiInstallPeiMemory (
|
|||
DEBUG ((EFI_D_INFO, "PeiInstallPeiMemory MemoryBegin 0x%LX, MemoryLength 0x%LX\n", MemoryBegin, MemoryLength));
|
||||
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
|
||||
|
||||
//
|
||||
// PEI_SERVICE.InstallPeiMemory should only be called one time during whole PEI phase.
|
||||
// If it is invoked more than one time, ASSERT information is given for developer debugging in debug tip and
|
||||
// simply return EFI_SUCESS in release tip to ignore it.
|
||||
//
|
||||
if (PrivateData->PeiMemoryInstalled) {
|
||||
DEBUG ((EFI_D_ERROR, "ERROR: PeiInstallPeiMemory is called more than once!\n"));
|
||||
ASSERT (PrivateData->PeiMemoryInstalled);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
PrivateData->PhysicalMemoryBegin = MemoryBegin;
|
||||
PrivateData->PhysicalMemoryLength = MemoryLength;
|
||||
PrivateData->FreePhysicalMemoryTop = MemoryBegin + MemoryLength;
|
||||
|
|
Loading…
Reference in New Issue