]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
Synchronize the h files with c files.
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibGcc.c
index 1377650042a8accb296039b7d002ec8476cbc329..0cca85ee24a7e6a4aac7e4ba2bab14563aa30fb7 100644 (file)
@@ -35,7 +35,7 @@
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read from Address.\r
+  @return The value read.\r
 \r
 **/\r
 UINT8\r
@@ -58,10 +58,9 @@ MmioRead8 (
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return Value.\r
 \r
-  @return The value written to the Mmio. It equals to the input\r
-          Value instead of the actual value read back from the\r
-          Mmio.\r
 **/\r
 UINT8\r
 EFIAPI\r
@@ -81,10 +80,11 @@ MmioWrite8 (
   operations are serialized.\r
 \r
   If 16-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read from Address.\r
+  @return The value read.\r
 \r
 **/\r
 UINT16\r
@@ -105,13 +105,13 @@ MmioRead16 (
   and write operations are serialized.\r
 \r
   If 16-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return Value.\r
 \r
-  @return The value written to the Mmio. It equals to the input\r
-          Value instead of the actual value read back from the\r
-          Mmio.\r
 **/\r
 UINT16\r
 EFIAPI\r
@@ -132,10 +132,11 @@ MmioWrite16 (
   operations are serialized.\r
 \r
   If 32-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read from Address.\r
+  @return The value read.\r
 \r
 **/\r
 UINT32\r
@@ -156,13 +157,13 @@ MmioRead32 (
   and write operations are serialized.\r
 \r
   If 32-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
+  \r
+  @return Value.\r
 \r
-  @return The value written to the Mmio. It equals to the input\r
-          Value instead of the actual value read back from the\r
-          Mmio.\r
 **/\r
 UINT32\r
 EFIAPI\r
@@ -183,10 +184,11 @@ MmioWrite32 (
   operations are serialized.\r
 \r
   If 64-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
 \r
-  @return The value read from Address.\r
+  @return The value read.\r
 \r
 **/\r
 UINT64\r
@@ -207,13 +209,11 @@ MmioRead64 (
   and write operations are serialized.\r
 \r
   If 64-bit MMIO register operations are not supported, then ASSERT().\r
+  If Address is not aligned on a 64-bit boundary, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r
   @param  Value   The value to write to the MMIO register.\r
 \r
-  @return The value written to the Mmio. It equals to the input\r
-          Value instead of the actual value read back from the\r
-          Mmio.\r
 **/\r
 UINT64\r
 EFIAPI\r
@@ -243,6 +243,20 @@ MmioWrite64 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Reads an 8-bit I/O port.\r
+\r
+  Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.\r
+  This function must guarantee that all I/O read and write operations are\r
+  serialized.\r
+\r
+  If 8-bit I/O port operations are not supported, then ASSERT().\r
+\r
+  @param  Port  The I/O port to read.\r
+\r
+  @return The value read.\r
+\r
+**/\r
 UINT8\r
 EFIAPI\r
 IoRead8 (\r
@@ -273,6 +287,21 @@ IoRead8 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Writes an 8-bit I/O port.\r
+\r
+  Writes the 8-bit I/O port specified by Port with the value specified by Value\r
+  and returns Value. This function must guarantee that all I/O read and write\r
+  operations are serialized.\r
+\r
+  If 8-bit I/O port operations are not supported, then ASSERT().\r
+\r
+  @param  Port  The I/O port to write.\r
+  @param  Value The value to write to the I/O port.\r
+\r
+  @return The value written the I/O port.\r
+\r
+**/\r
 UINT8\r
 EFIAPI\r
 IoWrite8 (\r
@@ -299,6 +328,21 @@ IoWrite8 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Reads a 16-bit I/O port.\r
+\r
+  Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.\r
+  This function must guarantee that all I/O read and write operations are\r
+  serialized.\r
+\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
+  @param  Port  The I/O port to read.\r
+\r
+  @return The value read.\r
+\r
+**/\r
 UINT16\r
 EFIAPI\r
 IoRead16 (\r
@@ -330,6 +374,22 @@ IoRead16 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Writes a 16-bit I/O port.\r
+\r
+  Writes the 16-bit I/O port specified by Port with the value specified by Value\r
+  and returns Value. This function must guarantee that all I/O read and write\r
+  operations are serialized.\r
+\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
+  @param  Port  The I/O port to write.\r
+  @param  Value The value to write to the I/O port.\r
+\r
+  @return The value written the I/O port.\r
+\r
+**/\r
 UINT16\r
 EFIAPI\r
 IoWrite16 (\r
@@ -357,6 +417,21 @@ IoWrite16 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Reads a 32-bit I/O port.\r
+\r
+  Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.\r
+  This function must guarantee that all I/O read and write operations are\r
+  serialized.\r
+\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
+  @param  Port  The I/O port to read.\r
+\r
+  @return The value read.\r
+\r
+**/\r
 UINT32\r
 EFIAPI\r
 IoRead32 (\r
@@ -388,11 +463,27 @@ IoRead32 (
 \r
 **/\r
 __inline__\r
+/**\r
+  Writes a 32-bit I/O port.\r
+\r
+  Writes the 32-bit I/O port specified by Port with the value specified by Value\r
+  and returns Value. This function must guarantee that all I/O read and write\r
+  operations are serialized.\r
+\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
+  @param  Port  The I/O port to write.\r
+  @param  Value The value to write to the I/O port.\r
+\r
+  @return The value written the I/O port.\r
+\r
+**/\r
 UINT32\r
 EFIAPI\r
 IoWrite32 (\r
   IN      UINTN                     Port,\r
-  IN      UINT32  Value\r
+  IN      UINT32                    Value\r
   )\r
 {\r
   ASSERT ((Port & 3) == 0);\r