mirror of https://github.com/acidanthera/audk.git
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c:
Merge from edk2\MdePkg\Library\PeiMemoryAllocationLib\MemoryAllocationLib.c to achieve better support for additional compilers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5280 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
bd2d157b9d
commit
bfe03264cb
|
@ -43,14 +43,12 @@ InternalAllocatePages (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_PHYSICAL_ADDRESS Memory;
|
||||
EFI_PEI_SERVICES **PeiServices;
|
||||
|
||||
if (Pages == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
Status = ((*PeiServices)->AllocatePages) (PeiServices, MemoryType, Pages, &Memory);
|
||||
Status = PeiServicesAllocatePages (MemoryType, Pages, &Memory);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Memory = 0;
|
||||
}
|
||||
|
@ -352,12 +350,9 @@ GlueAllocatePool (
|
|||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_PEI_SERVICES **PeiServices;
|
||||
VOID *Buffer;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
|
||||
Status = ((*PeiServices)->AllocatePool) (PeiServices, AllocationSize, &Buffer);
|
||||
Status = PeiServicesAllocatePool (AllocationSize, &Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Buffer = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue