/** @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
\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
\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
\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
\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
\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
\r
//\r
// Make sure that Address is 16-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 1) == 0);\r
\r
Address |= BIT63;\r
\r
//\r
// Make sure that Address is 32-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 3) == 0);\r
\r
Address |= BIT63;\r
\r
//\r
// Make sure that Address is 64-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 7) == 0);\r
\r
Address |= BIT63;\r
\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
\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
{\r
//\r
// Make sure that Address is 16-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 1) == 0);\r
\r
Address |= BIT63;\r
\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
{\r
//\r
// Make sure that Address is 32-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 3) == 0);\r
\r
Address |= BIT63;\r
{\r
//\r
// Make sure that Address is 64-bit aligned.\r
- // \r
+ //\r
ASSERT ((Address & 7) == 0);\r
\r
Address |= BIT63;\r