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:
@@ -4,7 +4,7 @@
|
||||
All assertions for bit field operations are handled bit field functions in the
|
||||
Base Library.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -80,7 +80,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
|
||||
@@ -146,7 +146,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().
|
||||
@@ -348,7 +348,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.
|
||||
|
||||
@@ -366,7 +366,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
|
||||
@@ -378,7 +378,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.
|
||||
@@ -659,7 +659,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
|
||||
@@ -952,7 +952,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
|
||||
@@ -1190,7 +1190,7 @@ IoBitFieldAndThenOr64 (
|
||||
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
|
||||
@@ -1243,7 +1243,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
|
||||
@@ -1347,7 +1347,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
|
||||
@@ -1477,7 +1477,7 @@ MmioBitFieldAndThenOr8 (
|
||||
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
|
||||
@@ -1532,7 +1532,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
|
||||
@@ -1638,7 +1638,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
|
||||
@@ -1771,7 +1771,7 @@ MmioBitFieldAndThenOr16 (
|
||||
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
|
||||
@@ -1826,7 +1826,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
|
||||
@@ -1932,7 +1932,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
|
||||
@@ -2065,7 +2065,7 @@ MmioBitFieldAndThenOr32 (
|
||||
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
|
||||
@@ -2120,7 +2120,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
|
||||
@@ -2226,7 +2226,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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
I/O Library. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
|
||||
|
||||
Copyright (c) 2006 - 2008, 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
|
||||
@@ -203,7 +203,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.
|
||||
|
||||
@@ -240,7 +240,7 @@ IoWrite16 (
|
||||
|
||||
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.
|
||||
@@ -274,7 +274,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.
|
||||
|
||||
@@ -598,7 +598,7 @@ MmioRead8 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -667,7 +667,7 @@ MmioRead16 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -739,7 +739,7 @@ MmioRead32 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
|
@@ -2,7 +2,7 @@
|
||||
I/O Library MMIO Buffer Functions.
|
||||
The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
|
||||
|
||||
Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,11 +24,11 @@
|
||||
/**
|
||||
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().
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ MmioReadBuffer8 (
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length-- != 0) {
|
||||
*(Buffer++) = MmioRead8 (StartAddress++);
|
||||
}
|
||||
@@ -64,13 +64,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().
|
||||
@@ -94,15 +94,15 @@ MmioReadBuffer16 (
|
||||
UINT16 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead16 (StartAddress);
|
||||
StartAddress += sizeof (UINT16);
|
||||
@@ -115,13 +115,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().
|
||||
@@ -145,15 +145,15 @@ MmioReadBuffer32 (
|
||||
UINT32 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead32 (StartAddress);
|
||||
StartAddress += sizeof (UINT32);
|
||||
@@ -166,13 +166,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().
|
||||
@@ -196,15 +196,15 @@ MmioReadBuffer64 (
|
||||
UINT64 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead64 (StartAddress);
|
||||
StartAddress += sizeof (UINT64);
|
||||
@@ -218,11 +218,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().
|
||||
|
||||
|
||||
@@ -245,27 +245,27 @@ MmioWriteBuffer8 (
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
|
||||
ReturnBuffer = (UINT8 *) Buffer;
|
||||
|
||||
|
||||
while (Length-- != 0) {
|
||||
MmioWrite8 (StartAddress++, *(Buffer++));
|
||||
}
|
||||
|
||||
return ReturnBuffer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
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().
|
||||
@@ -290,7 +290,7 @@ MmioWriteBuffer16 (
|
||||
UINT16 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -298,10 +298,10 @@ MmioWriteBuffer16 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT16 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite16 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT16);
|
||||
Length -= sizeof (UINT16);
|
||||
}
|
||||
@@ -313,13 +313,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().
|
||||
@@ -344,7 +344,7 @@ MmioWriteBuffer32 (
|
||||
UINT32 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -352,10 +352,10 @@ MmioWriteBuffer32 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT32 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite32 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT32);
|
||||
Length -= sizeof (UINT32);
|
||||
}
|
||||
@@ -366,13 +366,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().
|
||||
@@ -397,7 +397,7 @@ MmioWriteBuffer64 (
|
||||
UINT64 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -405,10 +405,10 @@ MmioWriteBuffer64 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT64 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite64 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT64);
|
||||
Length -= sizeof (UINT64);
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# I/O Library implementation that uses the CPU I/O PPI for I/O
|
||||
# and MMIO operations.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -34,7 +34,7 @@
|
||||
IoHighLevel.c
|
||||
IoLib.c
|
||||
IoLibMmioBuffer.c
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
Reference in New Issue
Block a user