]> git.proxmox.com Git - mirror_edk2.git/commitdiff
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationL...
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 May 2008 23:46:47 +0000 (23:46 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 May 2008 23:46:47 +0000 (23:46 +0000)
  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

EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c

index b85575bfdd0ed3e904516549b3c848cdb2d01ce7..52f4a0fb796dc55b3a76010fc137994d180cb473 100644 (file)
@@ -43,14 +43,12 @@ InternalAllocatePages (
 {\r
   EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  Memory; \r
-  EFI_PEI_SERVICES      **PeiServices;\r
 \r
   if (Pages == 0) {\r
     return NULL;\r
   }\r
 \r
-  PeiServices = GetPeiServicesTablePointer ();\r
-  Status = ((*PeiServices)->AllocatePages) (PeiServices, MemoryType, Pages, &Memory);\r
+  Status = PeiServicesAllocatePages (MemoryType, Pages, &Memory);\r
   if (EFI_ERROR (Status)) {\r
     Memory = 0;\r
   }\r
@@ -352,12 +350,9 @@ GlueAllocatePool (
   )\r
 {\r
   EFI_STATUS        Status;\r
-  EFI_PEI_SERVICES  **PeiServices;\r
   VOID              *Buffer;\r
   \r
-  PeiServices = GetPeiServicesTablePointer ();\r
-\r
-  Status = ((*PeiServices)->AllocatePool) (PeiServices, AllocationSize, &Buffer);\r
+  Status = PeiServicesAllocatePool (AllocationSize, &Buffer);\r
   if (EFI_ERROR (Status)) {\r
     Buffer = NULL;\r
   }\r