/** @file\r
I/O Library.\r
- The implementation of I/O operation for this library instance \r
+ The implementation of I/O operation for this library instance\r
are based on EFI_CPU_IO_PROTOCOL.\r
- \r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+\r
+ Copyright (c) 2009 - 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
The caller is responsible for aligning the Address if required.\r
@param Width The width of the I/O operation.\r
@param Data The value to write to the I/O port.\r
- \r
+\r
@return Data read from registers in the EFI system memory space.\r
\r
**/\r
serialized.\r
\r
If Port is not aligned on a 16-bit boundary, then ASSERT().\r
- \r
+\r
If 16-bit I/O port operations are not supported, then ASSERT().\r
\r
@param Port The I/O port to read.\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
+\r
If Port is not aligned on a 32-bit boundary, then ASSERT().\r
\r
If 32-bit I/O port operations are not supported, then ASSERT().\r
operations are serialized.\r
\r
If Port is not aligned on a 64-bit boundary, then ASSERT().\r
- \r
+\r
If 64-bit I/O port operations are not supported, then ASSERT().\r
\r
@param Port The I/O port to write.\r
UINT8 *Buffer8;\r
\r
Buffer8 = (UINT8 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
*Buffer8++ = IoRead8 (Port);\r
}\r
}\r
UINT8 *Buffer8;\r
\r
Buffer8 = (UINT8 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
IoWrite8 (Port, *Buffer8++);\r
}\r
}\r
//\r
ASSERT ((Port & 1) == 0);\r
Buffer16 = (UINT16 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
*Buffer16++ = IoRead16 (Port);\r
}\r
}\r
//\r
ASSERT ((Port & 1) == 0);\r
Buffer16 = (UINT16 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
IoWrite16 (Port, *Buffer16++);\r
}\r
}\r
//\r
ASSERT ((Port & 3) == 0);\r
Buffer32 = (UINT32 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
*Buffer32++ = IoRead32 (Port);\r
}\r
}\r
//\r
ASSERT ((Port & 3) == 0);\r
Buffer32 = (UINT32 *)Buffer;\r
- while (Count--) {\r
+ while (Count-- > 0) {\r
IoWrite32 (Port, *Buffer32++);\r
}\r
}\r
operations are serialized.\r
\r
If Address is not aligned on a 16-bit boundary, then ASSERT().\r
- \r
+\r
If 16-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to read.\r
and write operations are serialized.\r
\r
If Address is not aligned on a 16-bit boundary, then ASSERT().\r
- \r
+\r
If 16-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to write.\r
operations are serialized.\r
\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
- \r
+\r
If 32-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to read.\r
and write operations are serialized.\r
\r
If Address is not aligned on a 32-bit boundary, then ASSERT().\r
- \r
+\r
If 32-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to write.\r
operations are serialized.\r
\r
If Address is not aligned on a 64-bit boundary, then ASSERT().\r
- \r
+\r
If 64-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to read.\r
and write operations are serialized.\r
\r
If Address is not aligned on a 64-bit boundary, then ASSERT().\r
- \r
+\r
If 64-bit MMIO register operations are not supported, then ASSERT().\r
\r
@param Address The MMIO register to write.\r