]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibMmioBuffer.c
index f4aebfa5f67354ccd8ba7ab432726e3803d0e7a4..5daf3f3e925eb9cb4796f55a6893d39432c64b81 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   I/O Library MMIO Buffer Functions.\r
 \r
-  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, 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
 /**\r
   Copy data from the MMIO region to system memory by using 8-bit access.\r
 \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
+  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
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+\r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
 \r
@@ -44,9 +44,9 @@ MmioReadBuffer8 (
 \r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
\r
+\r
   ReturnBuffer = Buffer;\r
-  \r
+\r
   while (Length-- != 0) {\r
     *(Buffer++) = MmioRead8 (StartAddress++);\r
   }\r
@@ -57,13 +57,13 @@ MmioReadBuffer8 (
 /**\r
   Copy data from the MMIO region to system memory by using 16-bit access.\r
 \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
+  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
+\r
   If StartAddress is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 16-bit boundary, then ASSERT().\r
@@ -87,15 +87,15 @@ MmioReadBuffer16 (
   UINT16    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
   ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);\r
   ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);\r
\r
+\r
   ReturnBuffer = Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     *(Buffer++) = MmioRead16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
@@ -108,13 +108,13 @@ MmioReadBuffer16 (
 /**\r
   Copy data from the MMIO region to system memory by using 32-bit access.\r
 \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
+  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
+\r
   If StartAddress is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 32-bit boundary, then ASSERT().\r
@@ -138,15 +138,15 @@ MmioReadBuffer32 (
   UINT32    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
   ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);\r
   ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);\r
\r
+\r
   ReturnBuffer = Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     *(Buffer++) = MmioRead32 (StartAddress);\r
     StartAddress += sizeof (UINT32);\r
@@ -159,13 +159,13 @@ MmioReadBuffer32 (
 /**\r
   Copy data from the MMIO region to system memory by using 64-bit access.\r
 \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
+  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
+\r
   If StartAddress is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 64-bit boundary, then ASSERT().\r
@@ -189,15 +189,15 @@ MmioReadBuffer64 (
   UINT64    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
   ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);\r
   ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);\r
\r
+\r
   ReturnBuffer = Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     *(Buffer++) = MmioRead64 (StartAddress);\r
     StartAddress += sizeof (UINT64);\r
@@ -211,11 +211,11 @@ MmioReadBuffer64 (
 /**\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 the MMIO region specified \r
-  by starting address StartAddress by using 8-bit access. The total number \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
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+\r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().\r
 \r
 \r
@@ -238,27 +238,27 @@ MmioWriteBuffer8 (
 \r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
\r
+\r
   ReturnBuffer = (UINT8 *) Buffer;\r
-  \r
+\r
   while (Length-- != 0) {\r
      MmioWrite8 (StartAddress++, *(Buffer++));\r
   }\r
 \r
   return ReturnBuffer;\r
\r
+\r
 }\r
 \r
 /**\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 the MMIO region specified \r
-  by starting address StartAddress by using 16-bit access. The total number \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. Buffer is returned.\r
-  \r
+\r
   If StartAddress is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 16-bit boundary, then ASSERT().\r
@@ -283,7 +283,7 @@ MmioWriteBuffer16 (
   UINT16    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
@@ -291,10 +291,10 @@ MmioWriteBuffer16 (
   ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);\r
 \r
   ReturnBuffer = (UINT16 *) Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     MmioWrite16 (StartAddress, *(Buffer++));\r
-    \r
+\r
     StartAddress += sizeof (UINT16);\r
     Length -= sizeof (UINT16);\r
   }\r
@@ -306,13 +306,13 @@ MmioWriteBuffer16 (
 /**\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 the MMIO region specified \r
-  by starting address StartAddress by using 32-bit access. The total number \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. Buffer is returned.\r
-  \r
+\r
   If StartAddress is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 32-bit boundary, then ASSERT().\r
@@ -337,7 +337,7 @@ MmioWriteBuffer32 (
   UINT32    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
@@ -345,10 +345,10 @@ MmioWriteBuffer32 (
   ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);\r
 \r
   ReturnBuffer = (UINT32 *) Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     MmioWrite32 (StartAddress, *(Buffer++));\r
-    \r
+\r
     StartAddress += sizeof (UINT32);\r
     Length -= sizeof (UINT32);\r
   }\r
@@ -359,13 +359,13 @@ MmioWriteBuffer32 (
 /**\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 the MMIO region specified \r
-  by starting address StartAddress by using 64-bit access. The total number \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. Buffer is returned.\r
-  \r
+\r
   If StartAddress is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().\r
   If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().\r
 \r
   If Length is not aligned on a 64-bit boundary, then ASSERT().\r
@@ -390,7 +390,7 @@ MmioWriteBuffer64 (
   UINT64    *ReturnBuffer;\r
 \r
   ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);\r
-  \r
+\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));\r
   ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));\r
 \r
@@ -398,10 +398,10 @@ MmioWriteBuffer64 (
   ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);\r
 \r
   ReturnBuffer = (UINT64 *) Buffer;\r
-  \r
+\r
   while (Length != 0) {\r
     MmioWrite64 (StartAddress, *(Buffer++));\r
-    \r
+\r
     StartAddress += sizeof (UINT64);\r
     Length -= sizeof (UINT64);\r
   }\r