]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/PeiMemoryLib/MemLib.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / PeiMemoryLib / MemLib.c
... / ...
CommitLineData
1/** @file\r
2 Base Memory Library functions implementation bases on PeiServcie.\r
3\r
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include "MemLibInternals.h"\r
10\r
11/**\r
12 Copies a source buffer to a destination buffer, and returns the destination buffer.\r
13\r
14 This function wraps the gPS->CopyMem ().\r
15\r
16 @param DestinationBuffer The pointer to the destination buffer of the memory copy.\r
17 @param SourceBuffer The pointer to the source buffer of the memory copy.\r
18 @param Length The number of bytes to copy from SourceBuffer to DestinationBuffer.\r
19\r
20 @return DestinationBuffer.\r
21\r
22**/\r
23VOID *\r
24EFIAPI\r
25InternalMemCopyMem (\r
26 OUT VOID *Destination,\r
27 IN CONST VOID *Source,\r
28 IN UINTN Length\r
29 )\r
30{\r
31 (*GetPeiServicesTablePointer ())->CopyMem (\r
32 Destination,\r
33 (VOID *)Source,\r
34 Length\r
35 );\r
36 return Destination;\r
37}\r
38\r
39/**\r
40 Fills a target buffer with a byte value, and returns the target buffer.\r
41\r
42 This function wraps the gPS->SetMem ().\r
43\r
44 @param Buffer Memory to set.\r
45 @param Size The number of bytes to set.\r
46 @param Value Value of the set operation.\r
47\r
48 @return Buffer.\r
49\r
50**/\r
51VOID *\r
52EFIAPI\r
53InternalMemSetMem (\r
54 OUT VOID *Buffer,\r
55 IN UINTN Size,\r
56 IN UINT8 Value\r
57 )\r
58{\r
59 (*GetPeiServicesTablePointer ())->SetMem (\r
60 Buffer,\r
61 Size,\r
62 Value\r
63 );\r
64 return Buffer;\r
65}\r