]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
2 Declaration of internal functions for Base Memory Library.
4 The following BaseMemoryLib instances contain the same copy of this file:
14 Copyright (c) 2006, Intel Corporation<BR>
15 All rights reserved. This program and the accompanying materials
16 are licensed and made available under the terms and conditions of the BSD License
17 which accompanies this distribution. The full text of the license may be found at
18 http://opensource.org/licenses/bsd-license.php
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
25 #ifndef __MEM_LIB_INTERNALS__
26 #define __MEM_LIB_INTERNALS__
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/BaseLib.h>
31 #include <Library/DebugLib.h>
35 Copy Length bytes from Source to Destination.
37 @param DestinationBuffer Target of copy
38 @param SourceBuffer Place to copy from
39 @param Length Number of bytes to copy
47 OUT VOID
*DestinationBuffer
,
48 IN CONST VOID
*SourceBuffer
,
53 Set Buffer to Value for Size bytes.
55 @param Buffer Memory to set.
56 @param Length Number of bytes to set
57 @param Value Value of the set operation.
71 Fills a target buffer with a 16-bit value, and returns the target buffer.
73 @param Buffer Pointer to the target buffer to fill.
74 @param Length Number of bytes in Buffer to fill.
75 @param Value Value with which to fill Length bytes of Buffer.
89 Fills a target buffer with a 32-bit value, and returns the target buffer.
91 @param Buffer Pointer to the target buffer to fill.
92 @param Length Number of bytes in Buffer to fill.
93 @param Value Value with which to fill Length bytes of Buffer.
100 InternalMemSetMem32 (
107 Fills a target buffer with a 64-bit value, and returns the target buffer.
109 @param Buffer Pointer to the target buffer to fill.
110 @param Length Number of bytes in Buffer to fill.
111 @param Value Value with which to fill Length bytes of Buffer.
118 InternalMemSetMem64 (
125 Set Buffer to 0 for Size bytes.
127 @param Buffer Memory to set.
128 @param Length Number of bytes to set
141 Compares two memory buffers of a given length.
143 @param DestinationBuffer First memory buffer
144 @param SourceBuffer Second memory buffer
145 @param Length Length of DestinationBuffer and SourceBuffer memory
146 regions to compare. Must be non-zero.
148 @retval 0 if MemOne == MemTwo
153 InternalMemCompareMem (
154 IN CONST VOID
*DestinationBuffer
,
155 IN CONST VOID
*SourceBuffer
,
160 Scans a target buffer for an 8-bit value, and returns a pointer to the
161 matching 8-bit value in the target buffer.
163 @param Buffer Pointer to the target buffer to scan.
164 @param Length Number of bytes in Buffer to scan. Must be non-zero.
165 @param Value Value to search for in the target buffer.
167 @return Pointer to the first occurrence or NULL if not found.
172 InternalMemScanMem8 (
173 IN CONST VOID
*Buffer
,
179 Scans a target buffer for a 16-bit value, and returns a pointer to the
180 matching 16-bit value in the target buffer.
182 @param Buffer Pointer to the target buffer to scan.
183 @param Length Number of bytes in Buffer to scan. Must be non-zero.
184 @param Value Value to search for in the target buffer.
186 @return Pointer to the first occurrence or NULL if not found.
191 InternalMemScanMem16 (
192 IN CONST VOID
*Buffer
,
198 Scans a target buffer for a 32-bit value, and returns a pointer to the
199 matching 32-bit value in the target buffer.
201 @param Buffer Pointer to the target buffer to scan.
202 @param Length Number of bytes in Buffer to scan. Must be non-zero.
203 @param Value Value to search for in the target buffer.
205 @return Pointer to the first occurrence or NULL if not found.
210 InternalMemScanMem32 (
211 IN CONST VOID
*Buffer
,
217 Scans a target buffer for a 64-bit value, and returns a pointer to the
218 matching 64-bit value in the target buffer.
220 @param Buffer Pointer to the target buffer to scan.
221 @param Length Number of bytes in Buffer to scan. Must be non-zero.
222 @param Value Value to search for in the target buffer.
224 @return Pointer to the first occurrence or NULL if not found.
229 InternalMemScanMem64 (
230 IN CONST VOID
*Buffer
,