]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiMemoryLib/MemLibInternals.h
0bccb2bb86d81c7c078f17fad6cbea6eca5ff6df
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__
30 // The package level header files this module uses
34 // The Library classes this module consumes
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/PeiServicesTablePointerLib.h>
38 #include <Library/DebugLib.h>
39 #include <Library/BaseLib.h>
42 Copy Length bytes from Source to Destination.
44 @param Destination Target of copy
45 @param Source Place to copy from
46 @param Length Number of bytes to copy
54 OUT VOID
*DestinationBuffer
,
55 IN CONST VOID
*SourceBuffer
,
60 Set Buffer to Value for Size bytes.
62 @param Buffer Memory to set.
63 @param Size Number of bytes to set
64 @param Value Value of the set operation.
78 Fills a target buffer with a 16-bit value, and returns the target buffer.
80 @param Buffer Pointer to the target buffer to fill.
81 @param Length Number of bytes in Buffer to fill.
82 @param Value Value with which to fill Length bytes of Buffer.
96 Fills a target buffer with a 32-bit value, and returns the target buffer.
98 @param Buffer Pointer to the target buffer to fill.
99 @param Length Number of bytes in Buffer to fill.
100 @param Value Value with which to fill Length bytes of Buffer.
107 InternalMemSetMem32 (
114 Fills a target buffer with a 64-bit value, and returns the target buffer.
116 @param Buffer Pointer to the target buffer to fill.
117 @param Length Number of bytes in Buffer to fill.
118 @param Value Value with which to fill Length bytes of Buffer.
125 InternalMemSetMem64 (
132 Set Buffer to 0 for Size bytes.
134 @param Buffer Memory to set.
135 @param Size Number of bytes to set
148 Compares two memory buffers of a given length.
150 @param DestinationBuffer First memory buffer
151 @param SourceBuffer Second memory buffer
152 @param Length Length of DestinationBuffer and SourceBuffer memory
153 regions to compare. Must be non-zero.
155 @retval 0 if MemOne == MemTwo
160 InternalMemCompareMem (
161 IN CONST VOID
*DestinationBuffer
,
162 IN CONST VOID
*SourceBuffer
,
167 Scans a target buffer for an 8-bit value, and returns a pointer to the
168 matching 8-bit value in the target buffer.
170 @param Buffer Pointer to the target buffer to scan.
171 @param Length Number of bytes in Buffer to scan. Must be non-zero.
172 @param Value Value to search for in the target buffer.
174 @return Pointer to the first occurrence or NULL if not found.
179 InternalMemScanMem8 (
180 IN CONST VOID
*Buffer
,
186 Scans a target buffer for a 16-bit value, and returns a pointer to the
187 matching 16-bit value in the target buffer.
189 @param Buffer Pointer to the target buffer to scan.
190 @param Length Number of bytes in Buffer to scan. Must be non-zero.
191 @param Value Value to search for in the target buffer.
193 @return Pointer to the first occurrence or NULL if not found.
198 InternalMemScanMem16 (
199 IN CONST VOID
*Buffer
,
205 Scans a target buffer for a 32-bit value, and returns a pointer to the
206 matching 32-bit value in the target buffer.
208 @param Buffer Pointer to the target buffer to scan.
209 @param Length Number of bytes in Buffer to scan. Must be non-zero.
210 @param Value Value to search for in the target buffer.
212 @return Pointer to the first occurrence or NULL if not found.
217 InternalMemScanMem32 (
218 IN CONST VOID
*Buffer
,
224 Scans a target buffer for a 64-bit value, and returns a pointer to the
225 matching 64-bit value in the target buffer.
227 @param Buffer Pointer to the target buffer to scan.
228 @param Length Number of bytes in Buffer to scan. Must be non-zero.
229 @param Value Value to search for in the target buffer.
231 @return Pointer to the first occurrence or NULL if not found.
236 InternalMemScanMem64 (
237 IN CONST VOID
*Buffer
,