MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provide services to access I/O Ports and MMIO registers.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -20,14 +20,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/**
|
||||
Macro that converts PCI Segment and I/O Port to an address that can be
|
||||
passed to the I/O Library functions.
|
||||
|
||||
Computes an address that is compatible with the I/O Library functions.
|
||||
The unused upper bits of Segment, and Port are stripped prior to the
|
||||
|
||||
Computes an address that is compatible with the I/O Library functions.
|
||||
The unused upper bits of Segment, and Port are stripped prior to the
|
||||
generation of the address.
|
||||
|
||||
|
||||
@param Segment PCI Segment number. Range 0..65535.
|
||||
@param Port I/O Port number. Range 0..65535.
|
||||
|
||||
|
||||
@return An address that the I/o Library functions need.
|
||||
|
||||
**/
|
||||
@@ -178,7 +178,7 @@ IoAnd8 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 8-bit I/O port.
|
||||
|
||||
Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -238,7 +238,7 @@ IoBitFieldRead8 (
|
||||
|
||||
Writes Value to the bit field of the I/O register. The bit field is specified
|
||||
by the StartBit and the EndBit. All other bits in the destination I/O
|
||||
register are preserved. The value written to the I/O port is returned.
|
||||
register are preserved. The value written to the I/O port is returned.
|
||||
|
||||
If 8-bit I/O port operations are not supported, then ASSERT().
|
||||
If StartBit is greater than 7, then ASSERT().
|
||||
@@ -405,7 +405,7 @@ IoRead16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -507,7 +507,7 @@ IoOr16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param AndData The value to AND with the read value from the I/O port.
|
||||
|
||||
@@ -522,7 +522,7 @@ IoAnd16 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 16-bit I/O port.
|
||||
|
||||
Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -534,7 +534,7 @@ IoAnd16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param AndData The value to AND with the read value from the I/O port.
|
||||
@param OrData The value to OR with the result of the AND operation.
|
||||
@@ -735,7 +735,7 @@ IoBitFieldAndThenOr16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@return The value read.
|
||||
@@ -756,7 +756,7 @@ IoRead32 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -873,7 +873,7 @@ IoAnd32 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 32-bit I/O port.
|
||||
|
||||
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -1174,7 +1174,7 @@ IoAnd64 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 64-bit I/O port.
|
||||
|
||||
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -1409,7 +1409,7 @@ MmioRead8 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -1424,7 +1424,7 @@ MmioWrite8 (
|
||||
Reads an 8-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 8-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1471,7 +1471,7 @@ MmioAnd8 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -1563,7 +1563,7 @@ MmioBitFieldWrite8 (
|
||||
Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 8-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1704,7 +1704,7 @@ MmioRead16 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -1719,7 +1719,7 @@ MmioWrite16 (
|
||||
Reads a 16-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 16-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1768,7 +1768,7 @@ MmioAnd16 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -1862,7 +1862,7 @@ MmioBitFieldWrite16 (
|
||||
Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 16-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2006,7 +2006,7 @@ MmioRead32 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -2021,7 +2021,7 @@ MmioWrite32 (
|
||||
Reads a 32-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 32-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2070,7 +2070,7 @@ MmioAnd32 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -2164,7 +2164,7 @@ MmioBitFieldWrite32 (
|
||||
Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 32-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2321,7 +2321,7 @@ MmioWrite64 (
|
||||
Reads a 64-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 64-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2370,7 +2370,7 @@ MmioAnd64 (
|
||||
);
|
||||
|
||||
/**
|
||||
Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -2464,7 +2464,7 @@ MmioBitFieldWrite64 (
|
||||
Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 64-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2578,11 +2578,11 @@ MmioBitFieldAndThenOr64 (
|
||||
/**
|
||||
Copy data from MMIO region to system memory by using 8-bit access.
|
||||
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 8-bit access. The total
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 8-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
|
||||
@@ -2604,13 +2604,13 @@ MmioReadBuffer8 (
|
||||
/**
|
||||
Copy data from MMIO region to system memory by using 16-bit access.
|
||||
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 16-bit access. The total
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 16-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -2634,13 +2634,13 @@ MmioReadBuffer16 (
|
||||
/**
|
||||
Copy data from MMIO region to system memory by using 32-bit access.
|
||||
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 32-bit access. The total
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 32-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||
@@ -2664,13 +2664,13 @@ MmioReadBuffer32 (
|
||||
/**
|
||||
Copy data from MMIO region to system memory by using 64-bit access.
|
||||
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 64-bit access. The total
|
||||
Copy data from MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 64-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||
@@ -2694,11 +2694,11 @@ MmioReadBuffer64 (
|
||||
/**
|
||||
Copy data from system memory to MMIO region by using 8-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 8-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 8-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
|
||||
@@ -2720,13 +2720,13 @@ MmioWriteBuffer8 (
|
||||
/**
|
||||
Copy data from system memory to MMIO region by using 16-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 16-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 16-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -2751,13 +2751,13 @@ MmioWriteBuffer16 (
|
||||
/**
|
||||
Copy data from system memory to MMIO region by using 32-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 32-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 32-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||
@@ -2782,13 +2782,13 @@ MmioWriteBuffer32 (
|
||||
/**
|
||||
Copy data from system memory to MMIO region by using 64-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 64-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to MMIO region specified
|
||||
by starting address StartAddress by using 64-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
Reference in New Issue
Block a user