summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/PeiMemoryAllocationLib
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 06:11:47 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 06:11:47 +0000
commit1c280088ec83160a5f190b3d0ba796b224ee23b3 (patch)
treebbaa878c892110bb7ab4201a50aaeaf7f3762afc /MdePkg/Library/PeiMemoryAllocationLib
parente1001af1d40370ff40cece775aaf10a2f8a0414e (diff)
downloadedk2-1c280088ec83160a5f190b3d0ba796b224ee23b3.tar.gz
edk2-1c280088ec83160a5f190b3d0ba796b224ee23b3.tar.bz2
edk2-1c280088ec83160a5f190b3d0ba796b224ee23b3.zip
Merge the PI enabling works from the branch
First round of PI enabling work: 1) PiPeiCis changes (CONST, EFI_PEI_FILE_HANDLE.. etc) 2) Make use of FirmwareVolume 2 protocol. 3) Verified for Nt32Pkg and real platform for S3. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3772 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiMemoryAllocationLib')
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c10
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf1
2 files changed, 4 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;
}
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf b/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
index 3a867a3345..6001d6a5f5 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
+++ b/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
@@ -43,4 +43,5 @@
DebugLib
BaseMemoryLib
PeiServicesTablePointerLib
+ PeiServicesLib