]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibMmioBuffer.c
index 8befbf8d17e39938b0d715f0764258527bfb35a0..f4aebfa5f67354ccd8ba7ab432726e3803d0e7a4 100644 (file)
@@ -1,26 +1,23 @@
 /** @file\r
   I/O Library MMIO Buffer Functions.\r
 \r
-  Copyright (c) 2007, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   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
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+#include "BaseIoLibIntrinsicInternal.h"\r
 \r
 /**\r
-  Copy data from MMIO region to system memory by using 8-bit access.\r
+  Copy data from the MMIO region to system memory by using 8-bit access.\r
 \r
-  Copy data from MMIO region specified by starting address StartAddress \r
+  Copy data from the MMIO region specified by starting address StartAddress \r
   to system memory specified by Buffer by using 8-bit access. The total \r
   number of byte to be copied is specified by Length. Buffer is returned.\r
   \r
@@ -28,9 +25,9 @@
   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied from.\r
-  @param  Length          Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied from.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer receiving the data read.\r
 \r
   @return Buffer\r
 \r
@@ -50,7 +47,7 @@ MmioReadBuffer8 (
  \r
   ReturnBuffer = Buffer;\r
   \r
-  while (Length--) {\r
+  while (Length-- != 0) {\r
     *(Buffer++) = MmioRead8 (StartAddress++);\r
   }\r
 \r
@@ -58,9 +55,9 @@ MmioReadBuffer8 (
 }\r
 \r
 /**\r
-  Copy data from MMIO region to system memory by using 16-bit access.\r
+  Copy data from the MMIO region to system memory by using 16-bit access.\r
 \r
-  Copy data from MMIO region specified by starting address StartAddress \r
+  Copy data from the MMIO region specified by starting address StartAddress \r
   to system memory specified by Buffer by using 16-bit access. The total \r
   number of byte to be copied is specified by Length. Buffer is returned.\r
   \r
@@ -72,9 +69,9 @@ MmioReadBuffer8 (
   If Length is not aligned on a 16-bit boundary, then ASSERT().\r
   If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied from.\r
-  @param  Length          Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied from.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer receiving the data read.\r
 \r
   @return Buffer\r
 \r
@@ -99,7 +96,7 @@ MmioReadBuffer16 (
  \r
   ReturnBuffer = Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     *(Buffer++) = MmioRead16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Length -= sizeof (UINT16);\r
@@ -109,9 +106,9 @@ MmioReadBuffer16 (
 }\r
 \r
 /**\r
-  Copy data from MMIO region to system memory by using 32-bit access.\r
+  Copy data from the MMIO region to system memory by using 32-bit access.\r
 \r
-  Copy data from MMIO region specified by starting address StartAddress \r
+  Copy data from the MMIO region specified by starting address StartAddress \r
   to system memory specified by Buffer by using 32-bit access. The total \r
   number of byte to be copied is specified by Length. Buffer is returned.\r
   \r
@@ -123,9 +120,9 @@ MmioReadBuffer16 (
   If Length is not aligned on a 32-bit boundary, then ASSERT().\r
   If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied from.\r
-  @param  Length          Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied from.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer receiving the data read.\r
 \r
   @return Buffer\r
 \r
@@ -150,7 +147,7 @@ MmioReadBuffer32 (
  \r
   ReturnBuffer = Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     *(Buffer++) = MmioRead32 (StartAddress);\r
     StartAddress += sizeof (UINT32);\r
     Length -= sizeof (UINT32);\r
@@ -160,9 +157,9 @@ MmioReadBuffer32 (
 }\r
 \r
 /**\r
-  Copy data from MMIO region to system memory by using 64-bit access.\r
+  Copy data from the MMIO region to system memory by using 64-bit access.\r
 \r
-  Copy data from MMIO region specified by starting address StartAddress \r
+  Copy data from the MMIO region specified by starting address StartAddress \r
   to system memory specified by Buffer by using 64-bit access. The total \r
   number of byte to be copied is specified by Length. Buffer is returned.\r
   \r
@@ -174,9 +171,9 @@ MmioReadBuffer32 (
   If Length is not aligned on a 64-bit boundary, then ASSERT().\r
   If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied from.\r
-  @param  Length          Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied from.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer receiving the data read.\r
 \r
   @return Buffer\r
 \r
@@ -201,7 +198,7 @@ MmioReadBuffer64 (
  \r
   ReturnBuffer = Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     *(Buffer++) = MmioRead64 (StartAddress);\r
     StartAddress += sizeof (UINT64);\r
     Length -= sizeof (UINT64);\r
@@ -212,9 +209,9 @@ MmioReadBuffer64 (
 \r
 \r
 /**\r
-  Copy data from system memory to MMIO region by using 8-bit access.\r
+  Copy data from system memory to the MMIO region by using 8-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to MMIO region specified \r
+  Copy data from system memory specified by Buffer to the MMIO region specified \r
   by starting address StartAddress by using 8-bit access. The total number \r
   of byte to be copied is specified by Length. Buffer is returned.\r
   \r
@@ -222,11 +219,11 @@ MmioReadBuffer64 (
   If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().\r
 \r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied to.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Buffer\r
 \r
 **/\r
 UINT8 *\r
