]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/IoLib.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Library / IoLib.h
index b6df4c10b92938c349f3dbfadbf21b6fd479b50a..a16594d5d441f2ce723afb3a0f6263ef54a1717a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provide services to access I/O Ports and MMIO registers.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
@@ -20,14 +20,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Macro that converts PCI Segment and I/O Port to an address that can be\r
   passed to the I/O Library functions.\r
-  \r
-  Computes an address that is compatible with the I/O Library functions.  \r
-  The unused upper bits of Segment, and Port are stripped prior to the \r
+\r
+  Computes an address that is compatible with the I/O Library functions.\r
+  The unused upper bits of Segment, and Port are stripped prior to the\r
   generation of the address.\r
-  \r
+\r
   @param  Segment   PCI Segment number.  Range 0..65535.\r
   @param  Port      I/O Port number.  Range 0..65535.\r
-  \r
+\r
   @return An address that the I/o Library functions need.\r
 \r
 **/\r
@@ -178,7 +178,7 @@ IoAnd8 (
   );\r
 \r
 /**\r
-  Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise \r
+  Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 8-bit I/O port.\r
 \r
   Reads the 8-bit I/O port specified by Port, performs a bitwise AND between\r
@@ -238,7 +238,7 @@ IoBitFieldRead8 (
 \r
   Writes Value to the bit field of the I/O register. The bit field is specified\r
   by the StartBit and the EndBit. All other bits in the destination I/O\r
-  register are preserved. The value written to the I/O port is returned. \r
+  register are preserved. The value written to the I/O port is returned.\r
 \r
   If 8-bit I/O port operations are not supported, then ASSERT().\r
   If StartBit is greater than 7, then ASSERT().\r
@@ -405,7 +405,7 @@ IoRead16 (
 \r
   If 16-bit I/O port operations are not supported, then ASSERT().\r
   If Port is not aligned on a 16-bit boundary, then ASSERT().\r
-  \r
+\r
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
@@ -507,7 +507,7 @@ IoOr16 (
 \r
   If 16-bit I/O port operations are not supported, then ASSERT().\r
   If Port is not aligned on a 16-bit boundary, then ASSERT().\r
-  \r
+\r
   @param  Port    The I/O port to write.\r
   @param  AndData The value to AND with the read value from the I/O port.\r
 \r
@@ -522,7 +522,7 @@ IoAnd16 (
   );\r
 \r
 /**\r
-  Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise \r
+  Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 16-bit I/O port.\r
 \r
   Reads the 16-bit I/O port specified by Port, performs a bitwise AND between\r
@@ -534,7 +534,7 @@ IoAnd16 (
 \r
   If 16-bit I/O port operations are not supported, then ASSERT().\r
   If Port is not aligned on a 16-bit boundary, then ASSERT().\r
-  \r
+\r
   @param  Port    The I/O port to write.\r
   @param  AndData The value to AND with the read value from the I/O port.\r
   @param  OrData  The value to OR with the result of the AND operation.\r
@@ -735,7 +735,7 @@ IoBitFieldAndThenOr16 (
 \r
   If 32-bit I/O port operations are not supported, then ASSERT().\r
   If Port is not aligned on a 32-bit boundary, then ASSERT().\r
-  \r
+\r
   @param  Port  The I/O port to read.\r
 \r
   @return The value read.\r
@@ -756,7 +756,7 @@ IoRead32 (
 \r
   If 32-bit I/O port operations are not supported, then ASSERT().\r
   If Port is not aligned on a 32-bit boundary, then ASSERT().\r
-  \r
+\r
   @param  Port  The I/O port to write.\r
   @param  Value The value to write to the I/O port.\r
 \r
@@ -873,7 +873,7 @@ IoAnd32 (
   );\r
 \r
 /**\r
-  Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise \r
+  Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 32-bit I/O port.\r
 \r
   Reads the 32-bit I/O port specified by Port, performs a bitwise AND between\r
@@ -1174,7 +1174,7 @@ IoAnd64 (
   );\r
 \r
 /**\r
-  Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise \r
+  Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 64-bit I/O port.\r
 \r
   Reads the 64-bit I/O port specified by Port, performs a bitwise AND between\r
@@ -1409,7 +1409,7 @@ MmioRead8 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
-  \r
+\r
   @return Value.\r
 \r
 **/\r
