summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2017-03-03 16:45:37 +0800
committerStar Zeng <star.zeng@intel.com>2017-09-04 13:45:47 +0800
commit2132ef05c47bf455eb1da8d3377a29baf0dd64a7 (patch)
treeae97cba1b7471288aab687c77256410a15a0ec99 /MdePkg
parent3f315ecd9a855b6adf73663b70820f1760cf4666 (diff)
downloadedk2-2132ef05c47bf455eb1da8d3377a29baf0dd64a7.tar.gz
edk2-2132ef05c47bf455eb1da8d3377a29baf0dd64a7.tar.bz2
edk2-2132ef05c47bf455eb1da8d3377a29baf0dd64a7.zip
MdePkg PeiMemoryAllocationLib: Update Free(Aligned)Pages
Update Free(Aligned)Pages to use PeiServicesFreePages. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
index a6cce6c235..37273dde56 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
@@ -2,7 +2,7 @@
Support routines for memory allocation routines
based on PeiService for PEI phase drivers.
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -148,10 +148,11 @@ FreePages (
IN UINTN Pages
)
{
+ EFI_STATUS Status;
+
ASSERT (Pages != 0);
- //
- // PEI phase does not support to free pages, so leave it as NOP.
- //
+ Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
+ ASSERT_EFI_ERROR (Status);
}
/**
@@ -444,10 +445,11 @@ FreeAlignedPages (
IN UINTN Pages
)
{
+ EFI_STATUS Status;
+
ASSERT (Pages != 0);
- //
- // PEI phase does not support to free pages, so leave it as NOP.
- //
+ Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
+ ASSERT_EFI_ERROR (Status);
}
/**