The purpose of the service is to publish an interface that allows \r
PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
\r
+ Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap.\r
+ After InstallPeiMemory() is called, PEI will allocate pages within the region\r
+ of memory provided by InstallPeiMemory() service in a best-effort fashion.\r
+ Location-specific allocations are not managed by the PEI foundation code.\r
+\r
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
@param MemoryType The type of memory to allocate.\r
@param Pages The number of contiguous 4 KB pages to allocate.\r
OUT EFI_PHYSICAL_ADDRESS *Memory\r
);\r
\r
+/**\r
+ Frees memory pages.\r
+\r
+ @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+ @param[in] Memory The base physical address of the pages to be freed.\r
+ @param[in] Pages The number of contiguous 4 KB pages to free.\r
+\r
+ @retval EFI_SUCCESS The requested pages were freed.\r
+ @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r
+ @retval EFI_NOT_FOUND The requested memory pages were not allocated with\r
+ AllocatePages().\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FREE_PAGES) (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PHYSICAL_ADDRESS Memory,\r
+ IN UINTN Pages\r
+ );\r
+\r
/**\r
The purpose of this service is to publish an interface that \r
allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3;\r
EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2;\r
EFI_PEI_RESET2_SYSTEM ResetSystem2;\r
+ EFI_PEI_FREE_PAGES FreePages;\r
};\r
\r
\r