]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/PrePiMemoryAllocationLib: Added dummy FreePages()
authorOlivier Martin <olivier.martin@arm.com>
Wed, 17 Jul 2013 06:24:15 +0000 (06:24 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Jul 2013 06:24:15 +0000 (06:24 +0000)
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

EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c

index 85a32b7362052bcb8c02a7876a2c129b2236e981..c22682a9183d92a9bb90c87b0a9eba63c160012e 100644 (file)
@@ -130,7 +130,33 @@ AllocateAlignedPages (
 }\r
 \r
 \r
+/**\r
+  Frees one or more 4KB pages that were previously allocated with one of the page allocation\r
+  functions in the Memory Allocation Library.\r
+\r
+  Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer.  Buffer\r
+  must have been allocated on a previous call to the page allocation services of the Memory\r
+  Allocation Library.  If it is not possible to free allocated pages, then this function will\r
+  perform no actions.\r
+\r
+  If Buffer was not allocated with a page allocation function in the Memory Allocation Library,\r
+  then ASSERT().\r
+  If Pages is zero, then ASSERT().\r
+\r
+  @param  Buffer                Pointer to the buffer of pages to free.\r
+  @param  Pages                 The number of 4 KB pages to free.\r
 \r
+**/\r
+VOID\r
+EFIAPI\r
+FreePages (\r
+  IN VOID   *Buffer,\r
+  IN UINTN  Pages\r
+  )\r
+{\r
+  // For now, we do not support the ability to free pages in the PrePei Memory Allocator.\r
+  // The allocated memory is lost.\r
+}\r
 \r
 /**\r
   Allocates a buffer of type EfiBootServicesData.\r