]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiMemoryLib/MemLibInternals.h
Synchronize interface function comment from declaration in library class header file...
[mirror_edk2.git] / MdePkg / Library / PeiMemoryLib / MemLibInternals.h
index 8646b24e7902fd205824a613d65b58ca7b998719..e216b9445b0099fc04075c2968b121e4f1c36b37 100644 (file)
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  MemLibInternals.h\r
-\r
-  The following BaseMemoryLib instances share the same version of this file:\r
+  The following BaseMemoryLib instances contain the same copy of this file:\r
 \r
     BaseMemoryLib\r
     BaseMemoryLibMmx\r
     BaseMemoryLibSse2\r
     BaseMemoryLibRepStr\r
+    BaseMemoryLibOptDxe\r
+    BaseMemoryLibOptPei\r
     PeiMemoryLib\r
     DxeMemoryLib\r
 \r
 #ifndef __MEM_LIB_INTERNALS__\r
 #define __MEM_LIB_INTERNALS__\r
 \r
+\r
+#include <PiPei.h>\r
+\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/BaseLib.h>\r
+\r
 /**\r
-  Copy Length bytes from Source to Destination.\r
+  Copies a source buffer to a destination buffer, and returns the destination buffer.\r
 \r
-  @param  Destination Target of copy\r
-  @param  Source Place to copy from\r
-  @param  Length Number of bytes to copy\r
+  This function wraps the gPS->CopyMem ().\r
+  \r
+  @param  DestinationBuffer   Pointer to the destination buffer of the memory copy.\r
+  @param  SourceBuffer        Pointer to the source buffer of the memory copy.\r
+  @param  Length              Number of bytes to copy from SourceBuffer to DestinationBuffer.\r
 \r
-  @return Destination\r
+  @return DestinationBuffer.\r
 \r
 **/\r
 VOID *\r
 EFIAPI\r
 InternalMemCopyMem (\r
-  OUT     VOID                      *DestinationBuffer,\r
-  IN      CONST VOID                *SourceBuffer,\r
+  OUT     VOID                      *Destination,\r
+  IN      CONST VOID                *Source,\r
   IN      UINTN                     Length\r
   );\r
 \r
 /**\r
-  Set Buffer to Value for Size bytes.\r
+  Fills a target buffer with a byte value, and returns the target buffer.\r
 \r
-  @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
-  @param  Value Value of the set operation.\r
+  This function wraps the gPS->SetMem ().\r
+  \r
+  @param  Buffer    Memory to set.\r
+  @param  Size    Number of bytes to set.\r
+  @param  Value     Value of the set operation.\r
 \r
-  @return Buffer\r
+  @return Buffer.\r
 \r
 **/\r
 VOID *\r
 EFIAPI\r
 InternalMemSetMem (\r
   OUT     VOID                      *Buffer,\r
-  IN      UINTN                     Length,\r
+  IN      UINTN                     Size,\r
   IN      UINT8                     Value\r
   );\r
 \r
@@ -120,7 +132,7 @@ InternalMemSetMem64 (
   Set Buffer to 0 for Size bytes.\r
 \r
   @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
+  @param  Length Number of bytes to set\r
 \r
   @return Buffer\r
 \r
@@ -140,7 +152,9 @@ InternalMemZeroMem (
   @param  Length            Length of DestinationBuffer and SourceBuffer memory\r
                             regions to compare. Must be non-zero.\r
 \r
-  @retval 0     if MemOne == MemTwo\r
+  @return 0                 All Length bytes of the two buffers are identical.\r
+  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first\r
+                            mismatched byte in DestinationBuffer.\r
 \r
 **/\r
 INTN\r