@@ -1424,7 +1424,7 @@ MmioWrite8 (
   Reads an 8-bit MMIO register, performs a bitwise OR, and writes the\r
   result back to the 8-bit MMIO register.\r
 \r
-  Reads the 8-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 8-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 8-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -1471,7 +1471,7 @@ MmioAnd8 (
   );\r
 \r
 /**\r
-  Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise \r
+  Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 8-bit MMIO register.\r
 \r
   Reads the 8-bit MMIO register specified by Address, performs a bitwise AND\r
@@ -1563,7 +1563,7 @@ MmioBitFieldWrite8 (
   Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and\r
   writes the result back to the bit field in the 8-bit MMIO register.\r
 \r
-  Reads the 8-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 8-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 8-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -1704,7 +1704,7 @@ MmioRead16 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
-  \r
+\r
   @return Value.\r
 \r
 **/\r
@@ -1719,7 +1719,7 @@ MmioWrite16 (
   Reads a 16-bit MMIO register, performs a bitwise OR, and writes the\r
   result back to the 16-bit MMIO register.\r
 \r
-  Reads the 16-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 16-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 16-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -1768,7 +1768,7 @@ MmioAnd16 (
   );\r
 \r
 /**\r
-  Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise \r
+  Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 16-bit MMIO register.\r
 \r
   Reads the 16-bit MMIO register specified by Address, performs a bitwise AND\r
@@ -1862,7 +1862,7 @@ MmioBitFieldWrite16 (
   Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and\r
   writes the result back to the bit field in the 16-bit MMIO register.\r
 \r
-  Reads the 16-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 16-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 16-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -2006,7 +2006,7 @@ MmioRead32 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
-  \r
+\r
   @return Value.\r
 \r
 **/\r
@@ -2021,7 +2021,7 @@ MmioWrite32 (
   Reads a 32-bit MMIO register, performs a bitwise OR, and writes the\r
   result back to the 32-bit MMIO register.\r
 \r
-  Reads the 32-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 32-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 32-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -2070,7 +2070,7 @@ MmioAnd32 (
   );\r
 \r
 /**\r
-  Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise \r
+  Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 32-bit MMIO register.\r
 \r
   Reads the 32-bit MMIO register specified by Address, performs a bitwise AND\r
@@ -2164,7 +2164,7 @@ MmioBitFieldWrite32 (
   Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and\r
   writes the result back to the bit field in the 32-bit MMIO register.\r
 \r
-  Reads the 32-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 32-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 32-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -2321,7 +2321,7 @@ MmioWrite64 (
   Reads a 64-bit MMIO register, performs a bitwise OR, and writes the\r
   result back to the 64-bit MMIO register.\r
 \r
-  Reads the 64-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 64-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 64-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -2370,7 +2370,7 @@ MmioAnd64 (
   );\r
 \r
 /**\r
-  Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise \r
+  Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise\r
   OR, and writes the result back to the 64-bit MMIO register.\r
 \r
   Reads the 64-bit MMIO register specified by Address, performs a bitwise AND\r
@@ -2464,7 +2464,7 @@ MmioBitFieldWrite64 (
   Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and\r
   writes the result back to the bit field in the 64-bit MMIO register.\r
 \r
-  Reads the 64-bit MMIO register specified by Address, performs a bitwise \r
+  Reads the 64-bit MMIO register specified by Address, performs a bitwise\r
   OR between the read result and the value specified by OrData, and\r
   writes the result to the 64-bit MMIO register specified by Address. The value\r
   written to the MMIO register is returned. This function must guarantee that\r
@@ -2578,11 +2578,11 @@ MmioBitFieldAndThenOr64 (
 /**\r
   Copy data from MMIO region to system memory by using 8-bit access.\r
 \r
-  Copy data from 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 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
@@ -2604,13 +2604,13 @@ MmioReadBuffer8 (
 /**\r
   Copy data from MMIO region to system memory by using 16-bit access.\r
 \r
-  Copy data from 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 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
@@ -2634,13 +2634,13 @@ MmioReadBuffer16 (
 /**\r
   Copy data from MMIO region to system memory by using 32-bit access.\r
 \r
-  Copy data from 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 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
@@ -2664,13 +2664,13 @@ MmioReadBuffer32 (
 /**\r
   Copy data from MMIO region to system memory by using 64-bit access.\r
 \r
-  Copy data from 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 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
@@ -2694,11 +2694,11 @@ MmioReadBuffer64 (
 /**\r
   Copy data from system memory to MMIO region by using 8-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to 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 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
@@ -2720,13 +2720,13 @@ MmioWriteBuffer8 (
 /**\r
   Copy data from system memory to MMIO region by using 16-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to 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 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
@@ -2751,13 +2751,13 @@ MmioWriteBuffer16 (
 /**\r
   Copy data from system memory to MMIO region by using 32-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to 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 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
@@ -2782,13 +2782,13 @@ MmioWriteBuffer32 (
 /**\r
   Copy data from system memory to MMIO region by using 64-bit access.\r
 \r
-  Copy data from system memory specified by Buffer to 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 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