Synchronize function comment in MdePkg\Library\BaseLib.h with the instance of this functions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6718 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy 2008-11-25 03:19:49 +00:00
parent 04fdba5412
commit 9aa049d971
28 changed files with 427 additions and 415 deletions

View File

@ -148,7 +148,7 @@ typedef struct {
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@return Destiantion @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -184,7 +184,7 @@ StrCpy (
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@param Length Maximum number of Unicode characters to copy. @param Length Maximum number of Unicode characters to copy.
@return Destination @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -349,7 +349,7 @@ StrnCmp (
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@return Destination @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -394,7 +394,7 @@ StrCat (
@param Length Maximum number of Unicode characters to concatenate from @param Length Maximum number of Unicode characters to concatenate from
Source. Source.
@return Destination @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -406,7 +406,7 @@ StrnCat (
); );
/** /**
Returns the first occurance of a Null-terminated Unicode sub-string Returns the first occurrence of a Null-terminated Unicode sub-string
in a Null-terminated Unicode string. in a Null-terminated Unicode string.
This function scans the contents of the Null-terminated Unicode string This function scans the contents of the Null-terminated Unicode string
@ -634,7 +634,7 @@ NibbleToHexChar (
the last character in the output string. The one next to first byte will be put into the the last character in the output string. The one next to first byte will be put into the
character before the last character. This rules applies to the rest of the bytes. The Unicode character before the last character. This rules applies to the rest of the bytes. The Unicode
character by the last byte will be put into the first character in the output string. For example, character by the last byte will be put into the first character in the output string. For example,
the input buffer for a 64-bits unsigned integrer 0x12345678abcdef1234 will be converted to the input buffer for a 64-bits unsigned integer 0x12345678abcdef1234 will be converted to
a Unicode string equal to L"12345678abcdef1234". a Unicode string equal to L"12345678abcdef1234".
@param String On input, String is pointed to the buffer allocated for the convertion. @param String On input, String is pointed to the buffer allocated for the convertion.
@ -642,10 +642,10 @@ NibbleToHexChar (
The StringLen required to convert a N bytes Buffer will be a least equal to or greater The StringLen required to convert a N bytes Buffer will be a least equal to or greater
than 2*N + 1. than 2*N + 1.
@param Buffer The pointer to a input buffer. @param Buffer The pointer to a input buffer.
@param BufferSizeInBytes Lenth in bytes of the input buffer. @param BufferSizeInBytes Length in bytes of the input buffer.
@retval EFI_SUCCESS The convertion is successfull. All bytes in Buffer has been convert to the corresponding @retval EFI_SUCCESS The convertion is successful. All bytes in Buffer has been convert to the corresponding
Unicode character and placed into the right place in String. Unicode character and placed into the right place in String.
@retval EFI_BUFFER_TOO_SMALL StringSizeInBytes is smaller than 2 * N + 1the number of bytes required to @retval EFI_BUFFER_TOO_SMALL StringSizeInBytes is smaller than 2 * N + 1the number of bytes required to
complete the convertion. complete the convertion.
@ -758,7 +758,7 @@ IsHexDigit (
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@param Destination Pointer to a Null-terminated ASCII string. @param Destination Pointer to a Null-terminated ASCII string.
@return Destination @return Destination.
**/ **/
CHAR8 * CHAR8 *
@ -1067,7 +1067,7 @@ AsciiStrnCat (
/** /**
Returns the first occurance of a Null-terminated ASCII sub-string Returns the first occurrence of a Null-terminated ASCII sub-string
in a Null-terminated ASCII string. in a Null-terminated ASCII string.
This function scans the contents of the ASCII string specified by String This function scans the contents of the ASCII string specified by String
@ -1087,7 +1087,7 @@ AsciiStrnCat (
@retval NULL If the SearchString does not appear in String. @retval NULL If the SearchString does not appear in String.
@retval others If there is a match return the first occurrence of SearchingString. @retval others If there is a match return the first occurrence of SearchingString.
If the lenth of SearchString is zero,return String. If the length of SearchString is zero,return String.
**/ **/
CHAR8 * CHAR8 *
@ -1278,7 +1278,7 @@ AsciiStrHexToUint64 (
@param Source Pointer to a Null-terminated ASCII string. @param Source Pointer to a Null-terminated ASCII string.
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@return Destination @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -1299,7 +1299,7 @@ AsciiStrToUnicodeStr (
@param Value The 8-bit value to convert to BCD. Range 0..99. @param Value The 8-bit value to convert to BCD. Range 0..99.
@return The BCD value @return The BCD value.
**/ **/
UINT8 UINT8
@ -1603,7 +1603,7 @@ IsNodeAtEnd (
@param FirstEntry A pointer to a node in a linked list. @param FirstEntry A pointer to a node in a linked list.
@param SecondEntry A pointer to another node in the same linked list. @param SecondEntry A pointer to another node in the same linked list.
@return SecondEntry @return SecondEntry.
**/ **/
LIST_ENTRY * LIST_ENTRY *
@ -1630,9 +1630,9 @@ SwapListEntries (
linked list containing Entry, including the Entry node, is greater than linked list containing Entry, including the Entry node, is greater than
or equal to PcdMaximumLinkedListLength, then ASSERT(). or equal to PcdMaximumLinkedListLength, then ASSERT().
@param Entry A pointer to a node in a linked list @param Entry A pointer to a node in a linked list.
@return Entry @return Entry.
**/ **/
LIST_ENTRY * LIST_ENTRY *
@ -1657,7 +1657,7 @@ RemoveEntryList (
@param Operand The 64-bit operand to shift left. @param Operand The 64-bit operand to shift left.
@param Count The number of bits to shift left. @param Count The number of bits to shift left.
@return Operand << Count @return Operand << Count.
**/ **/
UINT64 UINT64
@ -1819,7 +1819,7 @@ RRotU64 (
@param Operand The 32-bit operand to evaluate. @param Operand The 32-bit operand to evaluate.
@retval 0-31 The lowest bit set in Operand was found. @retval 0..31 The lowest bit set in Operand was found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
@ -1839,7 +1839,7 @@ LowBitSet32 (
@param Operand The 64-bit operand to evaluate. @param Operand The 64-bit operand to evaluate.
@retval 0-63 The lowest bit set in Operand was found. @retval 0..63 The lowest bit set in Operand was found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
@ -1861,7 +1861,7 @@ LowBitSet64 (
@param Operand The 32-bit operand to evaluate. @param Operand The 32-bit operand to evaluate.
@retval 0-31 Position of the highest bit set in Operand if found. @retval 0..31 Position of the highest bit set in Operand if found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
@ -1882,7 +1882,7 @@ HighBitSet32 (
@param Operand The 64-bit operand to evaluate. @param Operand The 64-bit operand to evaluate.
@retval 0-63 Position of the highest bit set in Operand if found. @retval 0..63 Position of the highest bit set in Operand if found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
@ -2175,7 +2175,7 @@ DivU64x64Remainder (
NULL, then the 64-bit signed remainder is returned in Remainder. This NULL, then the 64-bit signed remainder is returned in Remainder. This
function returns the 64-bit signed quotient. function returns the 64-bit signed quotient.
It is the caller¡¯s responsibility to not call this function with a Divisor of 0. It is the caller's responsibility to not call this function with a Divisor of 0.
If Divisor is 0, then the quotient and remainder should be assumed to be If Divisor is 0, then the quotient and remainder should be assumed to be
the largest negative integer. the largest negative integer.
@ -3089,7 +3089,7 @@ InitializeSpinLock (
@param SpinLock A pointer to the spin lock to place in the acquired state. @param SpinLock A pointer to the spin lock to place in the acquired state.
@return SpinLock accquired lock. @return SpinLock acquired lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *

View File

@ -26,7 +26,7 @@
@param Operand The 64-bit operand to shift right. @param Operand The 64-bit operand to shift right.
@param Count The number of bits to shift right. @param Count The number of bits to shift right.
@return Operand arithmetically shifted right by Count @return Operand >> Count
**/ **/
UINT64 UINT64

View File

@ -16,21 +16,21 @@
#include "BaseLibInternals.h" #include "BaseLibInternals.h"
/** /**
Calculate the sum of all elements in a buffer in unit of UINT8. Returns the sum of all elements in a buffer in unit of UINT8.
During calculation, the carry bits are dropped. During calculation, the carry bits are dropped.
This function calculates the sum of all elements in a buffer This function calculates the sum of all elements in a buffer
in unit of UINT8. The carry bits in result of addition are dropped. in unit of UINT8. The carry bits in result of addition are dropped.
The result is returned as UINT8. If Length is Zero, then Zero is The result is returned as UINT8. If Length is Zero, then Zero is
returned. returned.
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 buffer to carry out the sum operation. @param Buffer Pointer to the buffer to carry out the sum operation.
@param Length The size, in bytes, of Buffer . @param Length The size, in bytes, of Buffer.
@return The sum of Buffer with carry bits dropped during additions. @return Sum The sum of Buffer with carry bits dropped during additions.
**/ **/
UINT8 UINT8
@ -55,21 +55,21 @@ CalculateSum8 (
/** /**
Returns the two's complement checksum of all elements in a buffer Returns the two's complement checksum of all elements in a buffer
of 8-bit values. of 8-bit values.
This function first calculates the sum of the 8-bit values in the This function first calculates the sum of the 8-bit values in the
buffer specified by Buffer and Length. The carry bits in the result buffer specified by Buffer and Length. The carry bits in the result
of addition are dropped. Then, the two's complement of the sum is of addition are dropped. Then, the two's complement of the sum is
returned. If Length is 0, then 0 is returned. returned. If Length is 0, then 0 is returned.
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 buffer to carry out the checksum operation. @param Buffer Pointer to the buffer to carry out the checksum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The 2's complement checksum of Buffer. @return Checksum The 2's complement checksum of Buffer.
**/ **/
UINT8 UINT8
@ -90,13 +90,13 @@ CalculateCheckSum8 (
} }
/** /**
Returns the sum of all elements in a buffer of 16-bit values. During Returns the sum of all elements in a buffer of 16-bit values. During
calculation, the carry bits are dropped. calculation, the carry bits are dropped.
This function calculates the sum of the 16-bit values in the buffer This function calculates the sum of the 16-bit values in the buffer
specified by Buffer and Length. The carry bits in result of addition are dropped. specified by Buffer and Length. The carry bits in result of addition are dropped.
The 16-bit result is returned. If Length is 0, then 0 is returned. The 16-bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT(). If Length is not aligned on a 16-bit boundary, then ASSERT().
@ -105,7 +105,7 @@ CalculateCheckSum8 (
@param Buffer Pointer to the buffer to carry out the sum operation. @param Buffer Pointer to the buffer to carry out the sum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The sum of Buffer with carry bits dropped during additions. @return Sum The sum of Buffer with carry bits dropped during additions.
**/ **/
UINT16 UINT16
@ -134,23 +134,23 @@ CalculateSum16 (
/** /**
Returns the two's complement checksum of all elements in a buffer of Returns the two's complement checksum of all elements in a buffer of
16-bit values. 16-bit values.
This function first calculates the sum of the 16-bit values in the buffer This function first calculates the sum of the 16-bit values in the buffer
specified by Buffer and Length. The carry bits in the result of addition specified by Buffer and Length. The carry bits in the result of addition
are dropped. Then, the two's complement of the sum is returned. If Length are dropped. Then, the two's complement of the sum is returned. If Length
is 0, then 0 is returned. is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT(). If Length is not aligned on a 16-bit boundary, 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 buffer to carry out the checksum operation. @param Buffer Pointer to the buffer to carry out the checksum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The 2's complement checksum of Buffer. @return Checksum The 2's complement checksum of Buffer.
**/ **/
UINT16 UINT16
@ -172,13 +172,13 @@ CalculateCheckSum16 (
/** /**
Returns the sum of all elements in a buffer of 32-bit values. During Returns the sum of all elements in a buffer of 32-bit values. During
calculation, the carry bits are dropped. calculation, the carry bits are dropped.
This function calculates the sum of the 32-bit values in the buffer This function calculates the sum of the 32-bit values in the buffer
specified by Buffer and Length. The carry bits in result of addition are dropped. specified by Buffer and Length. The carry bits in result of addition are dropped.
The 32-bit result is returned. If Length is 0, then 0 is returned. The 32-bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT(). If Length is not aligned on a 32-bit boundary, then ASSERT().
@ -187,7 +187,7 @@ CalculateCheckSum16 (
@param Buffer Pointer to the buffer to carry out the sum operation. @param Buffer Pointer to the buffer to carry out the sum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The sum of Buffer with carry bits dropped during additions. @return Sum The sum of Buffer with carry bits dropped during additions.
**/ **/
UINT32 UINT32
@ -216,23 +216,23 @@ CalculateSum32 (
/** /**
Returns the two's complement checksum of all elements in a buffer of Returns the two's complement checksum of all elements in a buffer of
32-bit values. 32-bit values.
This function first calculates the sum of the 32-bit values in the buffer This function first calculates the sum of the 32-bit values in the buffer
specified by Buffer and Length. The carry bits in the result of addition specified by Buffer and Length. The carry bits in the result of addition
are dropped. Then, the two's complement of the sum is returned. If Length are dropped. Then, the two's complement of the sum is returned. If Length
is 0, then 0 is returned. is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT(). If Length is not aligned on a 32-bit boundary, 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 buffer to carry out the checksum operation. @param Buffer Pointer to the buffer to carry out the checksum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The 2's complement checksum of Buffer. @return Checksum The 2's complement checksum of Buffer.
**/ **/
UINT32 UINT32
@ -254,13 +254,13 @@ CalculateCheckSum32 (
/** /**
Returns the sum of all elements in a buffer of 64-bit values. During Returns the sum of all elements in a buffer of 64-bit values. During
calculation, the carry bits are dropped. calculation, the carry bits are dropped.
This function calculates the sum of the 64-bit values in the buffer This function calculates the sum of the 64-bit values in the buffer
specified by Buffer and Length. The carry bits in result of addition are dropped. specified by Buffer and Length. The carry bits in result of addition are dropped.
The 64-bit result is returned. If Length is 0, then 0 is returned. The 64-bit result is returned. If Length is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT(). If Length is not aligned on a 64-bit boundary, then ASSERT().
@ -269,7 +269,7 @@ CalculateCheckSum32 (
@param Buffer Pointer to the buffer to carry out the sum operation. @param Buffer Pointer to the buffer to carry out the sum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The sum of Buffer with carry bits dropped during additions. @return Sum The sum of Buffer with carry bits dropped during additions.
**/ **/
UINT64 UINT64
@ -298,23 +298,23 @@ CalculateSum64 (
/** /**
Returns the two's complement checksum of all elements in a buffer of Returns the two's complement checksum of all elements in a buffer of
64-bit values. 64-bit values.
This function first calculates the sum of the 64-bit values in the buffer This function first calculates the sum of the 64-bit values in the buffer
specified by Buffer and Length. The carry bits in the result of addition specified by Buffer and Length. The carry bits in the result of addition
are dropped. Then, the two's complement of the sum is returned. If Length are dropped. Then, the two's complement of the sum is returned. If Length
is 0, then 0 is returned. is 0, then 0 is returned.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT(). If Length is not aligned on a 64-bit boundary, 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 buffer to carry out the checksum operation. @param Buffer Pointer to the buffer to carry out the checksum operation.
@param Length The size, in bytes, of Buffer. @param Length The size, in bytes, of Buffer.
@return The 2's complement checksum of Buffer. @return Checksum The 2's complement checksum of Buffer.
**/ **/
UINT64 UINT64

View File

@ -47,7 +47,7 @@ SaveAndDisableInterrupts (
@param InterruptState TRUE if interrupts should enabled. FALSE if @param InterruptState TRUE if interrupts should enabled. FALSE if
interrupts should be disabled. interrupts should be disabled.
@return Input interrupt status to be set. @return InterruptState
**/ **/
BOOLEAN BOOLEAN

View File

@ -26,6 +26,10 @@
NULL, then the 64-bit signed remainder is returned in Remainder. This NULL, then the 64-bit signed remainder is returned in Remainder. This
function returns the 64-bit signed quotient. function returns the 64-bit signed quotient.
It is the caller¡¯s responsibility to not call this function with a Divisor of 0.
If Divisor is 0, then the quotient and remainder should be assumed to be
the largest negative integer.
If Divisor is 0, then ASSERT(). If Divisor is 0, then ASSERT().
@param Dividend A 64-bit signed value. @param Dividend A 64-bit signed value.

View File

@ -80,8 +80,8 @@ EnableInterrupts (
/** /**
Retrieves the current CPU interrupt state. Retrieves the current CPU interrupt state.
Retrieves the current CPU interrupt state. Returns TRUE is interrupts are Returns TRUE is interrupts are currently enabled. Otherwise
currently enabled. Otherwise returns FALSE. returns FALSE.
@retval TRUE CPU interrupts are enabled. @retval TRUE CPU interrupts are enabled.
@retval FALSE CPU interrupts are disabled. @retval FALSE CPU interrupts are disabled.

View File

@ -19,7 +19,7 @@
/** /**
Returns the value of the highest bit set in a 32-bit value. Equivalent to Returns the value of the highest bit set in a 32-bit value. Equivalent to
1 << HighBitSet32(x). 1 << log2(x).
This function computes the value of the highest bit set in the 32-bit value This function computes the value of the highest bit set in the 32-bit value
specified by Operand. If Operand is zero, then zero is returned. specified by Operand. If Operand is zero, then zero is returned.

View File

@ -19,7 +19,7 @@
/** /**
Returns the value of the highest bit set in a 64-bit value. Equivalent to Returns the value of the highest bit set in a 64-bit value. Equivalent to
1 << HighBitSet64(x). 1 << log2(x).
This function computes the value of the highest bit set in the 64-bit value This function computes the value of the highest bit set in the 64-bit value
specified by Operand. If Operand is zero, then zero is returned. specified by Operand. If Operand is zero, then zero is returned.

View File

@ -27,8 +27,8 @@
@param Operand The 32-bit operand to evaluate. @param Operand The 32-bit operand to evaluate.
@return Position of the highest bit set in Operand if found. @retval 0..31 Position of the highest bit set in Operand if found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
INTN INTN

View File

@ -27,8 +27,8 @@
@param Operand The 64-bit operand to evaluate. @param Operand The 64-bit operand to evaluate.
@return Position of the highest bit set in Operand if found. @retval 0..63 Position of the highest bit set in Operand if found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
INTN INTN

View File

@ -27,7 +27,7 @@
@param Operand The 32-bit operand to rotate left. @param Operand The 32-bit operand to rotate left.
@param Count The number of bits to rotate left. @param Count The number of bits to rotate left.
@return Operand <<< Count @return Operand << Count
**/ **/
UINT32 UINT32

View File

@ -27,7 +27,7 @@
@param Operand The 64-bit operand to rotate left. @param Operand The 64-bit operand to rotate left.
@param Count The number of bits to rotate left. @param Count The number of bits to rotate left.
@return Operand <<< Count @return Operand << Count
**/ **/
UINT64 UINT64

View File

@ -26,7 +26,7 @@
@param Operand The 64-bit operand to shift left. @param Operand The 64-bit operand to shift left.
@param Count The number of bits to shift left. @param Count The number of bits to shift left.
@return Operand << Count @return Operand << Count.
**/ **/
UINT64 UINT64

View File

@ -85,7 +85,7 @@ IsNodeInList (
If ListHead is NULL, then ASSERT(). If ListHead is NULL, then ASSERT().
@param List A pointer to the head node of a new doubly linked list. @param ListHead A pointer to the head node of a new doubly linked list.
@return ListHead @return ListHead
@ -113,12 +113,13 @@ InitializeListHead (
If ListHead is NULL, then ASSERT(). If ListHead is NULL, then ASSERT().
If Entry is NULL, then ASSERT(). If Entry is NULL, then ASSERT().
If ListHead was not initialized with InitializeListHead(), then ASSERT(). If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number
of nodes in ListHead, including the ListHead node, is greater than or of nodes in ListHead, including the ListHead node, is greater than or
equal to PcdMaximumLinkedListLength, then ASSERT(). equal to PcdMaximumLinkedListLength, then ASSERT().
@param List A pointer to the head node of a doubly linked list. @param ListHead A pointer to the head node of a doubly linked list.
@param Entry A pointer to a node that is to be inserted at the beginning @param Entry A pointer to a node that is to be inserted at the beginning
of a doubly linked list. of a doubly linked list.
@ -153,12 +154,13 @@ InsertHeadList (
If ListHead is NULL, then ASSERT(). If ListHead is NULL, then ASSERT().
If Entry is NULL, then ASSERT(). If Entry is NULL, then ASSERT().
If ListHead was not initialized with InitializeListHead(), then ASSERT(). If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number
of nodes in ListHead, including the ListHead node, is greater than or of nodes in ListHead, including the ListHead node, is greater than or
equal to PcdMaximumLinkedListLength, then ASSERT(). equal to PcdMaximumLinkedListLength, then ASSERT().
@param List A pointer to the head node of a doubly linked list. @param ListHead A pointer to the head node of a doubly linked list.
@param Entry A pointer to a node that is to be added at the end of the @param Entry A pointer to a node that is to be added at the end of the
doubly linked list. doubly linked list.
@ -187,12 +189,13 @@ InsertTailList (
/** /**
Retrieves the first node of a doubly linked list. Retrieves the first node of a doubly linked list.
Returns the first node of a doubly linked list. List must have been Returns the first node of a doubly linked list. List must have been
initialized with InitializeListHead(). If List is empty, then NULL is initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
returned. If List is empty, then List is returned.
If List is NULL, then ASSERT(). If List is NULL, then ASSERT().
If List was not initialized with InitializeListHead(), then ASSERT(). If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and the number of nodes If PcdMaximumLinkedListLenth is not zero, and the number of nodes
in List, including the List node, is greater than or equal to in List, including the List node, is greater than or equal to
PcdMaximumLinkedListLength, then ASSERT(). PcdMaximumLinkedListLength, then ASSERT().
@ -220,13 +223,14 @@ GetFirstNode (
/** /**
Retrieves the next node of a doubly linked list. Retrieves the next node of a doubly linked list.
Returns the node of a doubly linked list that follows Node. List must have Returns the node of a doubly linked list that follows Node.
been initialized with InitializeListHead(). If List is empty, then List is List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
returned. or InitializeListHead(). If List is empty, then List is returned.
If List is NULL, then ASSERT(). If List is NULL, then ASSERT().
If Node is NULL, then ASSERT(). If Node is NULL, then ASSERT().
If List was not initialized with InitializeListHead(), then ASSERT(). If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and List contains more than If PcdMaximumLinkedListLenth is not zero, and List contains more than
PcdMaximumLinkedListLenth nodes, then ASSERT(). PcdMaximumLinkedListLenth nodes, then ASSERT().
If Node is not a node in List, then ASSERT(). If Node is not a node in List, then ASSERT().
@ -260,12 +264,13 @@ GetNextNode (
zero nodes, this function returns TRUE. Otherwise, it returns FALSE. zero nodes, this function returns TRUE. Otherwise, it returns FALSE.
If ListHead is NULL, then ASSERT(). If ListHead is NULL, then ASSERT().
If ListHead was not initialized with InitializeListHead(), then ASSERT(). If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and the number of nodes If PcdMaximumLinkedListLenth is not zero, and the number of nodes
in List, including the List node, is greater than or equal to in List, including the List node, is greater than or equal to
PcdMaximumLinkedListLength, then ASSERT(). PcdMaximumLinkedListLength, then ASSERT().
@param List A pointer to the head node of a doubly linked list. @param ListHead A pointer to the head node of a doubly linked list.
@retval TRUE The linked list is empty. @retval TRUE The linked list is empty.
@retval FALSE The linked list is not empty. @retval FALSE The linked list is not empty.
@ -292,11 +297,12 @@ IsListEmpty (
Returns TRUE if Node is equal to List. Returns FALSE if Node is one of the Returns TRUE if Node is equal to List. Returns FALSE if Node is one of the
nodes in the doubly linked list specified by List. List must have been nodes in the doubly linked list specified by List. List must have been
initialized with InitializeListHead(). initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
If List is NULL, then ASSERT(). If List is NULL, then ASSERT().
If Node is NULL, then ASSERT(). If Node is NULL, then ASSERT().
If List was not initialized with InitializeListHead(), then ASSERT(). If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and the number of nodes If PcdMaximumLinkedListLenth is not zero, and the number of nodes
in List, including the List node, is greater than or equal to in List, including the List node, is greater than or equal to
PcdMaximumLinkedListLength, then ASSERT(). PcdMaximumLinkedListLength, then ASSERT().
@ -329,11 +335,12 @@ IsNull (
Returns TRUE if Node is the last node in the doubly linked list specified by Returns TRUE if Node is the last node in the doubly linked list specified by
List. Otherwise, FALSE is returned. List must have been initialized with List. Otherwise, FALSE is returned. List must have been initialized with
InitializeListHead(). INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
If List is NULL, then ASSERT(). If List is NULL, then ASSERT().
If Node is NULL, then ASSERT(). If Node is NULL, then ASSERT().
If List was not initialized with InitializeListHead(), then ASSERT(). If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
InitializeListHead(), then ASSERT().
If PcdMaximumLinkedListLenth is not zero, and the number of nodes If PcdMaximumLinkedListLenth is not zero, and the number of nodes
in List, including the List node, is greater than or equal to in List, including the List node, is greater than or equal to
PcdMaximumLinkedListLength, then ASSERT(). PcdMaximumLinkedListLength, then ASSERT().
@ -369,8 +376,8 @@ IsNodeAtEnd (
Otherwise, the location of the FirstEntry node is swapped with the location Otherwise, the location of the FirstEntry node is swapped with the location
of the SecondEntry node in a doubly linked list. SecondEntry must be in the of the SecondEntry node in a doubly linked list. SecondEntry must be in the
same double linked list as FirstEntry and that double linked list must have same double linked list as FirstEntry and that double linked list must have
been initialized with InitializeListHead(). SecondEntry is returned after the been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
nodes are swapped. SecondEntry is returned after the nodes are swapped.
If FirstEntry is NULL, then ASSERT(). If FirstEntry is NULL, then ASSERT().
If SecondEntry is NULL, then ASSERT(). If SecondEntry is NULL, then ASSERT().
@ -382,8 +389,8 @@ IsNodeAtEnd (
@param FirstEntry A pointer to a node in a linked list. @param FirstEntry A pointer to a node in a linked list.
@param SecondEntry A pointer to another node in the same linked list. @param SecondEntry A pointer to another node in the same linked list.
@return SecondEntry after the nodes are swapped @return SecondEntry.
**/ **/
LIST_ENTRY * LIST_ENTRY *
@ -449,11 +456,9 @@ SwapListEntries (
linked list containing Entry, including the Entry node, is greater than linked list containing Entry, including the Entry node, is greater than
or equal to PcdMaximumLinkedListLength, then ASSERT(). or equal to PcdMaximumLinkedListLength, then ASSERT().
@param Entry A pointer to a node in a linked list @param Entry A pointer to a node in a linked list.
@return The node following Entry in the doubly linked list. @return Entry.
If Entry is the only node in the linked list, then
the head node of the linked list is returned.
**/ **/
LIST_ENTRY * LIST_ENTRY *

View File

@ -20,16 +20,17 @@
/** /**
Restores the CPU context that was saved with SetJump(). Restores the CPU context that was saved with SetJump().
Restores the CPU context from the buffer specified by JumpBuffer. Restores the CPU context from the buffer specified by JumpBuffer. This
This function never returns to the caller. function never returns to the caller. Instead is resumes execution based on
Instead is resumes execution based on the state of JumpBuffer. the state of JumpBuffer.
If JumpBuffer is NULL, then ASSERT(). If JumpBuffer is NULL, then ASSERT().
For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT(). For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
If Value is 0, then ASSERT(). If Value is 0, then ASSERT().
@param JumpBuffer A pointer to CPU context buffer. @param JumpBuffer A pointer to CPU context buffer.
@param Value The value to return when the SetJump() context is restored. @param Value The value to return when the SetJump() context is
restored and must be non-zero.
**/ **/
VOID VOID

View File

@ -26,8 +26,8 @@
@param Operand The 32-bit operand to evaluate. @param Operand The 32-bit operand to evaluate.
@return Position of the lowest bit set in Operand if found. @retval 0..31 The lowest bit set in Operand was found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
INTN INTN

View File

@ -26,8 +26,9 @@
@param Operand The 64-bit operand to evaluate. @param Operand The 64-bit operand to evaluate.
@return Position of the lowest bit set in Operand if found. @retval 0..63 The lowest bit set in Operand was found.
@retval -1 Operand is zero. @retval -1 Operand is zero.
**/ **/
INTN INTN

View File

@ -25,6 +25,8 @@
unsigned value Multiplier and generates a 64-bit unsigned result. This 64- unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
bit unsigned result is returned. bit unsigned result is returned.
If the result overflows, then ASSERT().
@param Multiplicand A 64-bit unsigned value. @param Multiplicand A 64-bit unsigned value.
@param Multiplier A 32-bit unsigned value. @param Multiplier A 32-bit unsigned value.

View File

@ -25,6 +25,8 @@
unsigned value Multiplier and generates a 64-bit unsigned result. This 64- unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
bit unsigned result is returned. bit unsigned result is returned.
If the result overflows, then ASSERT().
@param Multiplicand A 64-bit unsigned value. @param Multiplicand A 64-bit unsigned value.
@param Multiplier A 64-bit unsigned value. @param Multiplier A 64-bit unsigned value.

View File

@ -27,7 +27,7 @@
@param Operand The 64-bit operand to rotate right. @param Operand The 64-bit operand to rotate right.
@param Count The number of bits to rotate right. @param Count The number of bits to rotate right.
@return Operand >>> Count @return Operand >> Count
**/ **/
UINT64 UINT64

View File

@ -40,13 +40,13 @@
If Source is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@return Destination pointing to the copied string. @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -79,9 +79,8 @@ StrCpy (
} }
/** /**
Copies one Null-terminated Unicode string with a maximum length to another Copies up to a specified length from one Null-terminated Unicode string to
Null-terminated Unicode string with a maximum length and returns the new another Null-terminated Unicode string and returns the new Unicode string.
Unicode string.
This function copies the contents of the Unicode string Source to the Unicode This function copies the contents of the Unicode string Source to the Unicode
string Destination, and returns Destination. At most, Length Unicode string Destination, and returns Destination. At most, Length Unicode
@ -97,14 +96,14 @@ StrCpy (
If Length > 0 and Source is not aligned on a 16-bit bounadry, then ASSERT(). If Length > 0 and Source is not aligned on a 16-bit bounadry, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@param Length Maximum number of Unicode characters to copy. @param Length Maximum number of Unicode characters to copy.
@return Destination pointing to the copied string. @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -153,7 +152,7 @@ StrnCpy (
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned on a 16-bit boundary, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains more than If PcdMaximumUnicodeStringLength is not zero, and String contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@ -188,18 +187,18 @@ StrLen (
Returns the size of a Null-terminated Unicode string in bytes, including the Returns the size of a Null-terminated Unicode string in bytes, including the
Null terminator. Null terminator.
This function returns the size, in bytes, of the Null-terminated Unicode This function returns the size, in bytes, of the Null-terminated Unicode string
string specified by String. specified by String.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned on a 16-bit boundary, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains more than If PcdMaximumUnicodeStringLength is not zero, and String contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@return The size in bytes of String. @return The size of String.
**/ **/
UINTN UINTN
@ -226,18 +225,17 @@ StrSize (
If SecondString is NULL, then ASSERT(). If SecondString is NULL, then ASSERT().
If SecondString is not aligned on a 16-bit boundary, then ASSERT(). If SecondString is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more
than PcdMaximumUnicodeStringLength Unicode characters not including the than PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more
than PcdMaximumUnicodeStringLength Unicode characters not including the than PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param FirstString Pointer to a Null-terminated Unicode string. @param FirstString Pointer to a Null-terminated Unicode string.
@param SecondString Pointer to a Null-terminated Unicode string. @param SecondString Pointer to a Null-terminated Unicode string.
@retval 0 FirstString is identical to SecondString. @retval 0 FirstString is identical to SecondString.
@return The first mismatched Unicode character in SecondString subtracted @return others FirstString is not identical to SecondString.
from the first mismatched Unicode character in FirstString.
**/ **/
INTN INTN
@ -261,8 +259,8 @@ StrCmp (
} }
/** /**
Compares two Null-terminated Unicode strings with maximum lengths, and Compares up to a specified length the contents of two Null-terminated Unicode strings,
returns the difference between the first mismatched Unicode characters. and returns the difference between the first mismatched Unicode characters.
This function compares the Null-terminated Unicode string FirstString to the This function compares the Null-terminated Unicode string FirstString to the
Null-terminated Unicode string SecondString. At most, Length Unicode Null-terminated Unicode string SecondString. At most, Length Unicode
@ -287,8 +285,7 @@ StrCmp (
@param Length Maximum number of Unicode characters to compare. @param Length Maximum number of Unicode characters to compare.
@retval 0 FirstString is identical to SecondString. @retval 0 FirstString is identical to SecondString.
@return The value returned is the first mismatched Unicode character in SecondString @return others FirstString is not identical to SecondString.
subtracted from the first mismatched Unicode character in FirstString.
**/ **/
INTN INTN
@ -332,7 +329,9 @@ StrnCmp (
results are undefined. results are undefined.
If Destination is NULL, then ASSERT(). If Destination is NULL, then ASSERT().
If Destination is not aligned on a 16-bit bounadary, then ASSERT().
If Source is NULL, then ASSERT(). If Source is NULL, then ASSERT().
If Source is not aligned on a 16-bit bounadary, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
than PcdMaximumUnicodeStringLength Unicode characters not including the than PcdMaximumUnicodeStringLength Unicode characters not including the
@ -348,7 +347,7 @@ StrnCmp (
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@return Destination pointing to the concatenated Unicode string. @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -369,8 +368,8 @@ StrCat (
} }
/** /**
Concatenates one Null-terminated Unicode string with a maximum length to the Concatenates up to a specified length one Null-terminated Unicode to the end
end of another Null-terminated Unicode string, and returns the concatenated of another Null-terminated Unicode string, and returns the concatenated
Unicode string. Unicode string.
This function concatenates two Null-terminated Unicode strings. The contents This function concatenates two Null-terminated Unicode strings. The contents
@ -402,7 +401,7 @@ StrCat (
@param Length Maximum number of Unicode characters to concatenate from @param Length Maximum number of Unicode characters to concatenate from
Source. Source.
@return Destination pointing to the concatenated Unicode string. @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -424,29 +423,29 @@ StrnCat (
} }
/** /**
Returns the first occurance of a Null-terminated Unicode sub-string Returns the first occurrence of a Null-terminated Unicode sub-string
in a Null-terminated Unicode string. in a Null-terminated Unicode string.
This function scans the contents of the Null-terminated Unicode string This function scans the contents of the Null-terminated Unicode string
specified by String and returns the first occurrence of SearchString. specified by String and returns the first occurrence of SearchString.
If SearchString is not found in String, then NULL is returned. If If SearchString is not found in String, then NULL is returned. If
the length of SearchString is zero, then String is the length of SearchString is zero, then String is
returned. returned.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned on a 16-bit boundary, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT().
If SearchString is NULL, then ASSERT(). If SearchString is NULL, then ASSERT().
If SearchString is not aligned on a 16-bit boundary, then ASSERT(). If SearchString is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and SearchString If PcdMaximumUnicodeStringLength is not zero, and SearchString
or String contains more than PcdMaximumUnicodeStringLength Unicode or String contains more than PcdMaximumUnicodeStringLength Unicode
characters not including the Null-terminator, then ASSERT(). characters not including the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@param SearchString Pointer to a Null-terminated Unicode string to search for. @param SearchString Pointer to a Null-terminated Unicode string to search for.
@retval NULL If the SearchString does not appear in String. @retval NULL If the SearchString does not appear in String.
@return Pointer to the matching sub-string. @return others If there is a match.
**/ **/
CHAR16 * CHAR16 *
@ -597,37 +596,37 @@ InternalIsHexaDecimalDigitCharacter (
} }
/** /**
Convert a Null-terminated Unicode decimal string to a value of Convert a Null-terminated Unicode decimal string to a value of
type UINTN. type UINTN.
This function returns a value of type UINTN by interpreting the contents This function returns a value of type UINTN by interpreting the contents
of the Unicode string specified by String as a decimal number. The format of the Unicode string specified by String as a decimal number. The format
of the input Unicode string String is: of the input Unicode string String is:
[spaces] [decimal digits]. [spaces] [decimal digits].
The valid decimal digit character is in the range [0-9]. The The valid decimal digit character is in the range [0-9]. The
function will ignore the pad space, which includes spaces or function will ignore the pad space, which includes spaces or
tab characters, before [decimal digits]. The running zero in the tab characters, before [decimal digits]. The running zero in the
beginning of [decimal digits] will be ignored. Then, the function beginning of [decimal digits] will be ignored. Then, the function
stops at the first character that is a not a valid decimal character stops at the first character that is a not a valid decimal character
or a Null-terminator, whichever one comes first. or a Null-terminator, whichever one comes first.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned in a 16-bit boundary, then ASSERT(). If String is not aligned in a 16-bit boundary, then ASSERT().
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no pad spaces or valid decimal digits, If String has no pad spaces or valid decimal digits,
then 0 is returned. then 0 is returned.
If the number represented by String overflows according If the number represented by String overflows according
to the range defined by UINTN, then ASSERT(). to the range defined by UINTN, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains If PcdMaximumUnicodeStringLength is not zero, and String contains
more than PcdMaximumUnicodeStringLength Unicode characters not including more than PcdMaximumUnicodeStringLength Unicode characters not including
the Null-terminator, then ASSERT(). the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@return The value of type UINTN converted. @retval Value translated from String.
**/ **/
UINTN UINTN
@ -679,37 +678,37 @@ StrDecimalToUintn (
/** /**
Convert a Null-terminated Unicode decimal string to a value of Convert a Null-terminated Unicode decimal string to a value of
type UINT64. type UINT64.
This function returns a value of type UINT64 by interpreting the contents This function returns a value of type UINT64 by interpreting the contents
of the Unicode string specified by String as a decimal number. The format of the Unicode string specified by String as a decimal number. The format
of the input Unicode string String is: of the input Unicode string String is:
[spaces] [decimal digits]. [spaces] [decimal digits].
The valid decimal digit character is in the range [0-9]. The The valid decimal digit character is in the range [0-9]. The
function will ignore the pad space, which includes spaces or function will ignore the pad space, which includes spaces or
tab characters, before [decimal digits]. The running zero in the tab characters, before [decimal digits]. The running zero in the
beginning of [decimal digits] will be ignored. Then, the function beginning of [decimal digits] will be ignored. Then, the function
stops at the first character that is a not a valid decimal character stops at the first character that is a not a valid decimal character
or a Null-terminator, whichever one comes first. or a Null-terminator, whichever one comes first.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned in a 16-bit boundary, then ASSERT(). If String is not aligned in a 16-bit boundary, then ASSERT().
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no pad spaces or valid decimal digits, If String has no pad spaces or valid decimal digits,
then 0 is returned. then 0 is returned.
If the number represented by String overflows according If the number represented by String overflows according
to the range defined by UINT64, then ASSERT(). to the range defined by UINT64, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains If PcdMaximumUnicodeStringLength is not zero, and String contains
more than PcdMaximumUnicodeStringLength Unicode characters not including more than PcdMaximumUnicodeStringLength Unicode characters not including
the Null-terminator, then ASSERT(). the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@return The value of type UINT64 converted. @retval Value translated from String.
**/ **/
UINT64 UINT64
@ -762,36 +761,36 @@ StrDecimalToUint64 (
/** /**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN. Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
This function returns a value of type UINTN by interpreting the contents This function returns a value of type UINTN by interpreting the contents
of the Unicode string specified by String as a hexadecimal number. of the Unicode string specified by String as a hexadecimal number.
The format of the input Unicode string String is: The format of the input Unicode string String is:
[spaces][zeros][x][hexadecimal digits].
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F]. [spaces][zeros][x][hexadecimal digits].
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
If "x" appears in the input string, it must be prefixed with at least one 0. The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
The function will ignore the pad space, which includes spaces or tab characters, The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or If "x" appears in the input string, it must be prefixed with at least one 0.
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the The function will ignore the pad space, which includes spaces or tab characters,
first valid hexadecimal digit. Then, the function stops at the first character that is before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
first valid hexadecimal digit. Then, the function stops at the first character that is
a not a valid hexadecimal character or NULL, whichever one comes first. a not a valid hexadecimal character or NULL, whichever one comes first.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned in a 16-bit boundary, then ASSERT(). If String is not aligned in a 16-bit boundary, then ASSERT().
If String has only pad spaces, then zero is returned. If String has only pad spaces, then zero is returned.
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
then zero is returned. then zero is returned.
If the number represented by String overflows according to the range defined by If the number represented by String overflows according to the range defined by
UINTN, then ASSERT(). UINTN, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains more than If PcdMaximumUnicodeStringLength is not zero, and String contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@return The value of type UINTN converted. @retval Value translated from String.
**/ **/
UINTN UINTN
@ -856,38 +855,38 @@ StrHexToUintn (
/** /**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64. Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
This function returns a value of type UINT64 by interpreting the contents This function returns a value of type UINT64 by interpreting the contents
of the Unicode string specified by String as a hexadecimal number. of the Unicode string specified by String as a hexadecimal number.
The format of the input Unicode string String is The format of the input Unicode string String is
[spaces][zeros][x][hexadecimal digits].
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F]. [spaces][zeros][x][hexadecimal digits].
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
If "x" appears in the input string, it must be prefixed with at least one 0. The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
The function will ignore the pad space, which includes spaces or tab characters, The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or If "x" appears in the input string, it must be prefixed with at least one 0.
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the The function will ignore the pad space, which includes spaces or tab characters,
first valid hexadecimal digit. Then, the function stops at the first character that is before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
first valid hexadecimal digit. Then, the function stops at the first character that is
a not a valid hexadecimal character or NULL, whichever one comes first. a not a valid hexadecimal character or NULL, whichever one comes first.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If String is not aligned in a 16-bit boundary, then ASSERT(). If String is not aligned in a 16-bit boundary, then ASSERT().
If String has only pad spaces, then zero is returned. If String has only pad spaces, then zero is returned.
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
then zero is returned. then zero is returned.
If the number represented by String overflows according to the range defined by If the number represented by String overflows according to the range defined by
UINT64, then ASSERT(). UINT64, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and String contains more than If PcdMaximumUnicodeStringLength is not zero, and String contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@param String Pointer to a Null-terminated Unicode string. @param String Pointer to a Null-terminated Unicode string.
@return The value of type UINT64 converted. @retval Value translated from String.
**/ **/
UINT64 UINT64
EFIAPI EFIAPI
StrHexToUint64 ( StrHexToUint64 (
@ -996,36 +995,33 @@ InternalAsciiIsHexaDecimalDigitCharacter (
} }
/** /**
Convert a Null-terminated Unicode string to a Null-terminated Convert a Null-terminated Unicode string to a Null-terminated
ASCII string and returns the ASCII string. ASCII string and returns the ASCII string.
This function converts the content of the Unicode string Source This function converts the content of the Unicode string Source
to the ASCII string Destination by copying the lower 8 bits of to the ASCII string Destination by copying the lower 8 bits of
each Unicode character. It returns Destination. The function terminates each Unicode character. It returns Destination.
the ASCII string Destination by appending a Null-terminator character
at the end. The caller is responsible to make sure Destination points If any Unicode characters in Source contain non-zero value in
to a buffer with size equal or greater than (StrLen (Source) + 1) in bytes. the upper 8 bits, then ASSERT().
If Destination is NULL, then ASSERT(). If Destination is NULL, then ASSERT().
If Source is NULL, then ASSERT(). If Source is NULL, then ASSERT().
If Source is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If any Unicode characters in Source contain non-zero value in If PcdMaximumUnicodeStringLength is not zero, and Source contains
the upper 8 bits, then ASSERT(). more than PcdMaximumUnicodeStringLength Unicode characters not including
If PcdMaximumUnicodeStringLength is not zero, and Source contains
more than PcdMaximumUnicodeStringLength Unicode characters not including
the Null-terminator, then ASSERT(). the Null-terminator, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and Source contains more If PcdMaximumAsciiStringLength is not zero, and Source contains more
than PcdMaximumAsciiStringLength Unicode characters not including the than PcdMaximumAsciiStringLength Unicode characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param Source Pointer to a Null-terminated Unicode string. @param Source Pointer to a Null-terminated Unicode string.
@param Destination Pointer to a Null-terminated ASCII string. @param Destination Pointer to a Null-terminated ASCII string.
@return Destination pointing to the converted ASCII string. @return Destination.
**/ **/
CHAR8 * CHAR8 *
@ -1092,7 +1088,7 @@ UnicodeStrToAsciiStr (
@param Destination Pointer to a Null-terminated ASCII string. @param Destination Pointer to a Null-terminated ASCII string.
@param Source Pointer to a Null-terminated ASCII string. @param Source Pointer to a Null-terminated ASCII string.
@return Destination pointing to the copied string. @return Destination
**/ **/
CHAR8 * CHAR8 *
@ -1124,9 +1120,8 @@ AsciiStrCpy (
} }
/** /**
Copies one Null-terminated ASCII string with a maximum length to another Copies up to a specified length one Null-terminated ASCII string to another
Null-terminated ASCII string with a maximum length and returns the new ASCII Null-terminated ASCII string and returns the new ASCII string.
string.
This function copies the contents of the ASCII string Source to the ASCII This function copies the contents of the ASCII string Source to the ASCII
string Destination, and returns Destination. At most, Length ASCII characters string Destination, and returns Destination. At most, Length ASCII characters
@ -1146,7 +1141,7 @@ AsciiStrCpy (
@param Source Pointer to a Null-terminated ASCII string. @param Source Pointer to a Null-terminated ASCII string.
@param Length Maximum number of ASCII characters to copy. @param Length Maximum number of ASCII characters to copy.
@return Destination pointing to the copied string. @return Destination
**/ **/
CHAR8 * CHAR8 *
@ -1191,7 +1186,8 @@ AsciiStrnCpy (
This function returns the number of ASCII characters in the Null-terminated This function returns the number of ASCII characters in the Null-terminated
ASCII string specified by String. ASCII string specified by String.
If String is NULL, then ASSERT(). If Length > 0 and Destination is NULL, then ASSERT().
If Length > 0 and Source is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero and String contains more than If PcdMaximumAsciiStringLength is not zero and String contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@ -1271,9 +1267,8 @@ AsciiStrSize (
@param FirstString Pointer to a Null-terminated ASCII string. @param FirstString Pointer to a Null-terminated ASCII string.
@param SecondString Pointer to a Null-terminated ASCII string. @param SecondString Pointer to a Null-terminated ASCII string.
@retval 0 FirstString is identical to SecondString. @retval ==0 FirstString is identical to SecondString.
@return The first mismatched ASCII character in SecondString subtracted @retval !=0 FirstString is not identical to SecondString.
from the first mismatched ASCII character in FirstString.
**/ **/
INTN INTN
@ -1369,10 +1364,10 @@ InternalAsciiHexCharToUintn (
@param FirstString Pointer to a Null-terminated ASCII string. @param FirstString Pointer to a Null-terminated ASCII string.
@param SecondString Pointer to a Null-terminated ASCII string. @param SecondString Pointer to a Null-terminated ASCII string.
@retval 0 FirstString is identical to SecondString using case insensitive @retval ==0 FirstString is identical to SecondString using case insensitive
comparisons. comparisons.
@return The first mismatched lower case ASCII character in SecondString subtracted @retval !=0 FirstString is not identical to SecondString using case
from the first mismatched lower case ASCII character in FirstString. insensitive comparisons.
**/ **/
INTN INTN
@ -1414,8 +1409,8 @@ AsciiStriCmp (
is the first mismatched ASCII character in SecondString subtracted from the is the first mismatched ASCII character in SecondString subtracted from the
first mismatched ASCII character in FirstString. first mismatched ASCII character in FirstString.
If FirstString is NULL, then ASSERT(). If Length > 0 and FirstString is NULL, then ASSERT().
If SecondString is NULL, then ASSERT(). If Length > 0 and SecondString is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than If PcdMaximumAsciiStringLength is not zero and FirstString contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@ -1425,11 +1420,10 @@ AsciiStriCmp (
@param FirstString Pointer to a Null-terminated ASCII string. @param FirstString Pointer to a Null-terminated ASCII string.
@param SecondString Pointer to a Null-terminated ASCII string. @param SecondString Pointer to a Null-terminated ASCII string.
@param Length Maximum number of ASCII characters to compare. @param Length Maximum number of ASCII characters for compare.
@retval 0 FirstString is identical to SecondString. @retval ==0 FirstString is identical to SecondString.
@return The first mismatched ASCII character in SecondString subtracted from the @retval !=0 FirstString is not identical to SecondString.
first mismatched ASCII character in FirstString.
**/ **/
INTN INTN
@ -1484,7 +1478,7 @@ AsciiStrnCmp (
@param Destination Pointer to a Null-terminated ASCII string. @param Destination Pointer to a Null-terminated ASCII string.
@param Source Pointer to a Null-terminated ASCII string. @param Source Pointer to a Null-terminated ASCII string.
@return Destination pointing to the concatenated ASCII string. @return Destination
**/ **/
CHAR8 * CHAR8 *
@ -1505,9 +1499,9 @@ AsciiStrCat (
} }
/** /**
Concatenates one Null-terminated ASCII string with a maximum length to the Concatenates up to a specified length one Null-terminated ASCII string to
end of another Null-terminated ASCII string, and returns the concatenated the end of another Null-terminated ASCII string, and returns the
ASCII string. concatenated ASCII string.
This function concatenates two Null-terminated ASCII strings. The contents This function concatenates two Null-terminated ASCII strings. The contents
of Null-terminated ASCII string Source are concatenated to the end of Null- of Null-terminated ASCII string Source are concatenated to the end of Null-
@ -1517,8 +1511,8 @@ AsciiStrCat (
Destination is returned unmodified. If Source and Destination overlap, then Destination is returned unmodified. If Source and Destination overlap, then
the results are undefined. the results are undefined.
If Destination is NULL, then ASSERT(). If Length > 0 and Destination is NULL, then ASSERT().
If Source is NULL, then ASSERT(). If Length > 0 and Source is NULL, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and Destination contains more than If PcdMaximumAsciiStringLength is not zero, and Destination contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
@ -1535,7 +1529,7 @@ AsciiStrCat (
@param Length Maximum number of ASCII characters to concatenate from @param Length Maximum number of ASCII characters to concatenate from
Source. Source.
@return Destination pointing to the concatenated ASCII string. @return Destination
**/ **/
CHAR8 * CHAR8 *
@ -1557,26 +1551,27 @@ AsciiStrnCat (
} }
/** /**
Returns the first occurance of a Null-terminated ASCII sub-string Returns the first occurrence of a Null-terminated ASCII sub-string
in a Null-terminated ASCII string. in a Null-terminated ASCII string.
This function scans the contents of the ASCII string specified by String This function scans the contents of the ASCII string specified by String
and returns the first occurrence of SearchString. If SearchString is not and returns the first occurrence of SearchString. If SearchString is not
found in String, then NULL is returned. If the length of SearchString is zero, found in String, then NULL is returned. If the length of SearchString is zero,
then String is returned. then String is returned.
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If SearchString is NULL, then ASSERT(). If SearchString is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and SearchString or If PcdMaximumAsciiStringLength is not zero, and SearchString or
String contains more than PcdMaximumAsciiStringLength Unicode characters String contains more than PcdMaximumAsciiStringLength Unicode characters
not including the Null-terminator, then ASSERT(). not including the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated ASCII string. @param String Pointer to a Null-terminated ASCII string.
@param SearchString Pointer to a Null-terminated ASCII string to search for. @param SearchString Pointer to a Null-terminated ASCII string to search for.
@retval NULL If the SearchString does not appear in String. @retval NULL If the SearchString does not appear in String.
@return Pointer to the matching sub-string. @retval others If there is a match return the first occurrence of SearchingString.
If the length of SearchString is zero,return String.
**/ **/
CHAR8 * CHAR8 *
@ -1625,33 +1620,33 @@ AsciiStrStr (
} }
/** /**
Convert a Null-terminated ASCII decimal string to a value of type Convert a Null-terminated ASCII decimal string to a value of type
UINTN. UINTN.
This function returns a value of type UINTN by interpreting the contents This function returns a value of type UINTN by interpreting the contents
of the ASCII string String as a decimal number. The format of the input of the ASCII string String as a decimal number. The format of the input
ASCII string String is: ASCII string String is:
[spaces] [decimal digits]. [spaces] [decimal digits].
The valid decimal digit character is in the range [0-9]. The function will The valid decimal digit character is in the range [0-9]. The function will
ignore the pad space, which includes spaces or tab characters, before the digits. ignore the pad space, which includes spaces or tab characters, before the digits.
The running zero in the beginning of [decimal digits] will be ignored. Then, the The running zero in the beginning of [decimal digits] will be ignored. Then, the
function stops at the first character that is a not a valid decimal character or function stops at the first character that is a not a valid decimal character or
Null-terminator, whichever on comes first. Null-terminator, whichever on comes first.
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no pad spaces or valid decimal digits, then 0 is returned. If String has no pad spaces or valid decimal digits, then 0 is returned.
If the number represented by String overflows according to the range defined by If the number represented by String overflows according to the range defined by
UINTN, then ASSERT(). UINTN, then ASSERT().
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and String contains more than If PcdMaximumAsciiStringLength is not zero, and String contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@param String Pointer to a Null-terminated ASCII string. @param String Pointer to a Null-terminated ASCII string.
@return The value of type UINTN converted. @retval Value translated from String.
**/ **/
UINTN UINTN
@ -1702,33 +1697,33 @@ AsciiStrDecimalToUintn (
/** /**
Convert a Null-terminated ASCII decimal string to a value of type Convert a Null-terminated ASCII decimal string to a value of type
UINT64. UINT64.
This function returns a value of type UINT64 by interpreting the contents This function returns a value of type UINT64 by interpreting the contents
of the ASCII string String as a decimal number. The format of the input of the ASCII string String as a decimal number. The format of the input
ASCII string String is: ASCII string String is:
[spaces] [decimal digits]. [spaces] [decimal digits].
The valid decimal digit character is in the range [0-9]. The function will The valid decimal digit character is in the range [0-9]. The function will
ignore the pad space, which includes spaces or tab characters, before the digits. ignore the pad space, which includes spaces or tab characters, before the digits.
The running zero in the beginning of [decimal digits] will be ignored. Then, the The running zero in the beginning of [decimal digits] will be ignored. Then, the
function stops at the first character that is a not a valid decimal character or function stops at the first character that is a not a valid decimal character or
Null-terminator, whichever on comes first. Null-terminator, whichever on comes first.
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no pad spaces or valid decimal digits, then 0 is returned. If String has no pad spaces or valid decimal digits, then 0 is returned.
If the number represented by String overflows according to the range defined by If the number represented by String overflows according to the range defined by
UINT64, then ASSERT(). UINT64, then ASSERT().
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and String contains more than If PcdMaximumAsciiStringLength is not zero, and String contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
then ASSERT(). then ASSERT().
@param String Pointer to a Null-terminated ASCII string. @param String Pointer to a Null-terminated ASCII string.
@return The value of type UINT64 converted. @retval Value translated from String.
**/ **/
UINT64 UINT64
@ -1780,35 +1775,35 @@ AsciiStrDecimalToUint64 (
/** /**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN. Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
This function returns a value of type UINTN by interpreting the contents of This function returns a value of type UINTN by interpreting the contents of
the ASCII string String as a hexadecimal number. The format of the input ASCII the ASCII string String as a hexadecimal number. The format of the input ASCII
string String is: string String is:
[spaces][zeros][x][hexadecimal digits]. [spaces][zeros][x][hexadecimal digits].
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F]. The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x" The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
appears in the input string, it must be prefixed with at least one 0. The function appears in the input string, it must be prefixed with at least one 0. The function
will ignore the pad space, which includes spaces or tab characters, before [zeros], will ignore the pad space, which includes spaces or tab characters, before [zeros],
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits] [x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
digit. Then, the function stops at the first character that is a not a valid digit. Then, the function stops at the first character that is a not a valid
hexadecimal character or Null-terminator, whichever on comes first. hexadecimal character or Null-terminator, whichever on comes first.
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
0 is returned. 0 is returned.
If the number represented by String overflows according to the range defined by UINTN, If the number represented by String overflows according to the range defined by UINTN,
then ASSERT(). then ASSERT().
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, If PcdMaximumAsciiStringLength is not zero,
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
the Null-terminator, then ASSERT(). the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated ASCII string. @param String Pointer to a Null-terminated ASCII string.
@return The value of type UINTN converted. @retval Value translated from String.
**/ **/
UINTN UINTN
@ -1872,35 +1867,35 @@ AsciiStrHexToUintn (
/** /**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64. Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
This function returns a value of type UINT64 by interpreting the contents of This function returns a value of type UINT64 by interpreting the contents of
the ASCII string String as a hexadecimal number. The format of the input ASCII the ASCII string String as a hexadecimal number. The format of the input ASCII
string String is: string String is:
[spaces][zeros][x][hexadecimal digits]. [spaces][zeros][x][hexadecimal digits].
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F]. The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x" The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
appears in the input string, it must be prefixed with at least one 0. The function appears in the input string, it must be prefixed with at least one 0. The function
will ignore the pad space, which includes spaces or tab characters, before [zeros], will ignore the pad space, which includes spaces or tab characters, before [zeros],
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits] [x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
digit. Then, the function stops at the first character that is a not a valid digit. Then, the function stops at the first character that is a not a valid
hexadecimal character or Null-terminator, whichever on comes first. hexadecimal character or Null-terminator, whichever on comes first.
If String has only pad spaces, then 0 is returned. If String has only pad spaces, then 0 is returned.
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
0 is returned. 0 is returned.
If the number represented by String overflows according to the range defined by UINT64, If the number represented by String overflows according to the range defined by UINT64,
then ASSERT(). then ASSERT().
If String is NULL, then ASSERT(). If String is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, If PcdMaximumAsciiStringLength is not zero,
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
the Null-terminator, then ASSERT(). the Null-terminator, then ASSERT().
@param String Pointer to a Null-terminated ASCII string. @param String Pointer to a Null-terminated ASCII string.
@return The value of type UINT64 converted. @retval Value translated from String.
**/ **/
UINT64 UINT64
@ -1966,30 +1961,30 @@ AsciiStrHexToUint64 (
/** /**
Convert one Null-terminated ASCII string to a Null-terminated Convert one Null-terminated ASCII string to a Null-terminated
Unicode string and returns the Unicode string. Unicode string and returns the Unicode string.
This function converts the contents of the ASCII string Source to the Unicode This function converts the contents of the ASCII string Source to the Unicode
string Destination, and returns Destination. The function terminates the string Destination, and returns Destination. The function terminates the
Unicode string Destination by appending a Null-terminator character at the end. Unicode string Destination by appending a Null-terminator character at the end.
The caller is responsible to make sure Destination points to a buffer with size The caller is responsible to make sure Destination points to a buffer with size
equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes. equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.
If Destination is NULL, then ASSERT(). If Destination is NULL, then ASSERT().
If Destination is not aligned on a 16-bit boundary, then ASSERT(). If Destination is not aligned on a 16-bit boundary, then ASSERT().
If Source is NULL, then ASSERT(). If Source is NULL, then ASSERT().
If Source and Destination overlap, then ASSERT(). If Source and Destination overlap, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and Source contains more than If PcdMaximumAsciiStringLength is not zero, and Source contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
then ASSERT(). then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
PcdMaximumUnicodeStringLength ASCII characters not including the PcdMaximumUnicodeStringLength ASCII characters not including the
Null-terminator, then ASSERT(). Null-terminator, then ASSERT().
@param Source Pointer to a Null-terminated ASCII string. @param Source Pointer to a Null-terminated ASCII string.
@param Destination Pointer to a Null-terminated Unicode string. @param Destination Pointer to a Null-terminated Unicode string.
@return Destination pointing to the converted Unicode string. @return Destination.
**/ **/
CHAR16 * CHAR16 *
@ -2042,7 +2037,7 @@ AsciiStrToUnicodeStr (
@param Value The 8-bit value to convert to BCD. Range 0..99. @param Value The 8-bit value to convert to BCD. Range 0..99.
@return The BCD value converted. @return The BCD value.
**/ **/
UINT8 UINT8
@ -2066,7 +2061,7 @@ DecimalToBcd8 (
@param Value The 8-bit BCD value to convert to an 8-bit value. @param Value The 8-bit BCD value to convert to an 8-bit value.
@return The 8-bit decimal value converted. @return The 8-bit value is returned.
**/ **/
UINT8 UINT8
@ -2092,8 +2087,8 @@ BcdToDecimal8 (
@param Nibble The nibble which is in the low 4 bits of the input byte. @param Nibble The nibble which is in the low 4 bits of the input byte.
@return The Unicode hexadecimal character. @retval CHAR16 The Unicode hexadecimal character.
**/ **/
CHAR16 CHAR16
EFIAPI EFIAPI
@ -2121,20 +2116,21 @@ NibbleToHexChar (
the last character in the output string. The one next to first byte will be put into the the last character in the output string. The one next to first byte will be put into the
character before the last character. This rules applies to the rest of the bytes. The Unicode character before the last character. This rules applies to the rest of the bytes. The Unicode
character by the last byte will be put into the first character in the output string. For example, character by the last byte will be put into the first character in the output string. For example,
the input buffer for a 64-bits unsigned integrer 0x12345678abcdef1234 will be converted to the input buffer for a 64-bits unsigned integer 0x12345678abcdef1234 will be converted to
a Unicode string equal to L"12345678abcdef1234". a Unicode string equal to L"12345678abcdef1234".
@param String Pointer to the buffer allocated for the convertion. @param String On input, String is pointed to the buffer allocated for the convertion.
@param StringLen On input: Pointer to length in bytes of buffer to hold the Unicode string. @param StringLen The Length of String buffer to hold the output String. The length must include the tailing '\0' character.
On output:If return EFI_SUCCESS, pointer to length of Unicode string converted. The StringLen required to convert a N bytes Buffer will be a least equal to or greater
If return EFI_BUFFER_TOO_SMALL, pointer to length of string buffer desired. than 2*N + 1.
@param Buffer The pointer to a input buffer. @param Buffer The pointer to a input buffer.
@param BufferSizeInBytes Lenth in bytes of the input buffer. @param BufferSizeInBytes Length in bytes of the input buffer.
@retval EFI_SUCCESS The convertion is successfull. All bytes in Buffer has been convert to the corresponding
Unicode character and placed into the right place in String. @retval EFI_SUCCESS The convertion is successful. All bytes in Buffer has been convert to the corresponding
@retval EFI_BUFFER_TOO_SMALL StringSizeInBytes is smaller than 2 * N + 1the number of bytes required to Unicode character and placed into the right place in String.
complete the convertion. @retval EFI_BUFFER_TOO_SMALL StringSizeInBytes is smaller than 2 * N + 1the number of bytes required to
complete the convertion.
**/ **/
RETURN_STATUS RETURN_STATUS
EFIAPI EFIAPI
@ -2285,16 +2281,17 @@ HexStringToBuf (
Unicode character is converted to a byte. For example, Unicode character Unicode character is converted to a byte. For example, Unicode character
L'A' will be converted to 0x0A. L'A' will be converted to 0x0A.
If Digit is NULL, then ASSERT(). If Digit is NULL, then ASSERT.
@param Digit The output hexadecimal digit. @param Digit The output hexadecimal digit.
@param Char The input Unicode character. @param Char The input Unicode character.
@retval TRUE Char is in the range of Hexadecimal number. Digit is updated @retval TRUE Char is in the range of Hexadecimal number. Digit is updated
to the byte value of the number. to the byte value of the number.
@retval FALSE Char is not in the range of Hexadecimal number. Digit is keep @retval FALSE Char is not in the range of Hexadecimal number. Digit is keep
intact. intact.
**/ **/
BOOLEAN BOOLEAN
EFIAPI EFIAPI

View File

@ -24,9 +24,9 @@
from little endian to big endian or vice versa. The byte swapped value is from little endian to big endian or vice versa. The byte swapped value is
returned. returned.
@param Operand A 16-bit unsigned value. @param Value Operand A 16-bit unsigned value.
@return The byte swaped Operand. @return The byte swapped Operand.
**/ **/
UINT16 UINT16

View File

@ -24,9 +24,9 @@
from little endian to big endian or vice versa. The byte swapped value is from little endian to big endian or vice versa. The byte swapped value is
returned. returned.
@param Operand A 32-bit unsigned value. @param Value Operand A 32-bit unsigned value.
@return The byte swaped Operand. @return The byte swapped Operand.
**/ **/
UINT32 UINT32

View File

@ -24,9 +24,9 @@
from little endian to big endian or vice versa. The byte swapped value is from little endian to big endian or vice versa. The byte swapped value is
returned. returned.
@param Operand A 64-bit unsigned value. @param Value Operand A 64-bit unsigned value.
@return The byte swaped Operand. @return The byte swapped Operand.
**/ **/
UINT64 UINT64

View File

@ -55,7 +55,7 @@ GetSpinLockProperties (
@param SpinLock A pointer to the spin lock to initialize to the released @param SpinLock A pointer to the spin lock to initialize to the released
state. state.
@return SpinLock initialized in release state. @return SpinLock in release state.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -86,7 +86,7 @@ InitializeSpinLock (
@param SpinLock A pointer to the spin lock to place in the acquired state. @param SpinLock A pointer to the spin lock to place in the acquired state.
@return SpinLock aquired lock. @return SpinLock acquired lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -206,7 +206,7 @@ AcquireSpinLockOrFail (
@param SpinLock A pointer to the spin lock to release. @param SpinLock A pointer to the spin lock to release.
@return SpinLock @return SpinLock released lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -280,9 +280,9 @@ InterlockedDecrement (
Performs an atomic compare exchange operation on a 32-bit unsigned integer. Performs an atomic compare exchange operation on a 32-bit unsigned integer.
Performs an atomic compare exchange operation on the 32-bit unsigned integer Performs an atomic compare exchange operation on the 32-bit unsigned integer
specified by Value. If Value is equal to CompareValue, then Value is set to specified by Value. If Value is equal to CompareValue, then Value is set to
ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue, ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
then Value is returned. The compare exchange operation must be performed using then Value is returned. The compare exchange operation must be performed using
MP safe mechanisms. MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().
@ -310,9 +310,9 @@ InterlockedCompareExchange32 (
/** /**
Performs an atomic compare exchange operation on a 64-bit unsigned integer. Performs an atomic compare exchange operation on a 64-bit unsigned integer.
Performs an atomic compare exchange operation on the 64-bit unsigned integer specified Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and
CompareValue is returned. If Value is not equal to CompareValue, then Value is returned. CompareValue is returned. If Value is not equal to CompareValue, then Value is returned.
The compare exchange operation must be performed using MP safe mechanisms. The compare exchange operation must be performed using MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().

View File

@ -98,7 +98,7 @@ InitializeSpinLock (
@param SpinLock A pointer to the spin lock to place in the acquired state. @param SpinLock A pointer to the spin lock to place in the acquired state.
@return SpinLock accquired lock. @return SpinLock acquired lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -298,9 +298,9 @@ InterlockedDecrement (
Performs an atomic compare exchange operation on a 32-bit unsigned integer. Performs an atomic compare exchange operation on a 32-bit unsigned integer.
Performs an atomic compare exchange operation on the 32-bit unsigned integer Performs an atomic compare exchange operation on the 32-bit unsigned integer
specified by Value. If Value is equal to CompareValue, then Value is set to specified by Value. If Value is equal to CompareValue, then Value is set to
ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue, ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
then Value is returned. The compare exchange operation must be performed using then Value is returned. The compare exchange operation must be performed using
MP safe mechanisms. MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().
@ -328,9 +328,9 @@ InterlockedCompareExchange32 (
/** /**
Performs an atomic compare exchange operation on a 64-bit unsigned integer. Performs an atomic compare exchange operation on a 64-bit unsigned integer.
Performs an atomic compare exchange operation on the 64-bit unsigned integer specified Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and
CompareValue is returned. If Value is not equal to CompareValue, then Value is returned. CompareValue is returned. If Value is not equal to CompareValue, then Value is returned.
The compare exchange operation must be performed using MP safe mechanisms. The compare exchange operation must be performed using MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().

View File

@ -66,7 +66,7 @@ GetSpinLockProperties (
@param SpinLock A pointer to the spin lock to initialize to the released @param SpinLock A pointer to the spin lock to initialize to the released
state. state.
@return SpinLock in released state. @return SpinLock in release state.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -101,7 +101,7 @@ InitializeSpinLock (
@param SpinLock A pointer to the spin lock to place in the acquired state. @param SpinLock A pointer to the spin lock to place in the acquired state.
@return SpinLock aquiring lock. @return SpinLock acquired lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -224,7 +224,7 @@ AcquireSpinLockOrFail (
@param SpinLock A pointer to the spin lock to release. @param SpinLock A pointer to the spin lock to release.
@return SpinLock releasing lock. @return SpinLock released lock.
**/ **/
SPIN_LOCK * SPIN_LOCK *
@ -301,9 +301,9 @@ InterlockedDecrement (
Performs an atomic compare exchange operation on a 32-bit unsigned integer. Performs an atomic compare exchange operation on a 32-bit unsigned integer.
Performs an atomic compare exchange operation on the 32-bit unsigned integer Performs an atomic compare exchange operation on the 32-bit unsigned integer
specified by Value. If Value is equal to CompareValue, then Value is set to specified by Value. If Value is equal to CompareValue, then Value is set to
ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue, ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
then Value is returned. The compare exchange operation must be performed using then Value is returned. The compare exchange operation must be performed using
MP safe mechanisms. MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().
@ -331,9 +331,9 @@ InterlockedCompareExchange32 (
/** /**
Performs an atomic compare exchange operation on a 64-bit unsigned integer. Performs an atomic compare exchange operation on a 64-bit unsigned integer.
Performs an atomic compare exchange operation on the 64-bit unsigned integer specified Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and
CompareValue is returned. If Value is not equal to CompareValue, then Value is returned. CompareValue is returned. If Value is not equal to CompareValue, then Value is returned.
The compare exchange operation must be performed using MP safe mechanisms. The compare exchange operation must be performed using MP safe mechanisms.
If Value is NULL, then ASSERT(). If Value is NULL, then ASSERT().

View File

@ -19,8 +19,8 @@
/** /**
Retrieves the current CPU interrupt state. Retrieves the current CPU interrupt state.
Retrieves the current CPU interrupt state. Returns TRUE is interrupts are Returns TRUE is interrupts are currently enabled. Otherwise
currently enabled. Otherwise returns FALSE. returns FALSE.
@retval TRUE CPU interrupts are enabled. @retval TRUE CPU interrupts are enabled.
@retval FALSE CPU interrupts are disabled. @retval FALSE CPU interrupts are disabled.