diff options
author | Olivier Martin <olivier.martin@arm.com> | 2013-07-17 06:24:15 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-07-17 06:24:15 +0000 |
commit | 0b342ffb76c320e56c72eeed3d877415659c252b (patch) | |
tree | ff957eb369b94c3079aa32111ce9349cc6a9cd24 /EmbeddedPkg | |
parent | f93f248a78a2c73114641c27042c16f6593dc5dc (diff) | |
download | edk2-platforms-0b342ffb76c320e56c72eeed3d877415659c252b.tar.xz |
EmbeddedPkg/PrePiMemoryAllocationLib: Added dummy FreePages()
This function is exposed by the MemoryAllocationLib header.
A dummy FreePages() function has been added to fix modules depending on
this library and this function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14478 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r-- | EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c index 85a32b7362..c22682a918 100644 --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c @@ -130,7 +130,33 @@ AllocateAlignedPages ( }
+/**
+ Frees one or more 4KB pages that were previously allocated with one of the page allocation
+ functions in the Memory Allocation Library.
+
+ Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
+ must have been allocated on a previous call to the page allocation services of the Memory
+ Allocation Library. If it is not possible to free allocated pages, then this function will
+ perform no actions.
+
+ If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
+ then ASSERT().
+ If Pages is zero, then ASSERT().
+
+ @param Buffer Pointer to the buffer of pages to free.
+ @param Pages The number of 4 KB pages to free.
+**/
+VOID
+EFIAPI
+FreePages (
+ IN VOID *Buffer,
+ IN UINTN Pages
+ )
+{
+ // For now, we do not support the ability to free pages in the PrePei Memory Allocator.
+ // The allocated memory is lost.
+}
/**
Allocates a buffer of type EfiBootServicesData.
|