]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeMemoryLib/MemLibInternals.h
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / DxeMemoryLib / MemLibInternals.h
CommitLineData
dd51a993 1/** @file\r
2 Declaration of internal functions for Base Memory Library.\r
3\r
4 Copyright (c) 2006, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
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 The following BaseMemoryLib instances share the same version of this file:\r
14\r
15 BaseMemoryLib\r
16 BaseMemoryLibMmx\r
17 BaseMemoryLibSse2\r
18 BaseMemoryLibRepStr\r
19 PeiMemoryLib\r
20 DxeMemoryLib\r
21\r
22**/\r
23\r
24#ifndef __MEM_LIB_INTERNALS__\r
25#define __MEM_LIB_INTERNALS__\r
26\r
c892d846 27\r
1ece02b5 28#include <Uefi.h>\r
c892d846 29\r
30\r
1ece02b5 31#include <Library/BaseMemoryLib.h>\r
32#include <Library/DebugLib.h>\r
33#include <Library/UefiBootServicesTableLib.h>\r
34#include <Library/BaseLib.h>\r
35\r
dd51a993 36/**\r
37 Copy Length bytes from Source to Destination.\r
38\r
39 @param Destination Target of copy\r
40 @param Source Place to copy from\r
41 @param Length Number of bytes to copy\r
42\r
43 @return Destination\r
44\r
45**/\r
46VOID *\r
47EFIAPI\r
48InternalMemCopyMem (\r
49 OUT VOID *DestinationBuffer,\r
50 IN CONST VOID *SourceBuffer,\r
51 IN UINTN Length\r
52 );\r
53\r
54/**\r
55 Set Buffer to Value for Size bytes.\r
56\r
57 @param Buffer Memory to set.\r
58 @param Size Number of bytes to set\r
59 @param Value Value of the set operation.\r
60\r
61 @return Buffer\r
62\r
63**/\r
64VOID *\r
65EFIAPI\r
66InternalMemSetMem (\r
67 OUT VOID *Buffer,\r
68 IN UINTN Length,\r
69 IN UINT8 Value\r
70 );\r
71\r
72/**\r
73 Fills a target buffer with a 16-bit value, and returns the target buffer.\r
74\r
75 @param Buffer Pointer to the target buffer to fill.\r
76 @param Length Number of bytes in Buffer to fill.\r
77 @param Value Value with which to fill Length bytes of Buffer.\r
78\r
79 @return Buffer\r
80\r
81**/\r
82VOID *\r
83EFIAPI\r
84InternalMemSetMem16 (\r
85 OUT VOID *Buffer,\r
86 IN UINTN Length,\r
87 IN UINT16 Value\r
88 );\r
89\r
90/**\r
91 Fills a target buffer with a 32-bit value, and returns the target buffer.\r
92\r
93 @param Buffer Pointer to the target buffer to fill.\r
94 @param Length Number of bytes in Buffer to fill.\r
95 @param Value Value with which to fill Length bytes of Buffer.\r
96\r
97 @return Buffer\r
98\r
99**/\r
100VOID *\r
101EFIAPI\r
102InternalMemSetMem32 (\r
103 OUT VOID *Buffer,\r
104 IN UINTN Length,\r
105 IN UINT32 Value\r
106 );\r
107\r
108/**\r
109 Fills a target buffer with a 64-bit value, and returns the target buffer.\r
110\r
111 @param Buffer Pointer to the target buffer to fill.\r
112 @param Length Number of bytes in Buffer to fill.\r
113 @param Value Value with which to fill Length bytes of Buffer.\r
114\r
115 @return Buffer\r
116\r
117**/\r
118VOID *\r
119EFIAPI\r
120InternalMemSetMem64 (\r
121 OUT VOID *Buffer,\r
122 IN UINTN Length,\r
123 IN UINT64 Value\r
124 );\r
125\r
126/**\r
127 Set Buffer to 0 for Size bytes.\r
128\r
129 @param Buffer Memory to set.\r
130 @param Size Number of bytes to set\r
131\r
132 @return Buffer\r
133\r
134**/\r
135VOID *\r
136EFIAPI\r
137InternalMemZeroMem (\r
138 OUT VOID *Buffer,\r
139 IN UINTN Length\r
140 );\r
141\r
142/**\r
143 Compares two memory buffers of a given length.\r
144\r
145 @param DestinationBuffer First memory buffer\r
146 @param SourceBuffer Second memory buffer\r
147 @param Length Length of DestinationBuffer and SourceBuffer memory\r
148 regions to compare. Must be non-zero.\r
149\r
150 @retval 0 if MemOne == MemTwo\r
151\r
152**/\r
153INTN\r
154EFIAPI\r
155InternalMemCompareMem (\r
156 IN CONST VOID *DestinationBuffer,\r
157 IN CONST VOID *SourceBuffer,\r
158 IN UINTN Length\r
159 );\r
160\r
161/**\r
162 Scans a target buffer for an 8-bit value, and returns a pointer to the\r
163 matching 8-bit value in the target buffer.\r
164\r
165 @param Buffer Pointer to the target buffer to scan.\r
166 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
167 @param Value Value to search for in the target buffer.\r
168\r
169 @return Pointer to the first occurrence or NULL if not found.\r
170\r
171**/\r
172CONST VOID *\r
173EFIAPI\r
174InternalMemScanMem8 (\r
175 IN CONST VOID *Buffer,\r
176 IN UINTN Length,\r
177 IN UINT8 Value\r
178 );\r
179\r
180/**\r
181 Scans a target buffer for a 16-bit value, and returns a pointer to the\r
182 matching 16-bit value in the target buffer.\r
183\r
184 @param Buffer Pointer to the target buffer to scan.\r
185 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
186 @param Value Value to search for in the target buffer.\r
187\r
188 @return Pointer to the first occurrence or NULL if not found.\r
189\r
190**/\r
191CONST VOID *\r
192EFIAPI\r
193InternalMemScanMem16 (\r
194 IN CONST VOID *Buffer,\r
195 IN UINTN Length,\r
196 IN UINT16 Value\r
197 );\r
198\r
199/**\r
200 Scans a target buffer for a 32-bit value, and returns a pointer to the\r
201 matching 32-bit value in the target buffer.\r
202\r
203 @param Buffer Pointer to the target buffer to scan.\r
204 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
205 @param Value Value to search for in the target buffer.\r
206\r
207 @return Pointer to the first occurrence or NULL if not found.\r
208\r
209**/\r
210CONST VOID *\r
211EFIAPI\r
212InternalMemScanMem32 (\r
213 IN CONST VOID *Buffer,\r
214 IN UINTN Length,\r
215 IN UINT32 Value\r
216 );\r
217\r
218/**\r
219 Scans a target buffer for a 64-bit value, and returns a pointer to the\r
220 matching 64-bit value in the target buffer.\r
221\r
222 @param Buffer Pointer to the target buffer to scan.\r
223 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
224 @param Value Value to search for in the target buffer.\r
225\r
226 @return Pointer to the first occurrence or NULL if not found.\r
227\r
228**/\r
229CONST VOID *\r
230EFIAPI\r
231InternalMemScanMem64 (\r
232 IN CONST VOID *Buffer,\r
233 IN UINTN Length,\r
234 IN UINT64 Value\r
235 );\r
236\r
237#endif\r