]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/PeiMemoryLib/MemLib.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / PeiMemoryLib / MemLib.c
CommitLineData
dd51a993 1/** @file\r
cc4e0485 2 Base Memory Library functions implementation bases on PeiServcie.\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 gPS->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 (*GetPeiServicesTablePointer ())->CopyMem (\r
38 Destination,\r
39 (VOID*)Source,\r
40 Length\r
41 );\r
42 return Destination;\r
43}\r
44\r
f80b0830 45/**\r
46 Fills a target buffer with a byte value, and returns the target buffer.\r
47\r
48 This function wraps the gPS->SetMem ().\r
49 \r
50 @param Buffer Memory to set.\r
42eedea9 51 @param Size Number of bytes to set.\r
f80b0830 52 @param Value Value of the set operation.\r
53\r
54 @return Buffer.\r
55\r
56**/\r
dd51a993 57VOID *\r
58EFIAPI\r
59InternalMemSetMem (\r
60 OUT VOID *Buffer,\r
61 IN UINTN Size,\r
62 IN UINT8 Value\r
63 )\r
64{\r
65 (*GetPeiServicesTablePointer ())->SetMem (\r
66 Buffer,\r
67 Size,\r
68 Value\r
69 );\r
70 return Buffer;\r
71}\r