From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.25739.1639489318669943344 for ; Tue, 14 Dec 2021 05:42:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=intel header.b=l9WeQyN1; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639489320; x=1671025320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wBRryus7JkHuYA4im5phZziVMBCCK1GwgzKopO22Nj4=; b=l9WeQyN12eii0P3UZH9G5kgQJiXncyBOBxwvoZsFzOK3njUQR7wP662D 7eX7Nz3Qsy2KRfqN2SsVEKa/8/ipnEGr2J64rBstxWCI1peRHPaEX3Oxx Ea1OyZ2XNxUwrgcBYMzWH2ohmktkaAk5Fpon51PjYZEXJX/X2+qVvGq1+ FnsqnW8BFeUAaidD9s7uvjm9cnkICIHz0B3jYTr1bmyNDsky5dzpbDu/k dIMvYAadM8OSPxFtONeHm2r4jtvw9KCd8XJgOsGi8FwJRNv5f4s2qtKc3 ibUdRAw3y/pMw02SIzJby6pzD++6Uks/rn40vt1mZuyHt79uZPaX7mmFk A==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="218993596" X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="218993596" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2021 05:41:54 -0800 X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="465094063" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.30.115]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2021 05:41:51 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Michael D Kinney , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann , Leif Lindholm , Ard Biesheuvel , Abner Chang , Daniel Schaefer Subject: [PATCH 03/10] EmbeddedPkg/MemoryAllocationLib: Add null stub for AllocateCopyPool Date: Tue, 14 Dec 2021 21:41:19 +0800 Message-Id: <20211214134126.869-4-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20211214134126.869-1-min.m.xu@intel.com> References: <20211214134126.869-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Signed-off-by: Min Xu --- .../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