@@ -244,7 +241,7 @@ MmioWriteBuffer8 (
  \r
   ReturnBuffer = (UINT8 *) Buffer;\r
   \r
-  while (Length--) {\r
+  while (Length-- != 0) {\r
      MmioWrite8 (StartAddress++, *(Buffer++));\r
   }\r
 \r
@@ -253,11 +250,11 @@ MmioWriteBuffer8 (
 }\r
 \r
 /**\r
-  Copy data from system memory to MMIO region by using 16-bit access.\r
+  Copy data from system memory to the MMIO region by using 16-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to MMIO region specified \r
+  Copy data from system memory specified by Buffer to the MMIO region specified \r
   by starting address StartAddress by using 16-bit access. The total number \r
-  of byte to be copied is specified by Length. Length is returned.\r
+  of byte to be copied is specified by Length. Buffer is returned.\r
   \r
   If StartAddress is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
@@ -268,11 +265,11 @@ MmioWriteBuffer8 (
 \r
   If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied to.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Buffer\r
 \r
 **/\r
 UINT16 *\r
@@ -295,7 +292,7 @@ MmioWriteBuffer16 (
 \r
   ReturnBuffer = (UINT16 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite16 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT16);\r
@@ -307,11 +304,11 @@ MmioWriteBuffer16 (
 \r
 \r
 /**\r
-  Copy data from system memory to MMIO region by using 32-bit access.\r
+  Copy data from system memory to the MMIO region by using 32-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to MMIO region specified \r
+  Copy data from system memory specified by Buffer to the MMIO region specified \r
   by starting address StartAddress by using 32-bit access. The total number \r
-  of byte to be copied is specified by Length. Length is returned.\r
+  of byte to be copied is specified by Length. Buffer is returned.\r
   \r
   If StartAddress is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
@@ -322,11 +319,11 @@ MmioWriteBuffer16 (
 \r
   If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied to.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Buffer\r
 \r
 **/\r
 UINT32 *\r
@@ -349,7 +346,7 @@ MmioWriteBuffer32 (
 \r
   ReturnBuffer = (UINT32 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite32 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT32);\r
@@ -360,11 +357,11 @@ MmioWriteBuffer32 (
 }\r
 \r
 /**\r
-  Copy data from system memory to MMIO region by using 64-bit access.\r
+  Copy data from system memory to the MMIO region by using 64-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to MMIO region specified \r
+  Copy data from system memory specified by Buffer to the MMIO region specified \r
   by starting address StartAddress by using 64-bit access. The total number \r
-  of byte to be copied is specified by Length. Length is returned.\r
+  of byte to be copied is specified by Length. Buffer is returned.\r
   \r
   If StartAddress is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
@@ -375,11 +372,11 @@ MmioWriteBuffer32 (
 \r
   If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
-  @param  StartAddress    Starting address for the MMIO region to be copied to.\r
-  @param  Length     Size in bytes of the copy.\r
-  @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
+  @param  StartAddress    The starting address for the MMIO region to be copied to.\r
+  @param  Length          The size, in bytes, of Buffer.\r
+  @param  Buffer          The pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Buffer\r
 \r
 **/\r
 UINT64 *\r
@@ -402,7 +399,7 @@ MmioWriteBuffer64 (
 \r
   ReturnBuffer = (UINT64 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite64 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT64);\r