]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/UefiMemoryLib/MemLib.c
Update BASE_NAME to match the file names of the shell binaries so the INF files can...
[mirror_edk2.git] / MdePkg / Library / UefiMemoryLib / MemLib.c
CommitLineData
dd51a993 1/** @file\r
cc4e0485 2 Base Memory Library functions implementation bases on Uefi Boot Service.\r
dd51a993 3\r
19388d29
HT
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
dd51a993 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
dd51a993 13**/\r
14\r
15#include "MemLibInternals.h"\r
16\r
f80b0830 17/**\r
18 Copies a source buffer to a destination buffer, and returns the destination buffer.\r
19\r
20 This function wraps the gBS->CopyMem().\r
21\r
22 @param DestinationBuffer Pointer to the destination buffer of the memory copy.\r
23 @param SourceBuffer Pointer to the source buffer of the memory copy.\r
24 @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer.\r
25\r
26 @return DestinationBuffer.\r
27\r
28**/\r
dd51a993 29VOID *\r
30EFIAPI\r
31InternalMemCopyMem (\r
32 OUT VOID *Destination,\r
33 IN CONST VOID *Source,\r
34 IN UINTN Length\r
35 )\r
36{\r
37 gBS->CopyMem (Destination, (VOID*)Source, Length);\r
38 return Destination;\r
39}\r
40\r
f80b0830 41/**\r
42 Fills a target buffer with a byte value, and returns the target buffer.\r
43\r
44 This function wraps the gBS->SetMem().\r
45\r
46 @param Buffer Memory to set.\r
42eedea9 47 @param Size Number of bytes to set.\r
f80b0830 48 @param Value Value of the set operation.\r
49\r
50 @return Buffer.\r
51\r
52**/\r
dd51a993 53VOID *\r
54EFIAPI\r
55InternalMemSetMem (\r
56 OUT VOID *Buffer,\r
57 IN UINTN Size,\r
58 IN UINT8 Value\r
59 )\r
60{\r
61 gBS->SetMem (Buffer, Size, Value);\r
62 return Buffer;\r
63}\r