From: jljusten Date: Thu, 22 May 2008 23:46:47 +0000 (+0000) Subject: edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationL... X-Git-Tag: edk2-stable201903~20935 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=bfe03264cb673923eef847a0286860b1184a462e 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 --- diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c index b85575bfdd..52f4a0fb79 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c @@ -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; }