]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
2 Declaration of internal functions for Base Memory Library.
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: MemLibInternals.h
15 The following BaseMemoryLib instances share the same version of this file:
26 #ifndef __MEM_LIB_INTERNALS__
27 #define __MEM_LIB_INTERNALS__
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/BaseLib.h>
31 #include <Library/DebugLib.h>
34 Copy Length bytes from Source to Destination.
36 @param Destination Target of copy
37 @param Source Place to copy from
38 @param Length Number of bytes to copy
46 OUT VOID
*DestinationBuffer
,
47 IN CONST VOID
*SourceBuffer
,
52 Set Buffer to Value for Size bytes.
54 @param Buffer Memory to set.
55 @param Size Number of bytes to set
56 @param Value Value of the set operation.
70 Fills a target buffer with a 16-bit value, and returns the target buffer.
72 @param Buffer Pointer to the target buffer to fill.
73 @param Length Number of bytes in Buffer to fill.
74 @param Value Value with which to fill Length bytes of Buffer.
88 Fills a target buffer with a 32-bit value, and returns the target buffer.
90 @param Buffer Pointer to the target buffer to fill.
91 @param Length Number of bytes in Buffer to fill.
92 @param Value Value with which to fill Length bytes of Buffer.
106 Fills a target buffer with a 64-bit value, and returns the target buffer.
108 @param Buffer Pointer to the target buffer to fill.
109 @param Length Number of bytes in Buffer to fill.
110 @param Value Value with which to fill Length bytes of Buffer.
117 InternalMemSetMem64 (
124 Set Buffer to 0 for Size bytes.
126 @param Buffer Memory to set.
127 @param Size Number of bytes to set
140 Compares two memory buffers of a given length.
142 @param DestinationBuffer First memory buffer
143 @param SourceBuffer Second memory buffer
144 @param Length Length of DestinationBuffer and SourceBuffer memory
145 regions to compare. Must be non-zero.
147 @retval 0 if MemOne == MemTwo
152 InternalMemCompareMem (
153 IN CONST VOID
*DestinationBuffer
,
154 IN CONST VOID
*SourceBuffer
,
159 Scans a target buffer for an 8-bit value, and returns a pointer to the
160 matching 8-bit value in the target buffer.
162 @param Buffer Pointer to the target buffer to scan.
163 @param Length Number of bytes in Buffer to scan. Must be non-zero.
164 @param Value Value to search for in the target buffer.
166 @return Pointer to the first occurrence or NULL if not found.
171 InternalMemScanMem8 (
172 IN CONST VOID
*Buffer
,
178 Scans a target buffer for a 16-bit value, and returns a pointer to the
179 matching 16-bit value in the target buffer.
181 @param Buffer Pointer to the target buffer to scan.
182 @param Length Number of bytes in Buffer to scan. Must be non-zero.
183 @param Value Value to search for in the target buffer.
185 @return Pointer to the first occurrence or NULL if not found.
190 InternalMemScanMem16 (
191 IN CONST VOID
*Buffer
,
197 Scans a target buffer for a 32-bit value, and returns a pointer to the
198 matching 32-bit value in the target buffer.
200 @param Buffer Pointer to the target buffer to scan.
201 @param Length Number of bytes in Buffer to scan. Must be non-zero.
202 @param Value Value to search for in the target buffer.
204 @return Pointer to the first occurrence or NULL if not found.
209 InternalMemScanMem32 (
210 IN CONST VOID
*Buffer
,
216 Scans a target buffer for a 64-bit value, and returns a pointer to the
217 matching 64-bit value in the target buffer.
219 @param Buffer Pointer to the target buffer to scan.
220 @param Length Number of bytes in Buffer to scan. Must be non-zero.
221 @param Value Value to search for in the target buffer.
223 @return Pointer to the first occurrence or NULL if not found.
228 InternalMemScanMem64 (
229 IN CONST VOID
*Buffer
,