diff options
Diffstat (limited to 'MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c')
-rw-r--r-- | MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c index 57a4009461..b1f6157bf5 100644 --- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c @@ -18,6 +18,7 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/PeiServicesLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
@@ -44,14 +45,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;
}
@@ -353,12 +352,9 @@ AllocatePool ( )
{
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;
}
|