MdeModule PeiCore: Support pre memory page allocation

Support pre memory page allocation.
Support FreePages.
Allocation made prior to permanent memory will be
migrated to permanent memory and the HOB updated.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <Ruiyu.Ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Star Zeng
2017-02-23 18:16:09 +08:00
parent 9f43484ce9
commit b2374cecb0
5 changed files with 646 additions and 53 deletions

View File

@ -64,7 +64,8 @@ EFI_PEI_SERVICES gPs = {
PeiRegisterForShadow,
PeiFfsFindSectionData3,
PeiFfsGetFileInfo2,
PeiResetSystem2
PeiResetSystem2,
PeiFreePages,
};
/**
@ -231,6 +232,11 @@ PeiCore (
HandoffInformationTable->EfiFreeMemoryTop = OldCoreData->FreePhysicalMemoryTop;
HandoffInformationTable->EfiFreeMemoryBottom = HandoffInformationTable->EfiEndOfHobList + sizeof (EFI_HOB_GENERIC_HEADER);
//
// We need convert MemoryBaseAddress in memory allocation HOBs
//
ConvertMemoryAllocationHobs (OldCoreData);
//
// We need convert the PPI descriptor's pointer
//