RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429

This function is a null stub to make the build success.

Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Brijesh Singh <brijesh.si...@amd.com>
Cc: Erdem Aktas <erdemak...@google.com>
Cc: James Bottomley <j...@linux.ibm.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Tom Lendacky <thomas.lenda...@amd.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Leif Lindholm <l...@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Abner Chang <abner.ch...@hpe.com>
Cc: Daniel Schaefer <daniel.schae...@hpe.com>
Signed-off-by: Min Xu <min.m...@intel.com>
---
 .../MemoryAllocationLib.c                     | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c 
b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
index 78f8da5e9527..ddc27150c680 100644
--- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
@@ -220,6 +220,34 @@ AllocateZeroPool (
   return Buffer;
 }
 
+/**
+  Copies a buffer to an allocated buffer of type EfiBootServicesData.
+
+  Allocates the number bytes specified by AllocationSize of type 
EfiBootServicesData, copies
+  AllocationSize bytes from Buffer to the newly allocated buffer, and returns 
a pointer to the
+  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is 
returned.  If there
+  is not enough memory remaining to satisfy the request, then NULL is returned.
+
+  If Buffer is NULL, then ASSERT().
+  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
+
+  @param  AllocationSize        The number of bytes to allocate and zero.
+  @param  Buffer                The buffer to copy to the allocated buffer.
+
+  @return A pointer to the allocated buffer or NULL if allocation fails.
+
+**/
+VOID *
+EFIAPI
+AllocateCopyPool (
+  IN UINTN       AllocationSize,
+  IN CONST VOID  *Buffer
+  )
+{
+  ASSERT (FALSE);
+  return NULL;
+}
+
 /**
   Frees a buffer that was previously allocated with one of the pool allocation 
functions in the
   Memory Allocation Library.
-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84806): https://edk2.groups.io/g/devel/message/84806
Mute This Topic: https://groups.io/mt/87720795/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to