X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FPeiMemoryLib%2FMemLibInternals.h;h=8a1e1dff904b6e1efb7b16cea73fd2c0153b8fe2;hb=58380e9c6174f23df78f777b4209c0fd75245cda;hp=f7eba17988c9aa297a036aa52474f4f0abe7ed9b;hpb=42eedea958591087603bbacd1c2227d2494026af;p=mirror_edk2.git diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h index f7eba17988..8a1e1dff90 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h @@ -1,30 +1,20 @@ /** @file Declaration of internal functions for Base Memory Library. - Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - The following BaseMemoryLib instances share the same version of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - PeiMemoryLib - DxeMemoryLib - **/ #ifndef __MEM_LIB_INTERNALS__ #define __MEM_LIB_INTERNALS__ - #include #include @@ -33,47 +23,51 @@ #include /** - Copy Length bytes from Source to Destination. + Copies a source buffer to a destination buffer, and returns the destination buffer. - @param DestinationBuffer Target of copy - @param SourceBuffer Place to copy from - @param Length Number of bytes to copy + This function wraps the (*PeiServices)->CopyMem (). + + @param DestinationBuffer The pointer to the destination buffer of the memory copy. + @param SourceBuffer The pointer to the source buffer of the memory copy. + @param Length The number of bytes to copy from SourceBuffer to DestinationBuffer. - @return Destination + @return DestinationBuffer. **/ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, + OUT VOID *Destination, + IN CONST VOID *Source, IN UINTN Length ); /** - Set Buffer to Value for Size bytes. + Fills a target buffer with a byte value, and returns the target buffer. - @param Buffer Memory to set. - @param Length Number of bytes to set - @param Value Value of the set operation. + This function wraps the (*PeiServices)->SetMem (). + + @param Buffer The memory to set. + @param Size The number of bytes to set. + @param Value Value of the set operation. - @return Buffer + @return Buffer. **/ VOID * EFIAPI InternalMemSetMem ( OUT VOID *Buffer, - IN UINTN Length, + IN UINTN Size, IN UINT8 Value ); /** Fills a target buffer with a 16-bit value, and returns the target buffer. - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. + @param Buffer The pointer to the target buffer to fill. + @param Length The count of 16-bit value to fill. + @param Value The value with which to fill Length bytes of Buffer. @return Buffer @@ -89,9 +83,9 @@ InternalMemSetMem16 ( /** Fills a target buffer with a 32-bit value, and returns the target buffer. - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. + @param Buffer The pointer to the target buffer to fill. + @param Length The count of 32-bit value to fill. + @param Value The value with which to fill Length bytes of Buffer. @return Buffer @@ -107,9 +101,9 @@ InternalMemSetMem32 ( /** Fills a target buffer with a 64-bit value, and returns the target buffer. - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. + @param Buffer The pointer to the target buffer to fill. + @param Length The count of 64-bit value to fill. + @param Value The value with which to fill Length bytes of Buffer. @return Buffer @@ -125,8 +119,8 @@ InternalMemSetMem64 ( /** Set Buffer to 0 for Size bytes. - @param Buffer Memory to set. - @param Length Number of bytes to set + @param Buffer The memory to set. + @param Length The number of bytes to set @return Buffer @@ -141,12 +135,14 @@ InternalMemZeroMem ( /** Compares two memory buffers of a given length. - @param DestinationBuffer First memory buffer - @param SourceBuffer Second memory buffer - @param Length Length of DestinationBuffer and SourceBuffer memory + @param DestinationBuffer The first memory buffer + @param SourceBuffer The second memory buffer + @param Length The length of DestinationBuffer and SourceBuffer memory regions to compare. Must be non-zero. - @retval 0 if MemOne == MemTwo + @return 0 All Length bytes of the two buffers are identical. + @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first + mismatched byte in DestinationBuffer. **/ INTN @@ -161,11 +157,11 @@ InternalMemCompareMem ( Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value in the target buffer. - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. Must be non-zero. - @param Value Value to search for in the target buffer. + @param Buffer The pointer to the target buffer to scan. + @param Length The count of 8-bit value to scan. Must be non-zero. + @param Value The value to search for in the target buffer. - @return Pointer to the first occurrence or NULL if not found. + @return The pointer to the first occurrence, or NULL if not found. **/ CONST VOID * @@ -180,11 +176,11 @@ InternalMemScanMem8 ( Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value in the target buffer. - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. Must be non-zero. - @param Value Value to search for in the target buffer. + @param Buffer The pointer to the target buffer to scan. + @param Length The count of 16-bit value to scan. Must be non-zero. + @param Value The value to search for in the target buffer. - @return Pointer to the first occurrence or NULL if not found. + @return The pointer to the first occurrence, or NULL if not found. **/ CONST VOID * @@ -199,11 +195,11 @@ InternalMemScanMem16 ( Scans a target buffer for a 32-bit value, and returns a pointer to the matching 32-bit value in the target buffer. - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. Must be non-zero. - @param Value Value to search for in the target buffer. + @param Buffer The pointer to the target buffer to scan. + @param Length The count of 32-bit value to scan. Must be non-zero. + @param Value The value to search for in the target buffer. - @return Pointer to the first occurrence or NULL if not found. + @return The pointer to the first occurrence, or NULL if not found. **/ CONST VOID * @@ -218,11 +214,11 @@ InternalMemScanMem32 ( Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value in the target buffer. - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. Must be non-zero. - @param Value Value to search for in the target buffer. + @param Buffer The pointer to the target buffer to scan. + @param Length The count of 64-bit value to scan. Must be non-zero. + @param Value The value to search for in the target buffer. - @return Pointer to the first occurrence or NULL if not found. + @return The pointer to the first occurrence, or NULL if not found. **/ CONST VOID *