]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c
clean up EBC in inf files.
[mirror_edk2.git] / MdePkg / Library / PeiIoLibCpuIo / IoLibMmioBuffer.c
index 133f5c2a2a6cb3147c82951ceda2f095d02b4031..20d926f9f0855fe331bd5c8358a0cfc877f305b6 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
   I/O Library MMIO Buffer Functions.\r
+  The implementations are based on EFI_PEI_SERVICE->CpuIo interface.\r
 \r
   Copyright (c) 2007, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
@@ -35,7 +36,7 @@
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT8 *\r
@@ -53,7 +54,7 @@ MmioReadBuffer8 (
  \r
   ReturnBuffer = Buffer;\r
   \r
-  while (Length--) {\r
+  while (Length-- != 0) {\r
     *(Buffer++) = MmioRead8 (StartAddress++);\r
   }\r
 \r
@@ -79,7 +80,7 @@ MmioReadBuffer8 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT16 *\r
@@ -102,7 +103,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
@@ -130,7 +131,7 @@ MmioReadBuffer16 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT32 *\r
@@ -153,7 +154,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
@@ -181,7 +182,7 @@ MmioReadBuffer32 (
   @param  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer receiving the data read.\r
 \r
-  @return Buffer\r
+  @return Pointer to a system memory buffer receiving the data read.\r
 \r
 **/\r
 UINT64 *\r
@@ -204,7 +205,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
@@ -226,10 +227,10 @@ MmioReadBuffer64 (
 \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  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT8 *\r
@@ -247,7 +248,7 @@ MmioWriteBuffer8 (
  \r
   ReturnBuffer = (UINT8 *) Buffer;\r
   \r
-  while (Length--) {\r
+  while (Length-- != 0) {\r
      MmioWrite8 (StartAddress++, *(Buffer++));\r
   }\r
 \r
@@ -272,10 +273,10 @@ MmioWriteBuffer8 (
   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  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT16 *\r
@@ -298,7 +299,7 @@ MmioWriteBuffer16 (
 \r
   ReturnBuffer = (UINT16 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite16 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT16);\r
@@ -326,10 +327,10 @@ MmioWriteBuffer16 (
   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  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT32 *\r
@@ -352,7 +353,7 @@ MmioWriteBuffer32 (
 \r
   ReturnBuffer = (UINT32 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite32 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT32);\r
@@ -379,10 +380,10 @@ MmioWriteBuffer32 (
   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  Length          Size in bytes of the copy.\r
   @param  Buffer          Pointer to a system memory buffer containing the data to write.\r
 \r
-  @return Size in bytes of the copy.\r
+  @return Pointer to a system memory buffer containing the data to write.\r
 \r
 **/\r
 UINT64 *\r
@@ -405,7 +406,7 @@ MmioWriteBuffer64 (
 \r
   ReturnBuffer = (UINT64 *) Buffer;\r
   \r
-  while (Length) {\r
+  while (Length != 0) {\r
     MmioWrite64 (StartAddress, *(Buffer++));\r
     \r
     StartAddress += sizeof (UINT64);\r