]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/DxeMemoryLib/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 The following BaseMemoryLib instances contain the same copy of this file:
26 #ifndef __MEM_LIB_INTERNALS__
27 #define __MEM_LIB_INTERNALS__
33 #include <Library/BaseMemoryLib.h>
34 #include <Library/DebugLib.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/BaseLib.h>
39 Copy Length bytes from Source to Destination.
41 @param DestinationBuffer Target of copy
42 @param SourceBuffer Place to copy from
43 @param Length Number of bytes to copy
51 OUT VOID
*DestinationBuffer
,
52 IN CONST VOID
*SourceBuffer
,
57 Set Buffer to Value for Size bytes.
59 @param Buffer Memory to set.
60 @param Length Number of bytes to set
61 @param Value Value of the set operation.
75 Fills a target buffer with a 16-bit value, and returns the target buffer.
77 @param Buffer Pointer to the target buffer to fill.
78 @param Length Number of bytes in Buffer to fill.
79 @param Value Value with which to fill Length bytes of Buffer.
93 Fills a target buffer with a 32-bit value, and returns the target buffer.
95 @param Buffer Pointer to the target buffer to fill.
96 @param Length Number of bytes in Buffer to fill.
97 @param Value Value with which to fill Length bytes of Buffer.
104 InternalMemSetMem32 (
111 Fills a target buffer with a 64-bit value, and returns the target buffer.
113 @param Buffer Pointer to the target buffer to fill.
114 @param Length Number of bytes in Buffer to fill.
115 @param Value Value with which to fill Length bytes of Buffer.
122 InternalMemSetMem64 (
129 Set Buffer to 0 for Size bytes.
131 @param Buffer Memory to set.
132 @param Length Number of bytes to set
145 Compares two memory buffers of a given length.
147 @param DestinationBuffer First memory buffer
148 @param SourceBuffer Second memory buffer
149 @param Length Length of DestinationBuffer and SourceBuffer memory
150 regions to compare. Must be non-zero.
152 @retval 0 if MemOne == MemTwo
157 InternalMemCompareMem (
158 IN CONST VOID
*DestinationBuffer
,
159 IN CONST VOID
*SourceBuffer
,
164 Scans a target buffer for an 8-bit value, and returns a pointer to the
165 matching 8-bit value in the target buffer.
167 @param Buffer Pointer to the target buffer to scan.
168 @param Length Number of bytes in Buffer to scan. Must be non-zero.
169 @param Value Value to search for in the target buffer.
171 @return Pointer to the first occurrence or NULL if not found.
176 InternalMemScanMem8 (
177 IN CONST VOID
*Buffer
,
183 Scans a target buffer for a 16-bit value, and returns a pointer to the
184 matching 16-bit value in the target buffer.
186 @param Buffer Pointer to the target buffer to scan.
187 @param Length Number of bytes in Buffer to scan. Must be non-zero.
188 @param Value Value to search for in the target buffer.
190 @return Pointer to the first occurrence or NULL if not found.
195 InternalMemScanMem16 (
196 IN CONST VOID
*Buffer
,
202 Scans a target buffer for a 32-bit value, and returns a pointer to the
203 matching 32-bit value in the target buffer.
205 @param Buffer Pointer to the target buffer to scan.
206 @param Length Number of bytes in Buffer to scan. Must be non-zero.
207 @param Value Value to search for in the target buffer.
209 @return Pointer to the first occurrence or NULL if not found.
214 InternalMemScanMem32 (
215 IN CONST VOID
*Buffer
,
221 Scans a target buffer for a 64-bit value, and returns a pointer to the
222 matching 64-bit value in the target buffer.
224 @param Buffer Pointer to the target buffer to scan.
225 @param Length Number of bytes in Buffer to scan. Must be non-zero.
226 @param Value Value to search for in the target buffer.
228 @return Pointer to the first occurrence or NULL if not found.
233 InternalMemScanMem64 (
234 IN CONST VOID
*Buffer
,