Synchronize the h files with c files.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6967 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy 2008-12-10 06:13:43 +00:00
parent 4c395b6d95
commit 2281e7a9c3
12 changed files with 349 additions and 195 deletions

View File

@ -129,7 +129,7 @@ DebugAssert (
PcdDebugClearMemoryValue, and returns Buffer. PcdDebugClearMemoryValue, and returns Buffer.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
@param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.

View File

@ -422,7 +422,7 @@ BuildMemoryAllocationHob (
@param Hob A pointer to a HOB. @param Hob A pointer to a HOB.
@return HobType @return HobType.
**/ **/
#define GET_HOB_TYPE(HobStart) \ #define GET_HOB_TYPE(HobStart) \
@ -436,7 +436,7 @@ BuildMemoryAllocationHob (
@param Hob A pointer to a HOB. @param Hob A pointer to a HOB.
@return HobLength @return HobLength.
**/ **/
#define GET_HOB_LENGTH(HobStart) \ #define GET_HOB_LENGTH(HobStart) \
@ -479,7 +479,7 @@ BuildMemoryAllocationHob (
@param GuidHob A pointer to a HOB. @param GuidHob A pointer to a HOB.
@return A pointer to the data buffer in a HOB @return A pointer to the data buffer in a HOB.
**/ **/
#define GET_GUID_HOB_DATA(HobStart) \ #define GET_GUID_HOB_DATA(HobStart) \
@ -493,7 +493,7 @@ BuildMemoryAllocationHob (
@param GuidHob A pointer to a HOB. @param GuidHob A pointer to a HOB.
@return The size of the data buffer @return The size of the data buffer.
**/ **/
#define GET_GUID_HOB_DATA_SIZE(HobStart) \ #define GET_GUID_HOB_DATA_SIZE(HobStart) \
(UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE)) (UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE))

View File

@ -1237,6 +1237,8 @@ MmioRead8 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
**/ **/
UINT8 UINT8
@ -1525,6 +1527,8 @@ MmioRead16 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
**/ **/
UINT16 UINT16
@ -1820,6 +1824,8 @@ MmioRead32 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
**/ **/
UINT32 UINT32

View File

@ -127,8 +127,7 @@ IoAndThenOr8 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..7. Range 0..7.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT8 UINT8
@ -314,6 +313,7 @@ IoBitFieldAndThenOr8 (
operations are serialized. operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param OrData The value to OR with the read value from the I/O port. @param OrData The value to OR with the read value from the I/O port.
@ -342,7 +342,8 @@ IoOr16 (
are serialized. are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @param AndData The value to AND with the read value from the I/O port.
@ -371,7 +372,8 @@ IoAnd16 (
I/O read and write operations are serialized. I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @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. @param OrData The value to OR with the result of the AND operation.
@ -397,6 +399,7 @@ IoAndThenOr16 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 16-bit I/O port operations are not supported, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -407,8 +410,7 @@ IoAndThenOr16 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..15. Range 0..15.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT16 UINT16
@ -431,6 +433,7 @@ IoBitFieldRead16 (
left bits in Value are stripped. left bits in Value are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -471,6 +474,7 @@ IoBitFieldWrite16 (
operations are serialized. Extra left bits in OrData are stripped. operations are serialized. Extra left bits in OrData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -511,6 +515,7 @@ IoBitFieldOr16 (
are serialized. Extra left bits in AndData are stripped. are serialized. Extra left bits in AndData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -553,6 +558,7 @@ IoBitFieldAnd16 (
AndData and OrData are stripped. AndData and OrData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -595,6 +601,7 @@ IoBitFieldAndThenOr16 (
operations are serialized. operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param OrData The value to OR with the read value from the I/O port. @param OrData The value to OR with the read value from the I/O port.
@ -623,6 +630,7 @@ IoOr32 (
are serialized. are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @param AndData The value to AND with the read value from the I/O port.
@ -652,6 +660,7 @@ IoAnd32 (
I/O read and write operations are serialized. I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @param AndData The value to AND with the read value from the I/O port.
@ -678,6 +687,7 @@ IoAndThenOr32 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 32-bit I/O port operations are not supported, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -688,8 +698,7 @@ IoAndThenOr32 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31. Range 0..31.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT32 UINT32
@ -712,6 +721,7 @@ IoBitFieldRead32 (
left bits in Value are stripped. left bits in Value are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -752,6 +762,7 @@ IoBitFieldWrite32 (
operations are serialized. Extra left bits in OrData are stripped. operations are serialized. Extra left bits in OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -792,6 +803,7 @@ IoBitFieldOr32 (
are serialized. Extra left bits in AndData are stripped. are serialized. Extra left bits in AndData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -834,6 +846,7 @@ IoBitFieldAnd32 (
AndData and OrData are stripped. AndData and OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -876,6 +889,7 @@ IoBitFieldAndThenOr32 (
operations are serialized. operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to write. @param Port The I/O port to write.
@param OrData The value to OR with the read value from the I/O port. @param OrData The value to OR with the read value from the I/O port.
@ -904,6 +918,7 @@ IoOr64 (
are serialized. are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to write. @param Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @param AndData The value to AND with the read value from the I/O port.
@ -933,6 +948,7 @@ IoAnd64 (
I/O read and write operations are serialized. I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to write. @param Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port. @param AndData The value to AND with the read value from the I/O port.
@ -959,6 +975,7 @@ IoAndThenOr64 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -969,8 +986,7 @@ IoAndThenOr64 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..63. Range 0..63.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT64 UINT64
@ -993,6 +1009,7 @@ IoBitFieldRead64 (
left bits in Value are stripped. left bits in Value are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1033,6 +1050,7 @@ IoBitFieldWrite64 (
operations are serialized. Extra left bits in OrData are stripped. operations are serialized. Extra left bits in OrData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1073,6 +1091,7 @@ IoBitFieldOr64 (
are serialized. Extra left bits in AndData are stripped. are serialized. Extra left bits in AndData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1115,6 +1134,7 @@ IoBitFieldAnd64 (
AndData and OrData are stripped. AndData and OrData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1251,8 +1271,7 @@ MmioAndThenOr8 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..7. Range 0..7.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT8 UINT8
@ -1440,6 +1459,7 @@ MmioBitFieldAndThenOr8 (
all MMIO read and write operations are serialized. all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param OrData The value to OR with the read value from the MMIO register. @param OrData The value to OR with the read value from the MMIO register.
@ -1468,6 +1488,7 @@ MmioOr16 (
read and write operations are serialized. read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -1497,7 +1518,7 @@ MmioAnd16 (
must guarantee that all MMIO read and write operations are serialized. must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -1524,6 +1545,7 @@ MmioAndThenOr16 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1534,8 +1556,7 @@ MmioAndThenOr16 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..15. Range 0..15.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT16 UINT16
@ -1557,6 +1578,7 @@ MmioBitFieldRead16 (
MMIO register are preserved. The new value of the 16-bit register is returned. MMIO register are preserved. The new value of the 16-bit register is returned.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1598,6 +1620,7 @@ MmioBitFieldWrite16 (
are stripped. are stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1639,6 +1662,7 @@ MmioBitFieldOr16 (
stripped. stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1681,6 +1705,7 @@ MmioBitFieldAnd16 (
serialized. Extra left bits in both AndData and OrData are stripped. serialized. Extra left bits in both AndData and OrData are stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
If StartBit is greater than 15, then ASSERT(). If StartBit is greater than 15, then ASSERT().
If EndBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1723,6 +1748,7 @@ MmioBitFieldAndThenOr16 (
all MMIO read and write operations are serialized. all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param OrData The value to OR with the read value from the MMIO register. @param OrData The value to OR with the read value from the MMIO register.
@ -1751,6 +1777,7 @@ MmioOr32 (
read and write operations are serialized. read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -1780,7 +1807,7 @@ MmioAnd32 (
must guarantee that all MMIO read and write operations are serialized. must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -1807,6 +1834,7 @@ MmioAndThenOr32 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1817,8 +1845,7 @@ MmioAndThenOr32 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31. Range 0..31.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT32 UINT32
@ -1840,6 +1867,7 @@ MmioBitFieldRead32 (
MMIO register are preserved. The new value of the 32-bit register is returned. MMIO register are preserved. The new value of the 32-bit register is returned.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1881,6 +1909,7 @@ MmioBitFieldWrite32 (
are stripped. are stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1922,6 +1951,7 @@ MmioBitFieldOr32 (
stripped. stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -1964,6 +1994,7 @@ MmioBitFieldAnd32 (
serialized. Extra left bits in both AndData and OrData are stripped. serialized. Extra left bits in both AndData and OrData are stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
If StartBit is greater than 31, then ASSERT(). If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -2006,6 +2037,7 @@ MmioBitFieldAndThenOr32 (
all MMIO read and write operations are serialized. all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param OrData The value to OR with the read value from the MMIO register. @param OrData The value to OR with the read value from the MMIO register.
@ -2034,6 +2066,7 @@ MmioOr64 (
read and write operations are serialized. read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -2063,7 +2096,7 @@ MmioAnd64 (
must guarantee that all MMIO read and write operations are serialized. must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param AndData The value to AND with the read value from the MMIO register. @param AndData The value to AND with the read value from the MMIO register.
@ -2090,6 +2123,7 @@ MmioAndThenOr64 (
the StartBit and the EndBit. The value of the bit field is returned. the StartBit and the EndBit. The value of the bit field is returned.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -2100,8 +2134,7 @@ MmioAndThenOr64 (
@param EndBit The ordinal of the most significant bit in the bit field. @param EndBit The ordinal of the most significant bit in the bit field.
Range 0..63. Range 0..63.
@return The value read from I/O port specified by StartBit and @return The value read.
EndBit.
**/ **/
UINT64 UINT64
@ -2123,6 +2156,7 @@ MmioBitFieldRead64 (
MMIO register are preserved. The new value of the 64-bit register is returned. MMIO register are preserved. The new value of the 64-bit register is returned.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -2164,6 +2198,7 @@ MmioBitFieldWrite64 (
are stripped. are stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -2205,6 +2240,7 @@ MmioBitFieldOr64 (
stripped. stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
@ -2247,6 +2283,7 @@ MmioBitFieldAnd64 (
serialized. Extra left bits in both AndData and OrData are stripped. serialized. Extra left bits in both AndData and OrData are stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
If StartBit is greater than 63, then ASSERT(). If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

View File

@ -22,10 +22,11 @@
serialized. serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to read. @param Port The I/O port to read.
@return Always return zero. @return The value read.
**/ **/
UINT64 UINT64
@ -46,11 +47,12 @@ IoRead64 (
operations are serialized. operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to write. @param Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@return Always return zero. @return The value written the I/O port.
**/ **/
UINT64 UINT64

View File

@ -35,7 +35,7 @@
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT8 UINT8
@ -58,10 +58,9 @@ MmioRead8 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
@ -81,10 +80,11 @@ MmioWrite8 (
operations are serialized. operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT16 UINT16
@ -105,13 +105,13 @@ MmioRead16 (
and write operations are serialized. and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT16 UINT16
EFIAPI EFIAPI
@ -132,10 +132,11 @@ MmioWrite16 (
operations are serialized. operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT32 UINT32
@ -156,13 +157,13 @@ MmioRead32 (
and write operations are serialized. and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return Value.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
@ -183,10 +184,11 @@ MmioWrite32 (
operations are serialized. operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT64 UINT64
@ -207,13 +209,11 @@ MmioRead64 (
and write operations are serialized. and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI
@ -243,6 +243,20 @@ MmioWrite64 (
**/ **/
__inline__ __inline__
/**
Reads an 8-bit I/O port.
Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
This function must guarantee that all I/O read and write operations are
serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to read.
@return The value read.
**/
UINT8 UINT8
EFIAPI EFIAPI
IoRead8 ( IoRead8 (
@ -273,6 +287,21 @@ IoRead8 (
**/ **/
__inline__ __inline__
/**
Writes an 8-bit I/O port.
Writes the 8-bit I/O port specified by Port with the value specified by Value
and returns Value. This function must guarantee that all I/O read and write
operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to write.
@param Value The value to write to the I/O port.
@return The value written the I/O port.
**/
UINT8 UINT8
EFIAPI EFIAPI
IoWrite8 ( IoWrite8 (
@ -299,6 +328,21 @@ IoWrite8 (
**/ **/
__inline__ __inline__
/**
Reads a 16-bit I/O port.
Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
This function must guarantee that all I/O read and write operations are
serialized.
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 read.
@return The value read.
**/
UINT16 UINT16
EFIAPI EFIAPI
IoRead16 ( IoRead16 (
@ -330,6 +374,22 @@ IoRead16 (
**/ **/
__inline__ __inline__
/**
Writes a 16-bit I/O port.
Writes the 16-bit I/O port specified by Port with the value specified by Value
and returns Value. This function must guarantee that all I/O read and write
operations are serialized.
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.
@return The value written the I/O port.
**/
UINT16 UINT16
EFIAPI EFIAPI
IoWrite16 ( IoWrite16 (
@ -357,6 +417,21 @@ IoWrite16 (
**/ **/
__inline__ __inline__
/**
Reads a 32-bit I/O port.
Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
This function must guarantee that all I/O read and write operations are
serialized.
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.
**/
UINT32 UINT32
EFIAPI EFIAPI
IoRead32 ( IoRead32 (
@ -388,11 +463,27 @@ IoRead32 (
**/ **/
__inline__ __inline__
/**
Writes a 32-bit I/O port.
Writes the 32-bit I/O port specified by Port with the value specified by Value
and returns Value. This function must guarantee that all I/O read and write
operations are serialized.
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.
@return The value written the I/O port.
**/
UINT32 UINT32
EFIAPI EFIAPI
IoWrite32 ( IoWrite32 (
IN UINTN Port, IN UINTN Port,
IN UINT32 Value IN UINT32 Value
) )
{ {
ASSERT ((Port & 3) == 0); ASSERT ((Port & 3) == 0);

View File

@ -26,7 +26,7 @@
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT8 UINT8
@ -50,9 +50,7 @@ MmioRead8 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input @return Value.
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT8 UINT8
@ -73,10 +71,11 @@ MmioWrite8 (
operations are serialized. operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT16 UINT16
@ -97,13 +96,12 @@ MmioRead16 (
and write operations are serialized. and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input @return Value.
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT16 UINT16
@ -125,10 +123,11 @@ MmioWrite16 (
operations are serialized. operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT32 UINT32
@ -149,13 +148,12 @@ MmioRead32 (
and write operations are serialized. and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input @return Value.
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT32 UINT32
@ -177,10 +175,11 @@ MmioWrite32 (
operations are serialized. operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT64 UINT64
@ -201,13 +200,11 @@ MmioRead64 (
and write operations are serialized. and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI
@ -233,7 +230,7 @@ MmioWrite64 (
@param Port The I/O port to read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT8 UINT8
@ -265,9 +262,7 @@ IoRead8 (
@param Port The I/O port to write. @param Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the input @return The value written the I/O port.
Value instead of the actual value read back from the
I/O port.
**/ **/
UINT8 UINT8
@ -293,10 +288,11 @@ IoWrite8 (
serialized. serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT16 UINT16
@ -326,13 +322,12 @@ IoRead16 (
operations are serialized. operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the input @return The value written the I/O port.
Value instead of the actual value read back from the
I/O port.
**/ **/
UINT16 UINT16
@ -361,10 +356,11 @@ IoWrite16 (
serialized. serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT32 UINT32
@ -394,20 +390,19 @@ IoRead32 (
operations are serialized. operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the input @return The value written the I/O port.
Value instead of the actual value read back from the
I/O port.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
IoWrite32 ( IoWrite32 (
IN UINTN Port, IN UINTN Port,
IN UINT32 Value IN UINT32 Value
) )
{ {
ASSERT ((Port & 3) == 0); ASSERT ((Port & 3) == 0);

View File

@ -52,21 +52,23 @@ InternalGetMemoryMapAddress (
} }
/** /**
Reads a 8-bit I/O port. Reads an 8-bit I/O port.
Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned. Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
This function must guarantee that all I/O read and write operations are This function must guarantee that all I/O read and write operations are
serialized. serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
IoRead8 ( IoRead8 (
IN UINTN Port IN UINTN Port
) )
{ {
return MmioRead8 (InternalGetMemoryMapAddress (Port)); return MmioRead8 (InternalGetMemoryMapAddress (Port));
@ -79,15 +81,18 @@ IoRead8 (
This function must guarantee that all I/O read and write operations are This function must guarantee that all I/O read and write operations are
serialized. serialized.
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 read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT16 UINT16
EFIAPI EFIAPI
IoRead16 ( IoRead16 (
IN UINTN Port IN UINTN Port
) )
{ {
return MmioRead16 (InternalGetMemoryMapAddress (Port)); return MmioRead16 (InternalGetMemoryMapAddress (Port));
@ -100,15 +105,18 @@ IoRead16 (
This function must guarantee that all I/O read and write operations are This function must guarantee that all I/O read and write operations are
serialized. serialized.
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. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
IoRead32 ( IoRead32 (
IN UINTN Port IN UINTN Port
) )
{ {
return MmioRead32 (InternalGetMemoryMapAddress (Port)); return MmioRead32 (InternalGetMemoryMapAddress (Port));
@ -122,10 +130,11 @@ IoRead32 (
serialized. serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT64 UINT64
@ -139,28 +148,28 @@ IoRead64 (
} }
/** /**
Writes a 8-bit I/O port. Writes an 8-bit I/O port.
Writes the 8-bit I/O port specified by Port with the value specified by Value Writes the 8-bit I/O port specified by Port with the value specified by Value
and returns Value. This function must guarantee that all I/O read and write and returns Value. This function must guarantee that all I/O read and write
operations are serialized. operations are serialized.
@param Port The I/O port to write. If 8-bit I/O port operations are not supported, then ASSERT().
@param Data The value to write to the I/O port.
@return The value written to the I/O port. It equals to the @param Port The I/O port to write.
input Value instead of the actual value read back from @param Value The value to write to the I/O port.
the I/O port.
@return The value written the I/O port.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
IoWrite8 ( IoWrite8 (
IN UINTN Port, IN UINTN Port,
IN UINT8 Data IN UINT8 Value
) )
{ {
return MmioWrite8 (InternalGetMemoryMapAddress (Port), Data); return MmioWrite8 (InternalGetMemoryMapAddress (Port), Value);
} }
/** /**
@ -170,22 +179,23 @@ IoWrite8 (
and returns Value. This function must guarantee that all I/O read and write and returns Value. This function must guarantee that all I/O read and write
operations are serialized. operations are serialized.
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 Port The I/O port to write.
@param Data The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the @return The value written the I/O port.
input Value instead of the actual value read back from
the I/O port.
**/ **/
UINT16 UINT16
EFIAPI EFIAPI
IoWrite16 ( IoWrite16 (
IN UINTN Port, IN UINTN Port,
IN UINT16 Data IN UINT16 Value
) )
{ {
return MmioWrite16 (InternalGetMemoryMapAddress (Port), Data); return MmioWrite16 (InternalGetMemoryMapAddress (Port), Value);
} }
/** /**
@ -195,22 +205,23 @@ IoWrite16 (
and returns Value. This function must guarantee that all I/O read and write and returns Value. This function must guarantee that all I/O read and write
operations are serialized. operations are serialized.
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 Port The I/O port to write.
@param Data The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the @return The value written the I/O port.
input Value instead of the actual value read back from
the I/O port.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
IoWrite32 ( IoWrite32 (
IN UINTN Port, IN UINTN Port,
IN UINT32 Data IN UINT32 Value
) )
{ {
return MmioWrite32 (InternalGetMemoryMapAddress (Port), Data); return MmioWrite32 (InternalGetMemoryMapAddress (Port), Value);
} }
/** /**
@ -221,13 +232,12 @@ IoWrite32 (
operations are serialized. operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT().
If Port is not aligned on a 64-bit boundary, then ASSERT().
@param Port The I/O port to write. @param Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@return The value written to the I/O port. It equals to the @return The value written the I/O port.
input Value instead of the actual value read back from
the I/O port.
**/ **/
UINT64 UINT64
@ -242,21 +252,23 @@ IoWrite64 (
} }
/** /**
Reads a 8-bit MMIO register. Reads an 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address. The 8-bit read value is Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
returned. This function must guarantee that all MMIO read and write returned. This function must guarantee that all MMIO read and write
operations are serialized. operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
MmioRead8 ( MmioRead8 (
IN UINTN Address IN UINTN Address
) )
{ {
UINT8 Data; UINT8 Data;
@ -277,15 +289,18 @@ MmioRead8 (
returned. This function must guarantee that all MMIO read and write returned. This function must guarantee that all MMIO read and write
operations are serialized. operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT16 UINT16
EFIAPI EFIAPI
MmioRead16 ( MmioRead16 (
IN UINTN Address IN UINTN Address
) )
{ {
UINT16 Data; UINT16 Data;
@ -311,15 +326,18 @@ MmioRead16 (
returned. This function must guarantee that all MMIO read and write returned. This function must guarantee that all MMIO read and write
operations are serialized. operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
MmioRead32 ( MmioRead32 (
IN UINTN Address IN UINTN Address
) )
{ {
UINT32 Data; UINT32 Data;
@ -345,15 +363,18 @@ MmioRead32 (
returned. This function must guarantee that all MMIO read and write returned. This function must guarantee that all MMIO read and write
operations are serialized. operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI
MmioRead64 ( MmioRead64 (
IN UINTN Address IN UINTN Address
) )
{ {
UINT64 Data; UINT64 Data;
@ -374,34 +395,34 @@ MmioRead64 (
} }
/** /**
Writes a 8-bit MMIO register. Writes an 8-bit MMIO register.
Writes the 8-bit MMIO register specified by Address with the value specified Writes the 8-bit MMIO register specified by Address with the value specified
by Value and returns Value. This function must guarantee that all MMIO read by Value and returns Value. This function must guarantee that all MMIO read
and write operations are serialized. and write operations are serialized.
@param Address The MMIO register to write. If 8-bit MMIO register operations are not supported, then ASSERT().
@param Data The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the @param Address The MMIO register to write.
input Value instead of the actual value read back from @param Value The value to write to the MMIO register.
the Mmio.
@return Value.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
MmioWrite8 ( MmioWrite8 (
IN UINTN Address, IN UINTN Address,
IN UINT8 Data IN UINT8 Value
) )
{ {
Address |= BIT63; Address |= BIT63;
MemoryFence (); MemoryFence ();
*((volatile UINT8 *) Address) = Data; *((volatile UINT8 *) Address) = Value;
MemoryFence (); MemoryFence ();
return Data; return Value;
} }
/** /**
@ -411,19 +432,20 @@ MmioWrite8 (
by Value and returns Value. This function must guarantee that all MMIO read by Value and returns Value. This function must guarantee that all MMIO read
and write operations are serialized. and write operations are serialized.
@param Address The MMIO register to write. If 16-bit MMIO register operations are not supported, then ASSERT().
@param Data The value to write to the MMIO register. If Address is not aligned on a 16-bit boundary, then ASSERT().
@return The value written to the Mmio. It equals to the @param Address The MMIO register to write.
input Value instead of the actual value read back from @param Value The value to write to the MMIO register.
the Mmio.
@return Value.
**/ **/
UINT16 UINT16
EFIAPI EFIAPI
MmioWrite16 ( MmioWrite16 (
IN UINTN Address, IN UINTN Address,
IN UINT16 Data IN UINT16 Value
) )
{ {
// //
@ -434,10 +456,10 @@ MmioWrite16 (
Address |= BIT63; Address |= BIT63;
MemoryFence (); MemoryFence ();
*((volatile UINT16 *) Address) = Data; *((volatile UINT16 *) Address) = Value;
MemoryFence (); MemoryFence ();
return Data; return Value;
} }
/** /**
@ -447,19 +469,20 @@ MmioWrite16 (
by Value and returns Value. This function must guarantee that all MMIO read by Value and returns Value. This function must guarantee that all MMIO read
and write operations are serialized. and write operations are serialized.
@param Address The MMIO register to write. If 32-bit MMIO register operations are not supported, then ASSERT().
@param Data The value to write to the MMIO register. If Address is not aligned on a 32-bit boundary, then ASSERT().
@return The value written to the Mmio. It equals to the @param Address The MMIO register to write.
input Value instead of the actual value read back from @param Value The value to write to the MMIO register.
the Mmio.
@return Value.
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
MmioWrite32 ( MmioWrite32 (
IN UINTN Address, IN UINTN Address,
IN UINT32 Data IN UINT32 Value
) )
{ {
// //
@ -470,10 +493,10 @@ MmioWrite32 (
Address |= BIT63; Address |= BIT63;
MemoryFence (); MemoryFence ();
*((volatile UINT32 *) Address) = Data; *((volatile UINT32 *) Address) = Value;
MemoryFence (); MemoryFence ();
return Data; return Value;
} }
/** /**
@ -483,19 +506,18 @@ MmioWrite32 (
by Value and returns Value. This function must guarantee that all MMIO read by Value and returns Value. This function must guarantee that all MMIO read
and write operations are serialized. and write operations are serialized.
@param Address The MMIO register to write. If 64-bit MMIO register operations are not supported, then ASSERT().
@param Data The value to write to the MMIO register. If Address is not aligned on a 64-bit boundary, then ASSERT().
@return The value written to the Mmio. It equals to the @param Address The MMIO register to write.
input Value instead of the actual value read back from @param Value The value to write to the MMIO register.
the Mmio.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI
MmioWrite64 ( MmioWrite64 (
IN UINTN Address, IN UINTN Address,
IN UINT64 Data IN UINT64 Value
) )
{ {
// //
@ -506,8 +528,8 @@ MmioWrite64 (
Address |= BIT63; Address |= BIT63;
MemoryFence (); MemoryFence ();
*((volatile UINT64 *) Address) = Data; *((volatile UINT64 *) Address) = Value;
MemoryFence (); MemoryFence ();
return Data; return Value;
} }

View File

@ -26,10 +26,10 @@
@param StartAddress Starting address for the MMIO region to be copied from. @param StartAddress Starting address for the MMIO region to be copied from.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer receiving the data read. @param Buffer Pointer to a system memory buffer receiving the data read.
@return Buffer contains the data read from Mmio. @return Buffer
**/ **/
UINT8 * UINT8 *
@ -70,10 +70,10 @@ MmioReadBuffer8 (
If Buffer is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied from. @param StartAddress Starting address for the MMIO region to be copied from.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer receiving the data read. @param Buffer Pointer to a system memory buffer receiving the data read.
@return Buffer contains the data read from Mmio. @return Buffer
**/ **/
UINT16 * UINT16 *
@ -121,10 +121,10 @@ MmioReadBuffer16 (
If Buffer is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied from. @param StartAddress Starting address for the MMIO region to be copied from.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer receiving the data read. @param Buffer Pointer to a system memory buffer receiving the data read.
@return Buffer contains the data read from Mmio. @return Buffer
**/ **/
UINT32 * UINT32 *
@ -172,10 +172,10 @@ MmioReadBuffer32 (
If Buffer is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied from. @param StartAddress Starting address for the MMIO region to be copied from.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer receiving the data read. @param Buffer Pointer to a system memory buffer receiving the data read.
@return Buffer contains the data read from Mmio. @return Buffer
**/ **/
UINT64 * UINT64 *
@ -220,7 +220,7 @@ MmioReadBuffer64 (
@param StartAddress Starting address for the MMIO region to be copied to. @param StartAddress Starting address for the MMIO region to be copied to.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer containing the data to write. @param Buffer Pointer to a system memory buffer containing the data to write.
@return Size in bytes of the copy. @return Size in bytes of the copy.
@ -266,7 +266,7 @@ MmioWriteBuffer8 (
If Buffer is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to. @param StartAddress Starting address for the MMIO region to be copied to.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer containing the data to write. @param Buffer Pointer to a system memory buffer containing the data to write.
@return Size in bytes of the copy. @return Size in bytes of the copy.
@ -320,7 +320,7 @@ MmioWriteBuffer16 (
If Buffer is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to. @param StartAddress Starting address for the MMIO region to be copied to.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer containing the data to write. @param Buffer Pointer to a system memory buffer containing the data to write.
@return Size in bytes of the copy. @return Size in bytes of the copy.
@ -373,7 +373,7 @@ MmioWriteBuffer32 (
If Buffer is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().
@param StartAddress Starting address for the MMIO region to be copied to. @param StartAddress Starting address for the MMIO region to be copied to.
@param Length Size in bytes of the copy. @param Length The size, in bytes, of Buffer.
@param Buffer Pointer to a system memory buffer containing the data to write. @param Buffer Pointer to a system memory buffer containing the data to write.
@return Size in bytes of the copy. @return Size in bytes of the copy.

View File

@ -62,7 +62,7 @@ void _ReadWriteBarrier (void);
@param Port The I/O port to read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT8 UINT8
@ -115,10 +115,11 @@ IoWrite8 (
serialized. serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 read. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT16 UINT16
@ -144,7 +145,8 @@ IoRead16 (
operations are serialized. operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@ -173,10 +175,11 @@ IoWrite16 (
serialized. serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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. @param Port The I/O port to read.
@return The value read from Port. @return The value read.
**/ **/
UINT32 UINT32
@ -202,7 +205,8 @@ IoRead32 (
operations are serialized. operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). 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 Port The I/O port to write.
@param Value The value to write to the I/O port. @param Value The value to write to the I/O port.
@ -235,7 +239,7 @@ IoWrite32 (
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT8 UINT8
@ -262,10 +266,8 @@ MmioRead8 (
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input @return Value.
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT8 UINT8
EFIAPI EFIAPI
@ -285,10 +287,11 @@ MmioWrite8 (
operations are serialized. operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT16 UINT16
@ -312,12 +315,12 @@ MmioRead16 (
and write operations are serialized. and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If 16-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 16-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value read from the Mmio after wrote specified @return Value.
Value.
**/ **/
UINT16 UINT16
@ -339,10 +342,11 @@ MmioWrite16 (
operations are serialized. operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT32 UINT32
@ -366,13 +370,12 @@ MmioRead32 (
and write operations are serialized. and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If 32-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 32-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input @return Value.
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT32 UINT32
@ -394,10 +397,11 @@ MmioWrite32 (
operations are serialized. operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to read. @param Address The MMIO register to read.
@return The value read from Address. @return The value read.
**/ **/
UINT64 UINT64
@ -421,14 +425,11 @@ MmioRead64 (
and write operations are serialized. and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If 64-bit MMIO register operations are not supported, then ASSERT().
If Address is not aligned on a 64-bit boundary, then ASSERT().
@param Address The MMIO register to write. @param Address The MMIO register to write.
@param Value The value to write to the MMIO register. @param Value The value to write to the MMIO register.
@return The value written to the Mmio. It equals to the input
Value instead of the actual value read back from the
Mmio.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI

View File

@ -75,7 +75,7 @@ _ModuleEntryPoint (
/** /**
Invokes the library destructors fror all dependent libraries and terminates Invokes the library destructors for all dependent libraries and terminates
the UEFI Application. the UEFI Application.
This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit() This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()

View File

@ -407,7 +407,7 @@ UsbSetReportRequest (
Request.Request = EFI_USB_SET_REPORT_REQUEST; Request.Request = EFI_USB_SET_REPORT_REQUEST;
Request.Value = (UINT16) ((ReportType << 8) | ReportId); Request.Value = (UINT16) ((ReportType << 8) | ReportId);
Request.Index = Interface; Request.Index = Interface;
Request.Length = ReportLength; Request.Length = ReportLen;
Result = UsbIo->UsbControlTransfer ( Result = UsbIo->UsbControlTransfer (
UsbIo, UsbIo,