]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/BaseMemoryLibInternal.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseMemoryLib / BaseMemoryLibInternal.h
CommitLineData
3eb9473e 1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 BaseMemoryLibInternals.h\r
15 \r
16Abstract: \r
17\r
18 Header file for Base Memory Library.\r
19 \r
20--*/\r
21\r
22#ifndef __BASEMEMORY_LIB_INTERNALS_H__\r
23#define __BASEMEMORY_LIB_INTERNALS_H__\r
24\r
25#include "EdkIIGlueBase.h"\r
26/**\r
27 Copy Length bytes from Source to Destination.\r
28\r
29 @param Destination Target of copy\r
30 @param Source Place to copy from\r
31 @param Length Number of bytes to copy\r
32\r
33 @return Destination\r
34\r
35**/\r
36VOID *\r
37EFIAPI\r
38InternalMemCopyMem (\r
39 OUT VOID *DestinationBuffer,\r
40 IN CONST VOID *SourceBuffer,\r
41 IN UINTN Length\r
42 );\r
43\r
44/**\r
45 Set Buffer to Value for Size bytes.\r
46\r
47 @param Buffer Memory to set.\r
48 @param Size Number of bytes to set\r
49 @param Value Value of the set operation.\r
50\r
51 @return Buffer\r
52\r
53**/\r
54VOID *\r
55EFIAPI\r
56InternalMemSetMem (\r
57 OUT VOID *Buffer,\r
58 IN UINTN Length,\r
59 IN UINT8 Value\r
60 );\r
61\r
62/**\r
63 Fills a target buffer with a 16-bit value, and returns the target buffer.\r
64\r
65 @param Buffer Pointer to the target buffer to fill.\r
66 @param Length Number of bytes in Buffer to fill.\r
67 @param Value Value with which to fill Length bytes of Buffer.\r
68\r
69 @return Buffer\r
70\r
71**/\r
72VOID *\r
73EFIAPI\r
74InternalMemSetMem16 (\r
75 OUT VOID *Buffer,\r
76 IN UINTN Length,\r
77 IN UINT16 Value\r
78 );\r
79\r
80/**\r
81 Fills a target buffer with a 32-bit value, and returns the target buffer.\r
82\r
83 @param Buffer Pointer to the target buffer to fill.\r
84 @param Length Number of bytes in Buffer to fill.\r
85 @param Value Value with which to fill Length bytes of Buffer.\r
86\r
87 @return Buffer\r
88\r
89**/\r
90VOID *\r
91EFIAPI\r
92InternalMemSetMem32 (\r
93 OUT VOID *Buffer,\r
94 IN UINTN Length,\r
95 IN UINT32 Value\r
96 );\r
97\r
98/**\r
99 Fills a target buffer with a 64-bit value, and returns the target buffer.\r
100\r
101 @param Buffer Pointer to the target buffer to fill.\r
102 @param Length Number of bytes in Buffer to fill.\r
103 @param Value Value with which to fill Length bytes of Buffer.\r
104\r
105 @return Buffer\r
106\r
107**/\r
108VOID *\r
109EFIAPI\r
110InternalMemSetMem64 (\r
111 OUT VOID *Buffer,\r
112 IN UINTN Length,\r
113 IN UINT64 Value\r
114 );\r
115\r
116/**\r
117 Set Buffer to 0 for Size bytes.\r
118\r
119 @param Buffer Memory to set.\r
120 @param Size Number of bytes to set\r
121\r
122 @return Buffer\r
123\r
124**/\r
125VOID *\r
126EFIAPI\r
127InternalMemZeroMem (\r
128 OUT VOID *Buffer,\r
129 IN UINTN Length\r
130 );\r
131\r
132/**\r
133 Compares two memory buffers of a given length.\r
134\r
135 @param DestinationBuffer First memory buffer\r
136 @param SourceBuffer Second memory buffer\r
137 @param Length Length of DestinationBuffer and SourceBuffer memory\r
138 regions to compare. Must be non-zero.\r
139\r
140 @retval 0 if MemOne == MemTwo\r
141\r
142**/\r
143INTN\r
144EFIAPI\r
145InternalMemCompareMem (\r
146 IN CONST VOID *DestinationBuffer,\r
147 IN CONST VOID *SourceBuffer,\r
148 IN UINTN Length\r
149 );\r
150\r
151/**\r
152 Scans a target buffer for an 8-bit value, and returns a pointer to the\r
153 matching 8-bit value in the target buffer.\r
154\r
155 @param Buffer Pointer to the target buffer to scan.\r
156 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
157 @param Value Value to search for in the target buffer.\r
158\r
159 @return Pointer to the first occurrence or NULL if not found.\r
160\r
161**/\r
162CONST VOID *\r
163EFIAPI\r
164InternalMemScanMem8 (\r
165 IN CONST VOID *Buffer,\r
166 IN UINTN Length,\r
167 IN UINT8 Value\r
168 );\r
169\r
170/**\r
171 Scans a target buffer for a 16-bit value, and returns a pointer to the\r
172 matching 16-bit value in the target buffer.\r
173\r
174 @param Buffer Pointer to the target buffer to scan.\r
175 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
176 @param Value Value to search for in the target buffer.\r
177\r
178 @return Pointer to the first occurrence or NULL if not found.\r
179\r
180**/\r
181CONST VOID *\r
182EFIAPI\r
183InternalMemScanMem16 (\r
184 IN CONST VOID *Buffer,\r
185 IN UINTN Length,\r
186 IN UINT16 Value\r
187 );\r
188\r
189/**\r
190 Scans a target buffer for a 32-bit value, and returns a pointer to the\r
191 matching 32-bit value in the target buffer.\r
192\r
193 @param Buffer Pointer to the target buffer to scan.\r
194 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
195 @param Value Value to search for in the target buffer.\r
196\r
197 @return Pointer to the first occurrence or NULL if not found.\r
198\r
199**/\r
200CONST VOID *\r
201EFIAPI\r
202InternalMemScanMem32 (\r
203 IN CONST VOID *Buffer,\r
204 IN UINTN Length,\r
205 IN UINT32 Value\r
206 );\r
207\r
208/**\r
209 Scans a target buffer for a 64-bit value, and returns a pointer to the\r
210 matching 64-bit value in the target buffer.\r
211\r
212 @param Buffer Pointer to the target buffer to scan.\r
213 @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
214 @param Value Value to search for in the target buffer.\r
215\r
216 @return Pointer to the first occurrence or NULL if not found.\r
217\r
218**/\r
219CONST VOID *\r
220EFIAPI\r
221InternalMemScanMem64 (\r
222 IN CONST VOID *Buffer,\r
223 IN UINTN Length,\r
224 IN UINT64 Value\r
225 );\r
226\r
227#endif\r