]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c
EmulatorPkg: Removing ipf which is no longer supported from edk2.
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibIpf.c
index e388549b3caa3d418c49dc1e71233e8a208d3f88..dc00594fab93cf13bf849db6426a99fe10341cad 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common I/O Library routines.\r
 \r
-  Copyright (c) 2006 - 2008, 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
@@ -26,7 +26,7 @@
 \r
   This function translates I/O port address to memory address by adding the 64MB\r
   aligned I/O Port space to the I/O address.\r
-  If I/O Port space base is not 64MB aligned, then ASSERT ().  \r
+  If I/O Port space base is not 64MB aligned, then ASSERT ().\r
 \r
   @param  Port  The I/O port to read.\r
 \r
@@ -46,7 +46,7 @@ InternalGetMemoryMapAddress (
 \r
   //\r
   // Make sure that the I/O Port space base is 64MB aligned.\r
-  // \r
+  //\r
   ASSERT ((IoBlockBaseAddress & 0x3ffffff) == 0);\r
   Address += IoBlockBaseAddress;\r
 \r
@@ -109,7 +109,7 @@ IoRead16 (
 \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
@@ -184,7 +184,7 @@ IoWrite8 (
 \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
@@ -210,7 +210,7 @@ IoWrite16 (
 \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
@@ -282,7 +282,7 @@ IoReadFifo8 (
   UINT8 *Buffer8;\r
 \r
   Buffer8 = (UINT8 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer8++ = IoRead8 (Port);\r
   }\r
 }\r
@@ -315,7 +315,7 @@ IoReadFifo16 (
   UINT16 *Buffer16;\r
 \r
   Buffer16 = (UINT16 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer16++ = IoRead16 (Port);\r
   }\r
 }\r
@@ -348,7 +348,7 @@ IoReadFifo32 (
   UINT32 *Buffer32;\r
 \r
   Buffer32 = (UINT32 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer32++ = IoRead32 (Port);\r
   }\r
 }\r
@@ -381,7 +381,7 @@ IoWriteFifo8 (
   UINT8 *Buffer8;\r
 \r
   Buffer8 = (UINT8 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite8 (Port, *Buffer8++);\r
   }\r
 }\r
@@ -414,7 +414,7 @@ IoWriteFifo16 (
   UINT16 *Buffer16;\r
 \r
   Buffer16 = (UINT16 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite16 (Port, *Buffer16++);\r
   }\r
 }\r
@@ -447,7 +447,7 @@ IoWriteFifo32 (
   UINT32 *Buffer32;\r
 \r
   Buffer32 = (UINT32 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite32 (Port, *Buffer32++);\r
   }\r
 }\r
@@ -508,7 +508,7 @@ MmioRead16 (
 \r
   //\r
   // Make sure that Address is 16-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 1) == 0);\r
 \r
   Address |= BIT63;\r
@@ -545,7 +545,7 @@ MmioRead32 (
 \r
   //\r
   // Make sure that Address is 32-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 3) == 0);\r
 \r
   Address |= BIT63;\r
@@ -582,7 +582,7 @@ MmioRead64 (
 \r
   //\r
   // Make sure that Address is 64-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 7) == 0);\r
 \r
   Address |= BIT63;\r
@@ -606,7 +606,7 @@ MmioRead64 (
 \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
@@ -638,7 +638,7 @@ MmioWrite8 (
 \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
@@ -651,7 +651,7 @@ MmioWrite16 (
 {\r
   //\r
   // Make sure that Address is 16-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 1) == 0);\r
 \r
   Address |= BIT63;\r
@@ -675,7 +675,7 @@ MmioWrite16 (
 \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
@@ -688,7 +688,7 @@ MmioWrite32 (
 {\r
   //\r
   // Make sure that Address is 32-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 3) == 0);\r
 \r
   Address |= BIT63;\r
@@ -723,7 +723,7 @@ MmioWrite64 (
 {\r
   //\r
   // Make sure that Address is 64-bit aligned.\r
-  // \r
+  //\r
   ASSERT ((Address & 7) == 0);\r
 \r
   Address |= BIT63;\r