Lines Matching +full:a +full:- +full:bit

3   functions, file path functions, and CPU architecture-specific functions.
5 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
6 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
10 SPDX-License-Identifier: BSD-2-Clause-Patent
18 // Definitions for architecture-specific types
22 /// The IA-32 architecture context buffer used by SetJump() and LongJump().
54 UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
81 UINT32 R3; ///< A copy of R13.
132 /// The RISC-V architecture context buffer used by SetJump() and LongJump().
161 Returns the length of a Null-terminated Unicode string.
165 If String is not aligned on a 16-bit boundary, then ASSERT().
167 @param String A pointer to a Null-terminated Unicode string.
184 Returns the size of a Null-terminated Unicode string in bytes, including the
187 This function returns the size of the Null-terminated Unicode string
190 If String is not aligned on a 16-bit boundary, then ASSERT().
192 @param String A pointer to a Null-terminated Unicode string.
200 @return The size of the Null-terminated Unicode string in bytes, including
217 If Destination is not aligned on a 16-bit boundary, then ASSERT().
218 If Source is not aligned on a 16-bit boundary, then ASSERT().
222 @param Destination A pointer to a Null-terminated Unicode string.
225 @param Source A pointer to a Null-terminated Unicode string.
252 If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
253 If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
257 @param Destination A pointer to a Null-terminated Unicode string.
260 @param Source A pointer to a Null-terminated Unicode string.
284 Appends a copy of the string pointed to by Source (including the terminating
289 If Destination is not aligned on a 16-bit boundary, then ASSERT().
290 If Source is not aligned on a 16-bit boundary, then ASSERT().
294 @param Destination A pointer to a Null-terminated Unicode string.
297 @param Source A pointer to a Null-terminated Unicode string.
302 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
328 If Destination is not aligned on a 16-bit boundary, then ASSERT().
329 If Source is not aligned on a 16-bit boundary, then ASSERT().
333 @param Destination A pointer to a Null-terminated Unicode string.
336 @param Source A pointer to a Null-terminated Unicode string.
342 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
362 Convert a Null-terminated Unicode decimal string to a value of type UINTN.
364 This function outputs a value of type UINTN by interpreting the contents of
365 the Unicode string specified by String as a decimal number. The format of the
370 The valid decimal digit character is in the range [0-9]. The function will
373 be ignored. Then, the function stops at the first character that is a not a
374 valid decimal character or a Null-terminator, whichever one comes first.
376 If String is not aligned in a 16-bit boundary, then ASSERT().
383 If EndPointer is not NULL, a pointer to the character that stopped the scan
388 @param String Pointer to a Null-terminated Unicode string.
399 Null-terminator.
413 Convert a Null-terminated Unicode decimal string to a value of type UINT64.
415 This function outputs a value of type UINT64 by interpreting the contents of
416 the Unicode string specified by String as a decimal number. The format of the
421 The valid decimal digit character is in the range [0-9]. The function will
424 be ignored. Then, the function stops at the first character that is a not a
425 valid decimal character or a Null-terminator, whichever one comes first.
427 If String is not aligned in a 16-bit boundary, then ASSERT().
434 If EndPointer is not NULL, a pointer to the character that stopped the scan
439 @param String Pointer to a Null-terminated Unicode string.
450 Null-terminator.
464 Convert a Null-terminated Unicode hexadecimal string to a value of type
467 This function outputs a value of type UINTN by interpreting the contents of
468 the Unicode string specified by String as a hexadecimal number. The format of
473 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
480 the first character that is a not a valid hexadecimal character or NULL,
483 If String is not aligned in a 16-bit boundary, then ASSERT().
490 If EndPointer is not NULL, a pointer to the character that stopped the scan
495 @param String Pointer to a Null-terminated Unicode string.
506 Null-terminator.
520 Convert a Null-terminated Unicode hexadecimal string to a value of type
523 This function outputs a value of type UINT64 by interpreting the contents of
524 the Unicode string specified by String as a hexadecimal number. The format of
529 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
536 the first character that is a not a valid hexadecimal character or NULL,
539 If String is not aligned in a 16-bit boundary, then ASSERT().
546 If EndPointer is not NULL, a pointer to the character that stopped the scan
551 @param String Pointer to a Null-terminated Unicode string.
562 Null-terminator.
576 Returns the length of a Null-terminated Ascii string.
580 @param String A pointer to a Null-terminated Ascii string.
597 Returns the size of a Null-terminated Ascii string in bytes, including the
600 This function returns the size of the Null-terminated Ascii string specified
603 @param String A pointer to a Null-terminated Ascii string.
611 @return The size of the Null-terminated Ascii string in bytes, including the
630 @param Destination A pointer to a Null-terminated Ascii string.
633 @param Source A pointer to a Null-terminated Ascii string.
662 @param Destination A pointer to a Null-terminated Ascii string.
665 @param Source A pointer to a Null-terminated Ascii string.
689 Appends a copy of the string pointed to by Source (including the terminating
696 @param Destination A pointer to a Null-terminated Ascii string.
699 @param Source A pointer to a Null-terminated Ascii string.
704 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
732 @param Destination A pointer to a Null-terminated Ascii string.
735 @param Source A pointer to a Null-terminated Ascii string.
741 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
761 Convert a Null-terminated Ascii decimal string to a value of type UINTN.
763 This function outputs a value of type UINTN by interpreting the contents of
764 the Ascii string specified by String as a decimal number. The format of the
769 The valid decimal digit character is in the range [0-9]. The function will
772 be ignored. Then, the function stops at the first character that is a not a
773 valid decimal character or a Null-terminator, whichever one comes first.
780 If EndPointer is not NULL, a pointer to the character that stopped the scan
785 @param String Pointer to a Null-terminated Ascii string.
796 Null-terminator.
810 Convert a Null-terminated Ascii decimal string to a value of type UINT64.
812 This function outputs a value of type UINT64 by interpreting the contents of
813 the Ascii string specified by String as a decimal number. The format of the
818 The valid decimal digit character is in the range [0-9]. The function will
821 be ignored. Then, the function stops at the first character that is a not a
822 valid decimal character or a Null-terminator, whichever one comes first.
829 If EndPointer is not NULL, a pointer to the character that stopped the scan
834 @param String Pointer to a Null-terminated Ascii string.
845 Null-terminator.
859 Convert a Null-terminated Ascii hexadecimal string to a value of type UINTN.
861 This function outputs a value of type UINTN by interpreting the contents of
862 the Ascii string specified by String as a hexadecimal number. The format of
867 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
874 character that is a not a valid hexadecimal character or Null-terminator,
882 If EndPointer is not NULL, a pointer to the character that stopped the scan
887 @param String Pointer to a Null-terminated Ascii string.
898 Null-terminator.
912 Convert a Null-terminated Ascii hexadecimal string to a value of type UINT64.
914 This function outputs a value of type UINT64 by interpreting the contents of
915 the Ascii string specified by String as a hexadecimal number. The format of
920 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
927 character that is a not a valid hexadecimal character or Null-terminator,
935 If EndPointer is not NULL, a pointer to the character that stopped the scan
940 @param String Pointer to a Null-terminated Ascii string.
951 Null-terminator.
970 Copies one Null-terminated Unicode string to another Null-terminated Unicode
978 If Destination is not aligned on a 16-bit boundary, then ASSERT().
980 If Source is not aligned on a 16-bit boundary, then ASSERT().
984 Null-terminator, then ASSERT().
986 @param Destination The pointer to a Null-terminated Unicode string.
987 @param Source The pointer to a Null-terminated Unicode string.
1003 Copies up to a specified length from one Null-terminated Unicode string to
1004 another Null-terminated Unicode string and returns the new Unicode string.
1015 If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
1017 If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
1022 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
1025 @param Destination The pointer to a Null-terminated Unicode string.
1026 @param Source The pointer to a Null-terminated Unicode string.
1042 Returns the length of a Null-terminated Unicode string.
1044 This function returns the number of Unicode characters in the Null-terminated
1048 If String is not aligned on a 16-bit boundary, then ASSERT().
1051 Null-terminator, then ASSERT().
1053 @param String Pointer to a Null-terminated Unicode string.
1066 Returns the size of a Null-terminated Unicode string in bytes, including the
1069 This function returns the size, in bytes, of the Null-terminated Unicode string
1073 If String is not aligned on a 16-bit boundary, then ASSERT().
1076 Null-terminator, then ASSERT().
1078 @param String The pointer to a Null-terminated Unicode string.
1091 Compares two Null-terminated Unicode strings, and returns the difference
1094 This function compares the Null-terminated Unicode string FirstString to the
1095 Null-terminated Unicode string SecondString. If FirstString is identical to
1101 If FirstString is not aligned on a 16-bit boundary, then ASSERT().
1103 If SecondString is not aligned on a 16-bit boundary, then ASSERT().
1106 Null-terminator, then ASSERT().
1109 Null-terminator, then ASSERT().
1111 @param FirstString The pointer to a Null-terminated Unicode string.
1112 @param SecondString The pointer to a Null-terminated Unicode string.
1127 Compares up to a specified length the contents of two Null-terminated Unicode strings,
1130 This function compares the Null-terminated Unicode string FirstString to the
1131 Null-terminated Unicode string SecondString. At most, Length Unicode
1138 If Length > 0 and FirstString is not aligned on a 16-bit boundary, then ASSERT().
1140 If Length > 0 and SecondString is not aligned on a 16-bit boundary, then ASSERT().
1144 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
1147 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
1150 @param FirstString The pointer to a Null-terminated Unicode string.
1151 @param SecondString The pointer to a Null-terminated Unicode string.
1172 Concatenates one Null-terminated Unicode string to another Null-terminated
1175 This function concatenates two Null-terminated Unicode strings. The contents
1176 of Null-terminated Unicode string Source are concatenated to the end of
1177 Null-terminated Unicode string Destination. The Null-terminated concatenated
1182 If Destination is not aligned on a 16-bit boundary, then ASSERT().
1184 If Source is not aligned on a 16-bit boundary, then ASSERT().
1188 Null-terminator, then ASSERT().
1191 Null-terminator, then ASSERT().
1193 and Source results in a Unicode string with more than
1195 Null-terminator, then ASSERT().
1197 @param Destination The pointer to a Null-terminated Unicode string.
1198 @param Source The pointer to a Null-terminated Unicode string.
1214 Concatenates up to a specified length one Null-terminated Unicode to the end
1215 of another Null-terminated Unicode string, and returns the concatenated
1218 This function concatenates two Null-terminated Unicode strings. The contents
1219 of Null-terminated Unicode string Source are concatenated to the end of
1220 Null-terminated Unicode string Destination, and Destination is returned. At
1222 Destination, and Destination is always Null-terminated. If Length is 0, then
1227 If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
1229 If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
1235 Null-terminator, then ASSERT().
1238 Null-terminator, then ASSERT().
1240 and Source results in a Unicode string with more than PcdMaximumUnicodeStringLength
1241 Unicode characters, not including the Null-terminator, then ASSERT().
1243 @param Destination The pointer to a Null-terminated Unicode string.
1244 @param Source The pointer to a Null-terminated Unicode string.
1261 Returns the first occurrence of a Null-terminated Unicode sub-string
1262 in a Null-terminated Unicode string.
1264 This function scans the contents of the Null-terminated Unicode string
1270 If String is not aligned on a 16-bit boundary, then ASSERT().
1272 If SearchString is not aligned on a 16-bit boundary, then ASSERT().
1276 characters, not including the Null-terminator, then ASSERT().
1278 @param String The pointer to a Null-terminated Unicode string.
1279 @param SearchString The pointer to a Null-terminated Unicode string to search for.
1282 @return others If there is a match.
1293 Convert a Null-terminated Unicode decimal string to a value of
1296 This function returns a value of type UINTN by interpreting the contents
1297 of the Unicode string specified by String as a decimal number. The format
1302 The valid decimal digit character is in the range [0-9]. The
1306 stops at the first character that is a not a valid decimal character
1307 or a Null-terminator, whichever one comes first.
1310 If String is not aligned in a 16-bit boundary, then ASSERT().
1319 the Null-terminator, then ASSERT().
1321 @param String The pointer to a Null-terminated Unicode string.
1333 Convert a Null-terminated Unicode decimal string to a value of
1336 This function returns a value of type UINT64 by interpreting the contents
1337 of the Unicode string specified by String as a decimal number. The format
1342 The valid decimal digit character is in the range [0-9]. The
1346 stops at the first character that is a not a valid decimal character
1347 or a Null-terminator, whichever one comes first.
1350 If String is not aligned in a 16-bit boundary, then ASSERT().
1359 the Null-terminator, then ASSERT().
1361 @param String The pointer to a Null-terminated Unicode string.
1374 Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
1376 This function returns a value of type UINTN by interpreting the contents
1377 of the Unicode string specified by String as a hexadecimal number.
1382 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1389 that is a not a valid hexadecimal character or NULL, whichever one comes first.
1392 If String is not aligned in a 16-bit boundary, then ASSERT().
1400 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
1403 @param String The pointer to a Null-terminated Unicode string.
1416 Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
1418 This function returns a value of type UINT64 by interpreting the contents
1419 of the Unicode string specified by String as a hexadecimal number.
1424 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1431 a not a valid hexadecimal character or NULL, whichever one comes first.
1434 If String is not aligned in a 16-bit boundary, then ASSERT().
1442 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
1445 @param String The pointer to a Null-terminated Unicode string.
1457 Convert a Null-terminated Unicode string to IPv6 address and prefix length.
1459 This function outputs a value of type IPv6_ADDRESS and may output a value
1465 X contains one to four hexadecimal digit characters in the range [0-9], [a-f] and
1466 [A-F]. X is converted to a value of type UINT16, whose low byte is stored in low
1468 digit characters in the range [0-9]. The running zero in the beginning of P will
1472 not a valid hexadecimal digit character after eight X's are converted.
1475 a valid decimal digit character after P is converted.
1480 If String is not aligned in a 16-bit boundary, then ASSERT().
1482 If EndPointer is not NULL and Address is translated from String, a pointer
1486 @param String Pointer to a Null-terminated Unicode string.
1500 If P starts with character that is not a
1516 Convert a Null-terminated Unicode string to IPv4 address and prefix length.
1518 This function outputs a value of type IPv4_ADDRESS and may output a value
1524 D and P are decimal digit characters in the range [0-9]. The running zero in
1528 not a valid decimal digit character after four D's are converted.
1531 a valid decimal digit character after P is converted.
1533 If String is not aligned in a 16-bit boundary, then ASSERT().
1535 If EndPointer is not NULL and Address is translated from String, a pointer
1539 @param String Pointer to a Null-terminated Unicode string.
1568 Convert a Null-terminated Unicode GUID string to a value of type
1571 This function outputs a GUID value by interpreting the contents of
1575 aabbccdd-eeff-gghh-iijj-kkllmmnnoopp
1577 The pairs aa - pp are two characters in the range [0-9], [a-f] and
1578 [A-F], with each pair representing a single byte hexadecimal value.
1598 If String is not aligned in a 16-bit boundary, then ASSERT().
1600 @param String Pointer to a Null-terminated Unicode string.
1617 Convert a Null-terminated Unicode hexadecimal string to a byte array.
1619 This function outputs a byte array by interpreting the contents of
1625 X is a hexadecimal digit character in the range [0-9], [a-f] and [A-F].
1630 If String is not aligned in a 16-bit boundary, then ASSERT().
1632 @param String Pointer to a Null-terminated Unicode string.
1645 a character that is not valid hexadecimal
1646 digit characters, or a Null-terminator.
1663 Convert a Null-terminated Unicode string to a Null-terminated
1670 The caller is responsible to make sure Destination points to a buffer with size
1673 If any Unicode characters in Source contain non-zero value in
1678 If Source is not aligned on a 16-bit boundary, then ASSERT().
1683 the Null-terminator, then ASSERT().
1687 Null-terminator, then ASSERT().
1689 @param Source The pointer to a Null-terminated Unicode string.
1690 @param Destination The pointer to a Null-terminated ASCII string.
1705 Convert a Null-terminated Unicode string to a Null-terminated
1713 Destination by appending a Null-terminator character at the end.
1715 The caller is responsible to make sure Destination points to a buffer with size
1718 If any Unicode characters in Source contain non-zero value in
1721 If Source is not aligned on a 16-bit boundary, then ASSERT().
1725 @param Source The pointer to a Null-terminated Unicode string.
1726 @param Destination The pointer to a Null-terminated ASCII string.
1753 Convert not more than Length successive characters from a Null-terminated
1754 Unicode string to a Null-terminated Ascii string. If no null char is copied
1760 Destination by appending a Null-terminator character at the end.
1762 The caller is responsible to make sure Destination points to a buffer with size
1765 If any Unicode characters in Source contain non-zero value in the upper 8
1767 If Source is not aligned on a 16-bit boundary, then ASSERT().
1771 @param Source The pointer to a Null-terminated Unicode string.
1774 @param Destination The pointer to a Null-terminated Ascii string.
1810 Copies one Null-terminated ASCII string to another Null-terminated ASCII
1821 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
1824 @param Destination The pointer to a Null-terminated ASCII string.
1825 @param Source The pointer to a Null-terminated ASCII string.
1841 Copies up to a specified length one Null-terminated ASCII string to another
1842 Null-terminated ASCII string and returns the new ASCII string.
1857 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
1860 @param Destination The pointer to a Null-terminated ASCII string.
1861 @param Source The pointer to a Null-terminated ASCII string.
1877 Returns the length of a Null-terminated ASCII string.
1879 This function returns the number of ASCII characters in the Null-terminated
1885 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
1888 @param String The pointer to a Null-terminated ASCII string.
1901 Returns the size of a Null-terminated ASCII string in bytes, including the
1904 This function returns the size, in bytes, of the Null-terminated ASCII string
1909 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
1912 @param String The pointer to a Null-terminated ASCII string.
1925 Compares two Null-terminated ASCII strings, and returns the difference
1928 This function compares the Null-terminated ASCII string FirstString to the
1929 Null-terminated ASCII string SecondString. If FirstString is identical to
1937 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
1941 Null-terminator, then ASSERT().
1943 @param FirstString The pointer to a Null-terminated ASCII string.
1944 @param SecondString The pointer to a Null-terminated ASCII string.
1959 Performs a case insensitive comparison of two Null-terminated ASCII strings,
1962 This function performs a case insensitive comparison of the Null-terminated
1963 ASCII string FirstString to the Null-terminated ASCII string SecondString. If
1972 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
1976 Null-terminator, then ASSERT().
1978 @param FirstString The pointer to a Null-terminated ASCII string.
1979 @param SecondString The pointer to a Null-terminated ASCII string.
1996 Compares two Null-terminated ASCII strings with maximum lengths, and returns
1999 This function compares the Null-terminated ASCII string FirstString to the
2000 Null-terminated ASCII string SecondString. At most, Length ASCII characters
2011 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2014 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2017 @param FirstString The pointer to a Null-terminated ASCII string.
2018 @param SecondString The pointer to a Null-terminated ASCII string.
2039 Concatenates one Null-terminated ASCII string to another Null-terminated
2042 This function concatenates two Null-terminated ASCII strings. The contents of
2043 Null-terminated ASCII string Source are concatenated to the end of Null-
2044 terminated ASCII string Destination. The Null-terminated concatenated ASCII
2050 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2053 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2056 Source results in a ASCII string with more than PcdMaximumAsciiStringLength
2059 @param Destination The pointer to a Null-terminated ASCII string.
2060 @param Source The pointer to a Null-terminated ASCII string.
2076 Concatenates up to a specified length one Null-terminated ASCII string to
2077 the end of another Null-terminated ASCII string, and returns the
2080 This function concatenates two Null-terminated ASCII strings. The contents
2081 of Null-terminated ASCII string Source are concatenated to the end of Null-
2084 Destination, and Destination is always Null-terminated. If Length is 0, then
2094 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2097 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2100 Source results in a ASCII string with more than PcdMaximumAsciiStringLength
2101 ASCII characters, not including the Null-terminator, then ASSERT().
2103 @param Destination The pointer to a Null-terminated ASCII string.
2104 @param Source The pointer to a Null-terminated ASCII string.
2121 Returns the first occurrence of a Null-terminated ASCII sub-string
2122 in a Null-terminated ASCII string.
2134 not including the Null-terminator, then ASSERT().
2136 @param String The pointer to a Null-terminated ASCII string.
2137 @param SearchString The pointer to a Null-terminated ASCII string to search for.
2140 @retval others If there is a match return the first occurrence of SearchingString.
2153 Convert a Null-terminated ASCII decimal string to a value of type
2156 This function returns a value of type UINTN by interpreting the contents
2157 of the ASCII string String as a decimal number. The format of the input
2162 The valid decimal digit character is in the range [0-9]. The function will
2165 function stops at the first character that is a not a valid decimal character or
2166 Null-terminator, whichever on comes first.
2174 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2177 @param String The pointer to a Null-terminated ASCII string.
2190 Convert a Null-terminated ASCII decimal string to a value of type
2193 This function returns a value of type UINT64 by interpreting the contents
2194 of the ASCII string String as a decimal number. The format of the input
2199 The valid decimal digit character is in the range [0-9]. The function will
2202 function stops at the first character that is a not a valid decimal character or
2203 Null-terminator, whichever on comes first.
2211 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2214 @param String The pointer to a Null-terminated ASCII string.
2227 Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
2229 This function returns a value of type UINTN by interpreting the contents of
2230 the ASCII string String as a hexadecimal number. The format of the input ASCII
2235 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
2241 digit. Then, the function stops at the first character that is a not a valid
2242 hexadecimal character or Null-terminator, whichever on comes first.
2253 the Null-terminator, then ASSERT().
2255 @param String The pointer to a Null-terminated ASCII string.
2268 Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
2270 This function returns a value of type UINT64 by interpreting the contents of
2271 the ASCII string String as a hexadecimal number. The format of the input ASCII
2276 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
2282 digit. Then, the function stops at the first character that is a not a valid
2283 hexadecimal character or Null-terminator, whichever on comes first.
2294 the Null-terminator, then ASSERT().
2296 @param String The pointer to a Null-terminated ASCII string.
2308 Convert a Null-terminated ASCII string to IPv6 address and prefix length.
2310 This function outputs a value of type IPv6_ADDRESS and may output a value
2316 X contains one to four hexadecimal digit characters in the range [0-9], [a-f] and
2317 [A-F]. X is converted to a value of type UINT16, whose low byte is stored in low
2319 digit characters in the range [0-9]. The running zero in the beginning of P will
2323 not a valid hexadecimal digit character after eight X's are converted.
2326 a valid decimal digit character after P is converted.
2331 If EndPointer is not NULL and Address is translated from String, a pointer
2335 @param String Pointer to a Null-terminated ASCII string.
2349 If P starts with character that is not a
2365 Convert a Null-terminated ASCII string to IPv4 address and prefix length.
2367 This function outputs a value of type IPv4_ADDRESS and may output a value
2373 D and P are decimal digit characters in the range [0-9]. The running zero in
2377 not a valid decimal digit character after four D's are converted.
2380 a valid decimal digit character after P is converted.
2382 If EndPointer is not NULL and Address is translated from String, a pointer
2386 @param String Pointer to a Null-terminated ASCII string.
2413 Convert a Null-terminated ASCII GUID string to a value of type
2416 This function outputs a GUID value by interpreting the contents of
2420 aabbccdd-eeff-gghh-iijj-kkllmmnnoopp
2422 The pairs aa - pp are two characters in the range [0-9], [a-f] and
2423 [A-F], with each pair representing a single byte hexadecimal value.
2443 @param String Pointer to a Null-terminated ASCII string.
2460 Convert a Null-terminated ASCII hexadecimal string to a byte array.
2462 This function outputs a byte array by interpreting the contents of
2468 X is a hexadecimal digit character in the range [0-9], [a-f] and [A-F].
2473 @param String Pointer to a Null-terminated ASCII string.
2486 a character that is not valid hexadecimal
2487 digit characters, or a Null-terminator.
2504 Convert one Null-terminated ASCII string to a Null-terminated
2509 Unicode string Destination by appending a Null-terminator character at the end.
2510 The caller is responsible to make sure Destination points to a buffer with size
2514 If Destination is not aligned on a 16-bit boundary, then ASSERT().
2518 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2522 Null-terminator, then ASSERT().
2524 @param Source The pointer to a Null-terminated ASCII string.
2525 @param Destination The pointer to a Null-terminated Unicode string.
2540 Convert one Null-terminated ASCII string to a Null-terminated
2547 appending a Null-terminator character at the end.
2549 The caller is responsible to make sure Destination points to a buffer with size
2552 If Destination is not aligned on a 16-bit boundary, then ASSERT().
2556 @param Source The pointer to a Null-terminated ASCII string.
2557 @param Destination The pointer to a Null-terminated Unicode string.
2584 Convert not more than Length successive characters from a Null-terminated
2585 Ascii string to a Null-terminated Unicode string. If no null char is copied
2590 terminates the Unicode string Destination by appending a Null-terminator
2593 The caller is responsible to make sure Destination points to a buffer with
2597 If Destination is not aligned on a 16-bit boundary, then ASSERT().
2602 @param Source The pointer to a Null-terminated Ascii string.
2604 @param Destination The pointer to a Null-terminated Unicode string.
2636 Convert a Unicode character to upper case only if
2637 it maps to a valid small-case ASCII character.
2640 which maps to a valid small-case ASCII character, i.e.
2641 L'a' to L'z'. For other Unicode character, the input character
2646 @retval LowerCharacter If the Char is with range L'a' to L'z'.
2657 Converts a lowercase Ascii character to upper one.
2676 Convert binary data to a Base64 encoded ascii string based on RFC4648.
2678 …Produce a Null-terminated Ascii string in the output buffer specified by Destination and Destinati…
2689 …D_PARAMETER If SourceLength or DestinationSize is bigger than (MAX_ADDRESS - (UINTN)Destination).
2704 Decode Base64 ASCII encoded data to 8-bit binary representation, based on
2710 - 0x09 ('\t') horizontal tab
2711 - 0x0A ('\n') new line
2712 - 0x0B ('\v') vertical tab
2713 - 0x0C ('\f') form feed
2714 - 0x0D ('\r') carriage return
2715 - 0x20 (' ') space
2730 8-bit binary representation. Allocated by the
2733 performed, but the 8-bit binary
2734 representation is not stored. If non-NULL and
2744 representation. If the function returns a
2750 been decoded to on-output DestinationSize
2770 @retval RETURN_INVALID_PARAMETER Source is non-NULL, and (Source +
2773 @retval RETURN_INVALID_PARAMETER Destination is non-NULL, and (Destination +
2795 Converts an 8-bit value to an 8-bit BCD value.
2797 Converts the 8-bit value specified by Value to BCD. The BCD value is
2802 @param Value The 8-bit value to convert to BCD. Range 0..99.
2815 Converts an 8-bit BCD value to an 8-bit value.
2817 Converts the 8-bit BCD value specified by Value to an 8-bit value. The 8-bit
2823 @param Value The 8-bit BCD value to convert to an 8-bit value.
2825 @return The 8-bit value is returned.
2839 Removes the last directory or file entry in a path.
2844 @retval TRUE A directory or file was removed.
2854 - Single periods in the path are removed.
2855 - Double periods in the path are removed along with a single parent directory.
2856 - Forward slashes L'/' are converted to backward slashes L'\'.
2876 Initializes the head node of a doubly linked list that is declared as a
2877 global variable in a module.
2879 Initializes the forward and backward links of a new linked list. After
2880 initializing a linked list with this macro, the other linked list functions
2886 @param ListHead The head note of a list to initialize.
2892 Iterates over each node in a doubly linked list using each node's forward link.
2894 @param Entry A pointer to a list node used as a loop cursor during iteration
2899 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
2902 Iterates over each node in a doubly linked list using each node's forward link
2909 @param Entry A pointer to a list node used as a loop cursor during iteration
2910 @param NextEntry A pointer to a list node used to temporarily store the next node
2915 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\
2916 Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)
2919 Checks whether FirstEntry and SecondEntry are part of the same doubly-linked
2923 If FirstEntry->ForwardLink is NULL, then ASSERT().
2924 If FirstEntry->BackLink is NULL, then ASSERT().
2929 @param FirstEntry A pointer to a node in a linked list.
2930 @param SecondEntry A pointer to the node to locate.
2932 @retval TRUE SecondEntry is in the same doubly-linked list as FirstEntry.
2933 @retval FALSE SecondEntry isn't in the same doubly-linked list as FirstEntry,
2946 Initializes the head node of a doubly linked list, and returns the pointer to
2949 Initializes the forward and backward links of a new linked list. After
2950 initializing a linked list with this function, the other linked list
2956 @param ListHead A pointer to the head node of a new doubly linked list.
2969 Adds a node to the beginning of a doubly linked list, and returns the pointer
2983 @param ListHead A pointer to the head node of a doubly linked list.
2984 @param Entry A pointer to a node that is to be inserted at the beginning
2985 of a doubly linked list.
2999 Adds a node to the end of a doubly linked list, and returns the pointer to
3013 @param ListHead A pointer to the head node of a doubly linked list.
3014 @param Entry A pointer to a node that is to be added at the end of the
3029 Retrieves the first node of a doubly linked list.
3031 Returns the first node of a doubly linked list. List must have been
3042 @param List A pointer to the head node of a doubly linked list.
3044 @return The first node of a doubly linked list.
3056 Retrieves the next node of a doubly linked list.
3058 Returns the node of a doubly linked list that follows Node.
3068 If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
3070 @param List A pointer to the head node of a doubly linked list.
3071 @param Node A pointer to a node in the doubly linked list.
3085 Retrieves the previous node of a doubly linked list.
3087 Returns the node of a doubly linked list that precedes Node.
3097 If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
3099 @param List A pointer to the head node of a doubly linked list.
3100 @param Node A pointer to a node in the doubly linked list.
3114 Checks to see if a doubly linked list is empty or not.
3126 @param ListHead A pointer to the head node of a doubly linked list.
3140 Determines if a node in a doubly linked list is the head node of a the same
3141 doubly linked list. This function is typically used to terminate a loop that
3142 traverses all the nodes in a doubly linked list starting with the head node.
3155 If PcdVerifyNodeInList is TRUE and Node is not a node in List the and Node is not equal
3158 @param List A pointer to the head node of a doubly linked list.
3159 @param Node A pointer to a node in the doubly linked list.
3161 @retval TRUE Node is the head of the doubly-linked list pointed by List.
3162 @retval FALSE Node is not the head of the doubly-linked list pointed by List.
3174 Determines if a node the last node in a doubly linked list.
3187 If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
3189 @param List A pointer to the head node of a doubly linked list.
3190 @param Node A pointer to a node in the doubly linked list.
3205 Swaps the location of two nodes in a doubly linked list, and returns the
3210 of the SecondEntry node in a doubly linked list. SecondEntry must be in the
3224 @param FirstEntry A pointer to a node in a linked list.
3225 @param SecondEntry A pointer to another node in the same linked list.
3239 Removes a node from a doubly linked list, and returns the node that follows
3242 Removes the node Entry from a doubly linked list. It is up to the caller of
3254 @param Entry A pointer to a node in a linked list.
3270 Shifts a 64-bit integer left between 0 and 63 bits. The low bits are filled
3273 This function shifts the 64-bit value Operand to the left by Count bits. The
3278 @param Operand The 64-bit operand to shift left.
3293 Shifts a 64-bit integer right between 0 and 63 bits. This high bits are
3296 This function shifts the 64-bit value Operand to the right by Count bits. The
3301 @param Operand The 64-bit operand to shift right.
3316 Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled
3317 with original integer's bit 63. The shifted value is returned.
3319 This function shifts the 64-bit value Operand to the right by Count bits. The
3320 high Count bits are set to bit 63 of Operand. The shifted value is returned.
3324 @param Operand The 64-bit operand to shift right.
3339 Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits
3342 This function rotates the 32-bit value Operand to the left by Count bits. The
3348 @param Operand The 32-bit operand to rotate left.
3363 Rotates a 32-bit integer right between 0 and 31 bits, filling the high bits
3366 This function rotates the 32-bit value Operand to the right by Count bits.
3372 @param Operand The 32-bit operand to rotate right.
3387 Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits
3390 This function rotates the 64-bit value Operand to the left by Count bits. The
3396 @param Operand The 64-bit operand to rotate left.
3411 Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits
3414 This function rotates the 64-bit value Operand to the right by Count bits.
3420 @param Operand The 64-bit operand to rotate right.
3435 Returns the bit position of the lowest bit set in a 32-bit value.
3437 This function computes the bit position of the lowest bit set in the 32-bit
3438 value specified by Operand. If Operand is zero, then -1 is returned.
3439 Otherwise, a value between 0 and 31 is returned.
3441 @param Operand The 32-bit operand to evaluate.
3443 @retval 0..31 The lowest bit set in Operand was found.
3444 @retval -1 Operand is zero.
3455 Returns the bit position of the lowest bit set in a 64-bit value.
3457 This function computes the bit position of the lowest bit set in the 64-bit
3458 value specified by Operand. If Operand is zero, then -1 is returned.
3459 Otherwise, a value between 0 and 63 is returned.
3461 @param Operand The 64-bit operand to evaluate.
3463 @retval 0..63 The lowest bit set in Operand was found.
3464 @retval -1 Operand is zero.
3476 Returns the bit position of the highest bit set in a 32-bit value. Equivalent
3479 This function computes the bit position of the highest bit set in the 32-bit
3480 value specified by Operand. If Operand is zero, then -1 is returned.
3481 Otherwise, a value between 0 and 31 is returned.
3483 @param Operand The 32-bit operand to evaluate.
3485 @retval 0..31 Position of the highest bit set in Operand if found.
3486 @retval -1 Operand is zero.
3497 Returns the bit position of the highest bit set in a 64-bit value. Equivalent
3500 This function computes the bit position of the highest bit set in the 64-bit
3501 value specified by Operand. If Operand is zero, then -1 is returned.
3502 Otherwise, a value between 0 and 63 is returned.
3504 @param Operand The 64-bit operand to evaluate.
3506 @retval 0..63 Position of the highest bit set in Operand if found.
3507 @retval -1 Operand is zero.
3518 Returns the value of the highest bit set in a 32-bit value. Equivalent to
3521 This function computes the value of the highest bit set in the 32-bit value
3524 @param Operand The 32-bit operand to evaluate.
3538 Returns the value of the highest bit set in a 64-bit value. Equivalent to
3541 This function computes the value of the highest bit set in the 64-bit value
3544 @param Operand The 64-bit operand to evaluate.
3558 Switches the endianness of a 16-bit integer.
3560 This function swaps the bytes in a 16-bit unsigned value to switch the value
3564 @param Value A 16-bit unsigned value.
3577 Switches the endianness of a 32-bit integer.
3579 This function swaps the bytes in a 32-bit unsigned value to switch the value
3583 @param Value A 32-bit unsigned value.
3596 Switches the endianness of a 64-bit integer.
3598 This function swaps the bytes in a 64-bit unsigned value to switch the value
3602 @param Value A 64-bit unsigned value.
3615 Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and
3616 generates a 64-bit unsigned result.
3618 This function multiples the 64-bit unsigned value Multiplicand by the 32-bit
3619 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
3620 bit unsigned result is returned.
3622 @param Multiplicand A 64-bit unsigned value.
3623 @param Multiplier A 32-bit unsigned value.
3637 Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and
3638 generates a 64-bit unsigned result.
3640 This function multiples the 64-bit unsigned value Multiplicand by the 64-bit
3641 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
3642 bit unsigned result is returned.
3644 @param Multiplicand A 64-bit unsigned value.
3645 @param Multiplier A 64-bit unsigned value.
3659 Multiples a 64-bit signed integer by a 64-bit signed integer and generates a
3660 64-bit signed result.
3662 This function multiples the 64-bit signed value Multiplicand by the 64-bit
3663 signed value Multiplier and generates a 64-bit signed result. This 64-bit
3666 @param Multiplicand A 64-bit signed value.
3667 @param Multiplier A 64-bit signed value.
3681 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3682 a 64-bit unsigned result.
3684 This function divides the 64-bit unsigned value Dividend by the 32-bit
3685 unsigned value Divisor and generates a 64-bit unsigned quotient. This
3686 function returns the 64-bit unsigned quotient.
3690 @param Dividend A 64-bit unsigned value.
3691 @param Divisor A 32-bit unsigned value.
3705 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3706 a 32-bit unsigned remainder.
3708 This function divides the 64-bit unsigned value Dividend by the 32-bit
3709 unsigned value Divisor and generates a 32-bit remainder. This function
3710 returns the 32-bit unsigned remainder.
3714 @param Dividend A 64-bit unsigned value.
3715 @param Divisor A 32-bit unsigned value.
3729 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3730 a 64-bit unsigned result and an optional 32-bit unsigned remainder.
3732 This function divides the 64-bit unsigned value Dividend by the 32-bit
3733 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
3734 is not NULL, then the 32-bit unsigned remainder is returned in Remainder.
3735 This function returns the 64-bit unsigned quotient.
3739 @param Dividend A 64-bit unsigned value.
3740 @param Divisor A 32-bit unsigned value.
3741 @param Remainder A pointer to a 32-bit unsigned value. This parameter is
3757 Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates
3758 a 64-bit unsigned result and an optional 64-bit unsigned remainder.
3760 This function divides the 64-bit unsigned value Dividend by the 64-bit
3761 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
3762 is not NULL, then the 64-bit unsigned remainder is returned in Remainder.
3763 This function returns the 64-bit unsigned quotient.
3767 @param Dividend A 64-bit unsigned value.
3768 @param Divisor A 64-bit unsigned value.
3769 @param Remainder A pointer to a 64-bit unsigned value. This parameter is
3785 Divides a 64-bit signed integer by a 64-bit signed integer and generates a
3786 64-bit signed result and a optional 64-bit signed remainder.
3788 This function divides the 64-bit signed value Dividend by the 64-bit signed
3789 value Divisor and generates a 64-bit signed quotient. If Remainder is not
3790 NULL, then the 64-bit signed remainder is returned in Remainder. This
3791 function returns the 64-bit signed quotient.
3793 It is the caller's responsibility to not call this function with a Divisor of 0.
3799 @param Dividend A 64-bit signed value.
3800 @param Divisor A 64-bit signed value.
3801 @param Remainder A pointer to a 64-bit signed value. This parameter is
3817 Reads a 16-bit value from memory that may be unaligned.
3819 This function returns the 16-bit value pointed to by Buffer. The function
3824 @param Buffer The pointer to a 16-bit value that may be unaligned.
3826 @return The 16-bit value read from Buffer.
3837 Writes a 16-bit value to memory that may be unaligned.
3839 This function writes the 16-bit value specified by Value to Buffer. Value is
3845 @param Buffer The pointer to a 16-bit value that may be unaligned.
3846 @param Value 16-bit value to write to Buffer.
3848 @return The 16-bit value to write to Buffer.
3860 Reads a 24-bit value from memory that may be unaligned.
3862 This function returns the 24-bit value pointed to by Buffer. The function
3867 @param Buffer The pointer to a 24-bit value that may be unaligned.
3869 @return The 24-bit value read from Buffer.
3880 Writes a 24-bit value to memory that may be unaligned.
3882 This function writes the 24-bit value specified by Value to Buffer. Value is
3888 @param Buffer The pointer to a 24-bit value that may be unaligned.
3889 @param Value 24-bit value to write to Buffer.
3891 @return The 24-bit value to write to Buffer.
3903 Reads a 32-bit value from memory that may be unaligned.
3905 This function returns the 32-bit value pointed to by Buffer. The function
3910 @param Buffer The pointer to a 32-bit value that may be unaligned.
3912 @return The 32-bit value read from Buffer.
3923 Writes a 32-bit value to memory that may be unaligned.
3925 This function writes the 32-bit value specified by Value to Buffer. Value is
3931 @param Buffer The pointer to a 32-bit value that may be unaligned.
3932 @param Value 32-bit value to write to Buffer.
3934 @return The 32-bit value to write to Buffer.
3946 Reads a 64-bit value from memory that may be unaligned.
3948 This function returns the 64-bit value pointed to by Buffer. The function
3953 @param Buffer The pointer to a 64-bit value that may be unaligned.
3955 @return The 64-bit value read from Buffer.
3966 Writes a 64-bit value to memory that may be unaligned.
3968 This function writes the 64-bit value specified by Value to Buffer. Value is
3974 @param Buffer The pointer to a 64-bit value that may be unaligned.
3975 @param Value 64-bit value to write to Buffer.
3977 @return The 64-bit value to write to Buffer.
3989 // Bit Field Functions
3993 Returns a bit field from an 8-bit value.
3997 If 8-bit operations are not supported, then ASSERT().
4003 @param StartBit The ordinal of the least significant bit in the bit field.
4005 @param EndBit The ordinal of the most significant bit in the bit field.
4008 @return The bit field read.
4021 Writes a bit field to an 8-bit value, and returns the result.
4023 Writes Value to the bit field specified by the StartBit and the EndBit in
4024 Operand. All other bits in Operand are preserved. The new 8-bit value is
4027 If 8-bit operations are not supported, then ASSERT().
4034 @param StartBit The ordinal of the least significant bit in the bit field.
4036 @param EndBit The ordinal of the most significant bit in the bit field.
4038 @param Value New value of the bit field.
4040 @return The new 8-bit value.
4054 Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the
4057 Performs a bitwise OR between the bit field specified by StartBit
4059 Operand are preserved. The new 8-bit value is returned.
4061 If 8-bit operations are not supported, then ASSERT().
4068 @param StartBit The ordinal of the least significant bit in the bit field.
4070 @param EndBit The ordinal of the most significant bit in the bit field.
4074 @return The new 8-bit value.
4088 Reads a bit field from an 8-bit value, performs a bitwise AND, and returns
4091 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4093 preserved. The new 8-bit value is returned.
4095 If 8-bit operations are not supported, then ASSERT().
4102 @param StartBit The ordinal of the least significant bit in the bit field.
4104 @param EndBit The ordinal of the most significant bit in the bit field.
4108 @return The new 8-bit value.
4122 Reads a bit field from an 8-bit value, performs a bitwise AND followed by a
4125 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4126 in Operand and the value specified by AndData, followed by a bitwise
4128 preserved. The new 8-bit value is returned.
4130 If 8-bit operations are not supported, then ASSERT().
4138 @param StartBit The ordinal of the least significant bit in the bit field.
4140 @param EndBit The ordinal of the most significant bit in the bit field.
4145 @return The new 8-bit value.
4160 Returns a bit field from a 16-bit value.
4164 If 16-bit operations are not supported, then ASSERT().
4170 @param StartBit The ordinal of the least significant bit in the bit field.
4172 @param EndBit The ordinal of the most significant bit in the bit field.
4175 @return The bit field read.
4188 Writes a bit field to a 16-bit value, and returns the result.
4190 Writes Value to the bit field specified by the StartBit and the EndBit in
4191 Operand. All other bits in Operand are preserved. The new 16-bit value is
4194 If 16-bit operations are not supported, then ASSERT().
4201 @param StartBit The ordinal of the least significant bit in the bit field.
4203 @param EndBit The ordinal of the most significant bit in the bit field.
4205 @param Value New value of the bit field.
4207 @return The new 16-bit value.
4221 Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the
4224 Performs a bitwise OR between the bit field specified by StartBit
4226 Operand are preserved. The new 16-bit value is returned.
4228 If 16-bit operations are not supported, then ASSERT().
4235 @param StartBit The ordinal of the least significant bit in the bit field.
4237 @param EndBit The ordinal of the most significant bit in the bit field.
4241 @return The new 16-bit value.
4255 Reads a bit field from a 16-bit value, performs a bitwise AND, and returns
4258 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4260 preserved. The new 16-bit value is returned.
4262 If 16-bit operations are not supported, then ASSERT().
4269 @param StartBit The ordinal of the least significant bit in the bit field.
4271 @param EndBit The ordinal of the most significant bit in the bit field.
4275 @return The new 16-bit value.
4289 Reads a bit field from a 16-bit value, performs a bitwise AND followed by a
4292 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4293 in Operand and the value specified by AndData, followed by a bitwise
4295 preserved. The new 16-bit value is returned.
4297 If 16-bit operations are not supported, then ASSERT().
4305 @param StartBit The ordinal of the least significant bit in the bit field.
4307 @param EndBit The ordinal of the most significant bit in the bit field.
4312 @return The new 16-bit value.
4327 Returns a bit field from a 32-bit value.
4331 If 32-bit operations are not supported, then ASSERT().
4337 @param StartBit The ordinal of the least significant bit in the bit field.
4339 @param EndBit The ordinal of the most significant bit in the bit field.
4342 @return The bit field read.
4355 Writes a bit field to a 32-bit value, and returns the result.
4357 Writes Value to the bit field specified by the StartBit and the EndBit in
4358 Operand. All other bits in Operand are preserved. The new 32-bit value is
4361 If 32-bit operations are not supported, then ASSERT().
4368 @param StartBit The ordinal of the least significant bit in the bit field.
4370 @param EndBit The ordinal of the most significant bit in the bit field.
4372 @param Value New value of the bit field.
4374 @return The new 32-bit value.
4388 Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the
4391 Performs a bitwise OR between the bit field specified by StartBit
4393 Operand are preserved. The new 32-bit value is returned.
4395 If 32-bit operations are not supported, then ASSERT().
4402 @param StartBit The ordinal of the least significant bit in the bit field.
4404 @param EndBit The ordinal of the most significant bit in the bit field.
4408 @return The new 32-bit value.
4422 Reads a bit field from a 32-bit value, performs a bitwise AND, and returns
4425 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4427 preserved. The new 32-bit value is returned.
4429 If 32-bit operations are not supported, then ASSERT().
4436 @param StartBit The ordinal of the least significant bit in the bit field.
4438 @param EndBit The ordinal of the most significant bit in the bit field.
4442 @return The new 32-bit value.
4456 Reads a bit field from a 32-bit value, performs a bitwise AND followed by a
4459 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4460 in Operand and the value specified by AndData, followed by a bitwise
4462 preserved. The new 32-bit value is returned.
4464 If 32-bit operations are not supported, then ASSERT().
4472 @param StartBit The ordinal of the least significant bit in the bit field.
4474 @param EndBit The ordinal of the most significant bit in the bit field.
4479 @return The new 32-bit value.
4494 Returns a bit field from a 64-bit value.
4498 If 64-bit operations are not supported, then ASSERT().
4504 @param StartBit The ordinal of the least significant bit in the bit field.
4506 @param EndBit The ordinal of the most significant bit in the bit field.
4509 @return The bit field read.
4522 Writes a bit field to a 64-bit value, and returns the result.
4524 Writes Value to the bit field specified by the StartBit and the EndBit in
4525 Operand. All other bits in Operand are preserved. The new 64-bit value is
4528 If 64-bit operations are not supported, then ASSERT().
4535 @param StartBit The ordinal of the least significant bit in the bit field.
4537 @param EndBit The ordinal of the most significant bit in the bit field.
4539 @param Value New value of the bit field.
4541 @return The new 64-bit value.
4555 Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the
4558 Performs a bitwise OR between the bit field specified by StartBit
4560 Operand are preserved. The new 64-bit value is returned.
4562 If 64-bit operations are not supported, then ASSERT().
4569 @param StartBit The ordinal of the least significant bit in the bit field.
4571 @param EndBit The ordinal of the most significant bit in the bit field.
4575 @return The new 64-bit value.
4589 Reads a bit field from a 64-bit value, performs a bitwise AND, and returns
4592 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4594 preserved. The new 64-bit value is returned.
4596 If 64-bit operations are not supported, then ASSERT().
4603 @param StartBit The ordinal of the least significant bit in the bit field.
4605 @param EndBit The ordinal of the most significant bit in the bit field.
4609 @return The new 64-bit value.
4623 Reads a bit field from a 64-bit value, performs a bitwise AND followed by a
4626 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4627 in Operand and the value specified by AndData, followed by a bitwise
4629 preserved. The new 64-bit value is returned.
4631 If 64-bit operations are not supported, then ASSERT().
4639 @param StartBit The ordinal of the least significant bit in the bit field.
4641 @param EndBit The ordinal of the most significant bit in the bit field.
4646 @return The new 64-bit value.
4660 Reads a bit field from a 32-bit value, counts and returns
4663 Counts the number of set bits in the bit field specified by
4671 @param StartBit The ordinal of the least significant bit in the bit field.
4673 @param EndBit The ordinal of the most significant bit in the bit field.
4688 Reads a bit field from a 64-bit value, counts and returns
4691 Counts the number of set bits in the bit field specified by
4699 @param StartBit The ordinal of the least significant bit in the bit field.
4701 @param EndBit The ordinal of the most significant bit in the bit field.
4720 Returns the sum of all elements in a buffer in unit of UINT8.
4723 This function calculates the sum of all elements in a buffer
4729 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4746 Returns the two's complement checksum of all elements in a buffer
4747 of 8-bit values.
4749 This function first calculates the sum of the 8-bit values in the
4755 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4772 Returns the sum of all elements in a buffer of 16-bit values. During
4775 This function calculates the sum of the 16-bit values in the buffer
4777 The 16-bit result is returned. If Length is 0, then 0 is returned.
4780 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
4781 If Length is not aligned on a 16-bit boundary, then ASSERT().
4782 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4799 Returns the two's complement checksum of all elements in a buffer of
4800 16-bit values.
4802 This function first calculates the sum of the 16-bit values in the buffer
4808 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
4809 If Length is not aligned on a 16-bit boundary, then ASSERT().
4810 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4827 Returns the sum of all elements in a buffer of 32-bit values. During
4830 This function calculates the sum of the 32-bit values in the buffer
4832 The 32-bit result is returned. If Length is 0, then 0 is returned.
4835 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
4836 If Length is not aligned on a 32-bit boundary, then ASSERT().
4837 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4854 Returns the two's complement checksum of all elements in a buffer of
4855 32-bit values.
4857 This function first calculates the sum of the 32-bit values in the buffer
4863 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
4864 If Length is not aligned on a 32-bit boundary, then ASSERT().
4865 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4882 Returns the sum of all elements in a buffer of 64-bit values. During
4885 This function calculates the sum of the 64-bit values in the buffer
4887 The 64-bit result is returned. If Length is 0, then 0 is returned.
4890 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
4891 If Length is not aligned on a 64-bit boundary, then ASSERT().
4892 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4909 Returns the two's complement checksum of all elements in a buffer of
4910 64-bit values.
4912 This function first calculates the sum of the 64-bit values in the buffer
4918 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
4919 If Length is not aligned on a 64-bit boundary, then ASSERT().
4920 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4936 Computes and returns a 32-bit CRC for a data buffer.
4937 CRC32 value bases on ITU-T V.42.
4940 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4942 @param[in] Buffer A pointer to the buffer on which the 32-bit CRC is to be computed.
4945 @retval Crc32 The 32-bit CRC was computed for the data buffer.
4960 Function entry point used when a stack switch is requested with SwitchStack()
4989 Saves the current CPU context that can be restored with a call to LongJump()
4994 calls to LongJump() cause a non-zero value to be returned by SetJump().
4997 For Itanium processors, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
5001 …For example, a BASE_LIBRARY_JUMP_BUFFER allocated by an IA-32 module must never be used from an x6…
5004 @param JumpBuffer A pointer to CPU context buffer.
5006 @retval 0 Indicates a return from SetJump().
5025 For Itanium processors, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
5028 @param JumpBuffer A pointer to CPU context buffer.
5030 restored and must be non-zero.
5129 Requests CPU to pause for a short period of time.
5131 Requests CPU to pause for a short period of time. Typically used in MP
5132 systems to prevent memory starvation while waiting for a spin lock.
5143 Transfers control to a function starting with a new stack.
5149 supports a variable number of arguments following the NewStack parameter.
5150 These additional arguments are ignored on IA-32, x64, and EBC architectures.
5157 @param EntryPoint A pointer to function to call with the new stack.
5158 @param Context1 A pointer to the context to pass into the EntryPoint
5160 @param Context2 A pointer to the context to pass into the EntryPoint
5162 @param NewStack A pointer to the new stack to use for the EntryPoint
5164 @param ... This variable argument list is ignored for IA-32, x64, and
5166 argument list is expected to contain a single parameter of
5183 Generates a breakpoint on the CPU.
5185 Generates a breakpoint on the CPU. The breakpoint must be implemented such
5199 Forces the CPU to execute an infinite loop. A debugger may be used to skip
5213 Uses as a barrier to stop speculative execution.
5229 /// Byte packed structure for 16-bit Real Mode EFLAGS.
5254 /// 32-bits on IA-32.
5255 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5287 /// 32-bits on IA-32.
5288 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5303 UINT32 NW:1; ///< Mot Write-through.
5312 /// 32-bits on IA-32.
5313 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5317 UINT32 VME:1; ///< Virtual-8086 Mode Extensions.
5318 UINT32 PVI:1; ///< Protected-Mode Virtual Interrupts.
5332 UINT32 UMIP:1; ///< User-Mode Instruction Prevention.
5333 UINT32 LA57:1; ///< Linear Address 57bit.
5343 UINT32 PKE:1; ///< Protection-Key Enable.
5350 /// Byte packed structure for a segment descriptor in a GDT/LDT.
5392 /// Byte packed structure for an IA-32 Interrupt Gate Descriptor.
5407 // IA32 Task-State Segment Definition
5493 // IA32 Task-State Segment Definition
5541 /// Structures for the 16-bit real mode thunks.
5607 /// Byte packed structure for an 16-bit real mode thunks.
5624 /// While the type is technically defined as a function type (note: not a
5625 /// pointer-to-function type), such labels in NASM source code never stand for
5629 /// edk2 coding style for function (or pointer-to-function) typedefs. The VOID
5643 This function is only available on IA-32 and x64.
5645 @param Index The 32-bit value to load into EAX prior to invoking the CPUID
5647 @param Eax The pointer to the 32-bit EAX value returned by the CPUID
5649 @param Ebx The pointer to the 32-bit EBX value returned by the CPUID
5651 @param Ecx The pointer to the 32-bit ECX value returned by the CPUID
5653 @param Edx The pointer to the 32-bit EDX value returned by the CPUID
5675 Index. This function is only available on IA-32 and x64.
5682 @param Index The 32-bit value to load into EAX prior to invoking the
5684 @param SubIndex The 32-bit value to load into ECX prior to invoking the
5686 @param Eax The pointer to the 32-bit EAX value returned by the CPUID
5689 @param Ebx The pointer to the 32-bit EBX value returned by the CPUID
5692 @param Ecx The pointer to the 32-bit ECX value returned by the CPUID
5695 @param Edx The pointer to the 32-bit EDX value returned by the CPUID
5715 Set CD bit and clear NW bit of CR0 followed by a WBINVD.
5717 Disables the caches by setting the CD bit of CR0 to 1, clearing the NW bit of CR0 to 0,
5718 and executing a WBINVD instruction. This function is only available on IA-32 and x64.
5729 Perform a WBINVD and clear both the CD and NW bits of CR0.
5731 Enables the caches by executing a WBINVD instruction and then clear both the CD and NW
5732 bits of CR0 to 0. This function is only available on IA-32 and x64.
5743 Returns the lower 32-bits of a Machine Specific Register(MSR).
5745 Reads and returns the lower 32-bits of the MSR specified by Index.
5749 is only available on IA-32 and x64.
5751 @param Index The 32-bit MSR index to read.
5764 Writes a 32-bit value to a Machine Specific Register(MSR), and returns the value.
5765 The upper 32-bits of the MSR are set to zero.
5767 Writes the 32-bit value specified by Value to the MSR specified by Index. The
5768 upper 32-bits of the MSR write are set to zero. The 32-bit value written to
5772 handlers. This function is only available on IA-32 and x64.
5774 @param Index The 32-bit MSR index to write.
5775 @param Value The 32-bit value to write to the MSR.
5789 Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and
5790 writes the result back to the 64-bit MSR.
5792 Reads the 64-bit MSR specified by Index, performs a bitwise OR
5793 between the lower 32-bits of the read result and the value specified by
5794 OrData, and writes the result to the 64-bit MSR specified by Index. The lower
5795 32-bits of the value written to the MSR is returned. No parameter checking is
5799 IA-32 and x64.
5801 @param Index The 32-bit MSR index to write.
5804 @return The lower 32-bit value written to the MSR.
5816 Reads a 64-bit MSR, performs a bitwise AND on the lower 32-bits, and writes
5817 the result back to the 64-bit MSR.
5819 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
5820 lower 32-bits of the read result and the value specified by AndData, and
5821 writes the result to the 64-bit MSR specified by Index. The lower 32-bits of
5825 establish proper exception handlers. This function is only available on IA-32
5828 @param Index The 32-bit MSR index to write.
5831 @return The lower 32-bit value written to the MSR.
5843 Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR
5844 on the lower 32-bits, and writes the result back to the 64-bit MSR.
5846 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
5847 lower 32-bits of the read result and the value specified by AndData
5848 preserving the upper 32-bits, performs a bitwise OR between the
5850 result to the 64-bit MSR specified by Address. The lower 32-bits of the value
5855 available on IA-32 and x64.
5857 @param Index The 32-bit MSR index to write.
5861 @return The lower 32-bit value written to the MSR.
5874 Reads a bit field of an MSR.
5876 Reads the bit field in the lower 32-bits of a 64-bit MSR. The bit field is
5877 specified by the StartBit and the EndBit. The value of the bit field is
5880 available on IA-32 and x64.
5886 @param Index The 32-bit MSR index to read.
5887 @param StartBit The ordinal of the least significant bit in the bit field.
5889 @param EndBit The ordinal of the most significant bit in the bit field.
5892 @return The bit field read from the MSR.
5905 Writes a bit field to an MSR.
5907 Writes Value to a bit field in the lower 32-bits of a 64-bit MSR. The bit
5909 destination MSR are preserved. The lower 32-bits of the MSR written is
5912 This function is only available on IA-32 and x64.
5919 @param Index The 32-bit MSR index to write.
5920 @param StartBit The ordinal of the least significant bit in the bit field.
5922 @param EndBit The ordinal of the most significant bit in the bit field.
5924 @param Value New value of the bit field.
5926 @return The lower 32-bit of the value written to the MSR.
5940 Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the
5941 result back to the bit field in the 64-bit MSR.
5943 Reads the 64-bit MSR specified by Index, performs a bitwise OR
5945 result to the 64-bit MSR specified by Index. The lower 32-bits of the value
5949 function is only available on IA-32 and x64.
5956 @param Index The 32-bit MSR index to write.
5957 @param StartBit The ordinal of the least significant bit in the bit field.
5959 @param EndBit The ordinal of the most significant bit in the bit field.
5963 @return The lower 32-bit of the value written to the MSR.
5977 Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
5978 result back to the bit field in the 64-bit MSR.
5980 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
5982 64-bit MSR specified by Index. The lower 32-bits of the value written to the
5986 available on IA-32 and x64.
5993 @param Index The 32-bit MSR index to write.
5994 @param StartBit The ordinal of the least significant bit in the bit field.
5996 @param EndBit The ordinal of the most significant bit in the bit field.
6000 @return The lower 32-bit of the value written to the MSR.
6014 Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
6015 bitwise OR, and writes the result back to the bit field in the
6016 64-bit MSR.
6018 Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by a
6020 AndData, and writes the result to the 64-bit MSR specified by Index. The
6021 lower 32-bits of the value written to the MSR are returned. Extra left bits
6024 handlers to catch the exceptions. This function is only available on IA-32
6033 @param Index The 32-bit MSR index to write.
6034 @param StartBit The ordinal of the least significant bit in the bit field.
6036 @param EndBit The ordinal of the most significant bit in the bit field.
6041 @return The lower 32-bit of the value written to the MSR.
6056 Returns a 64-bit Machine Specific Register(MSR).
6058 Reads and returns the 64-bit MSR specified by Index. No parameter checking is
6062 on IA-32 and x64.
6064 @param Index The 32-bit MSR index to read.
6077 Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
6080 Writes the 64-bit value specified by Value to the MSR specified by Index. The
6081 64-bit value written to the MSR is returned. No parameter checking is
6085 IA-32 and x64.
6087 @param Index The 32-bit MSR index to write.
6088 @param Value The 64-bit value to write to the MSR.
6102 Reads a 64-bit MSR, performs a bitwise OR, and writes the result
6103 back to the 64-bit MSR.
6105 Reads the 64-bit MSR specified by Index, performs a bitwise OR
6107 result to the 64-bit MSR specified by Index. The value written to the MSR is
6111 This function is only available on IA-32 and x64.
6113 @param Index The 32-bit MSR index to write.
6128 Reads a 64-bit MSR, performs a bitwise AND, and writes the result back to the
6129 64-bit MSR.
6131 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6133 64-bit MSR specified by Index. The value written to the MSR is returned. No
6137 function is only available on IA-32 and x64.
6139 @param Index The 32-bit MSR index to write.
6154 Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
6155 OR, and writes the result back to the 64-bit MSR.
6157 Reads the 64-bit MSR specified by Index, performs a bitwise AND between read
6158 result and the value specified by AndData, performs a bitwise OR
6160 and writes the result to the 64-bit MSR specified by Index. The value written
6164 establish proper exception handlers. This function is only available on IA-32
6167 @param Index The 32-bit MSR index to write.
6184 Reads a bit field of an MSR.
6186 Reads the bit field in the 64-bit MSR. The bit field is specified by the
6187 StartBit and the EndBit. The value of the bit field is returned. The caller
6190 on IA-32 and x64.
6196 @param Index The 32-bit MSR index to read.
6197 @param StartBit The ordinal of the least significant bit in the bit field.
6199 @param EndBit The ordinal of the most significant bit in the bit field.
6215 Writes a bit field to an MSR.
6217 Writes Value to a bit field in a 64-bit MSR. The bit field is specified by
6221 handlers to catch the exceptions. This function is only available on IA-32 and x64.
6228 @param Index The 32-bit MSR index to write.
6229 @param StartBit The ordinal of the least significant bit in the bit field.
6231 @param EndBit The ordinal of the most significant bit in the bit field.
6233 @param Value New value of the bit field.
6249 Reads a bit field in a 64-bit MSR, performs a bitwise OR, and
6250 writes the result back to the bit field in the 64-bit MSR.
6252 Reads the 64-bit MSR specified by Index, performs a bitwise OR
6254 result to the 64-bit MSR specified by Index. The value written to the MSR is
6258 on IA-32 and x64.
6265 @param Index The 32-bit MSR index to write.
6266 @param StartBit The ordinal of the least significant bit in the bit field.
6268 @param EndBit The ordinal of the most significant bit in the bit field.
6270 @param OrData The value to OR with the read value from the bit field.
6286 Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
6287 result back to the bit field in the 64-bit MSR.
6289 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6291 64-bit MSR specified by Index. The value written to the MSR is returned.
6294 handlers to catch the exceptions. This function is only available on IA-32
6302 @param Index The 32-bit MSR index to write.
6303 @param StartBit The ordinal of the least significant bit in the bit field.
6305 @param EndBit The ordinal of the most significant bit in the bit field.
6307 @param AndData The value to AND with the read value from the bit field.
6323 Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
6324 bitwise OR, and writes the result back to the bit field in the
6325 64-bit MSR.
6327 Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by
6328 a bitwise OR between the read result and the value specified by
6329 AndData, and writes the result to the 64-bit MSR specified by Index. The
6333 exceptions. This function is only available on IA-32 and x64.
6341 @param Index The 32-bit MSR index to write.
6342 @param StartBit The ordinal of the least significant bit in the bit field.
6344 @param EndBit The ordinal of the most significant bit in the bit field.
6346 @param AndData The value to AND with the read value from the bit field.
6367 only available on IA-32 and x64. This returns a 32-bit value on IA-32 and a
6368 64-bit value on x64.
6370 @return EFLAGS on IA-32 or RFLAGS on x64.
6384 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6401 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6418 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6435 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6449 Writes a value to Control Register 0 (CR0).
6451 Writes and returns a new value to CR0. This function is only available on
6452 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6467 Writes a value to Control Register 2 (CR2).
6469 Writes and returns a new value to CR2. This function is only available on
6470 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6485 Writes a value to Control Register 3 (CR3).
6487 Writes and returns a new value to CR3. This function is only available on
6488 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6503 Writes a value to Control Register 4 (CR4).
6505 Writes and returns a new value to CR4. This function is only available on
6506 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6524 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6541 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6558 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6575 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6592 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6609 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6626 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6643 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6657 Writes a value to Debug Register 0 (DR0).
6659 Writes and returns a new value to DR0. This function is only available on
6660 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6675 Writes a value to Debug Register 1 (DR1).
6677 Writes and returns a new value to DR1. This function is only available on
6678 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6693 Writes a value to Debug Register 2 (DR2).
6695 Writes and returns a new value to DR2. This function is only available on
6696 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6711 Writes a value to Debug Register 3 (DR3).
6713 Writes and returns a new value to DR3. This function is only available on
6714 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6729 Writes a value to Debug Register 4 (DR4).
6731 Writes and returns a new value to DR4. This function is only available on
6732 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6747 Writes a value to Debug Register 5 (DR5).
6749 Writes and returns a new value to DR5. This function is only available on
6750 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6765 Writes a value to Debug Register 6 (DR6).
6767 Writes and returns a new value to DR6. This function is only available on
6768 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6783 Writes a value to Debug Register 7 (DR7).
6785 Writes and returns a new value to DR7. This function is only available on
6786 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6804 IA-32 and x64.
6820 IA-32 and x64.
6836 IA-32 and x64.
6852 IA-32 and x64.
6868 IA-32 and x64.
6884 IA-32 and x64.
6900 IA-32 and x64.
6916 function is only available on IA-32 and x64.
6920 @param Gdtr The pointer to a GDTR descriptor.
6934 only available on IA-32 and x64.
6938 @param Gdtr The pointer to a GDTR descriptor.
6952 function is only available on IA-32 and x64.
6956 @param Idtr The pointer to a IDTR descriptor.
6970 only available on IA-32 and x64.
6974 @param Idtr The pointer to a IDTR descriptor.
6987 Reads and returns the current 16-bit LDTR descriptor value. This function is
6988 only available on IA-32 and x64.
7004 only available on IA-32 and x64.
7006 @param Ldtr 16-bit LDTR selector value.
7017 Save the current floating point/SSE/SSE2 context to a buffer.
7020 Buffer. Buffer must be aligned on a 16-byte boundary. This function is only
7021 available on IA-32 and x64.
7024 If Buffer is not aligned on a 16-byte boundary, then ASSERT().
7026 @param Buffer The pointer to a buffer to save the floating point/SSE/SSE2 context.
7037 Restores the current floating point/SSE/SSE2 context from a buffer.
7040 by Buffer. Buffer must be aligned on a 16-byte boundary. This function is
7041 only available on IA-32 and x64.
7044 If Buffer is not aligned on a 16-byte boundary, then ASSERT().
7047 @param Buffer The pointer to a buffer to save the floating point/SSE/SSE2 context.
7058 Reads the current value of 64-bit MMX Register #0 (MM0).
7061 on IA-32 and x64.
7074 Reads the current value of 64-bit MMX Register #1 (MM1).
7077 on IA-32 and x64.
7090 Reads the current value of 64-bit MMX Register #2 (MM2).
7093 on IA-32 and x64.
7106 Reads the current value of 64-bit MMX Register #3 (MM3).
7109 on IA-32 and x64.
7122 Reads the current value of 64-bit MMX Register #4 (MM4).
7125 on IA-32 and x64.
7138 Reads the current value of 64-bit MMX Register #5 (MM5).
7141 on IA-32 and x64.
7154 Reads the current value of 64-bit MMX Register #6 (MM6).
7157 on IA-32 and x64.
7170 Reads the current value of 64-bit MMX Register #7 (MM7).
7173 on IA-32 and x64.
7186 Writes the current value of 64-bit MMX Register #0 (MM0).
7191 @param Value The 64-bit value to write to MM0.
7202 Writes the current value of 64-bit MMX Register #1 (MM1).
7207 @param Value The 64-bit value to write to MM1.
7218 Writes the current value of 64-bit MMX Register #2 (MM2).
7223 @param Value The 64-bit value to write to MM2.
7234 Writes the current value of 64-bit MMX Register #3 (MM3).
7239 @param Value The 64-bit value to write to MM3.
7250 Writes the current value of 64-bit MMX Register #4 (MM4).
7255 @param Value The 64-bit value to write to MM4.
7266 Writes the current value of 64-bit MMX Register #5 (MM5).
7271 @param Value The 64-bit value to write to MM5.
7282 Writes the current value of 64-bit MMX Register #6 (MM6).
7287 @param Value The 64-bit value to write to MM6.
7298 Writes the current value of 64-bit MMX Register #7 (MM7).
7303 @param Value The 64-bit value to write to MM7.
7317 on IA-32 and x64.
7330 Reads the current value of a Performance Counter (PMC).
7333 Index. This function is only available on IA-32 and x64.
7335 @param Index The 32-bit Performance Counter index to read.
7348 Sets up a monitor buffer that is used by AsmMwait().
7350 Executes a MONITOR instruction with the register state specified by Eax, Ecx
7351 and Edx. Returns Eax. This function is only available on IA-32 and x64.
7376 Ecx. Returns Eax. This function is only available on IA-32 and x64.
7395 Executes a WBINVD instruction.
7397 Executes a WBINVD instruction. This function is only available on IA-32 and
7409 Executes a INVD instruction.
7411 Executes a INVD instruction. This function is only available on IA-32 and
7423 Flushes a cache line from all the instruction and data caches within the
7427 This function is only available on IA-32 and x64.
7430 in a physical addressing mode, then LinearAddress is a
7431 physical address. If the CPU is in a virtual
7432 addressing mode, then LinearAddress is a virtual
7445 Enables the 32-bit paging mode on the CPU.
7447 Enables the 32-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
7449 assumes the current execution mode is 32-bit protected mode. This function is
7450 only available on IA-32. After the 32-bit paging mode is enabled, control is
7456 If the current execution mode is not 32-bit protected mode, then ASSERT().
7460 There are a number of constraints that must be followed before calling this
7463 2) The caller must be in 32-bit protected mode with flat descriptors. This
7464 means all descriptors must have a base of 0 and a limit of 4GB.
7465 3) CR0 and CR4 must be compatible with 32-bit protected mode with flat
7471 @param EntryPoint A pointer to function to call with the new stack after
7473 @param Context1 A pointer to the context to pass into the EntryPoint
7475 @param Context2 A pointer to the context to pass into the EntryPoint
7477 @param NewStack A pointer to the new stack to use for the EntryPoint
7492 Disables the 32-bit paging mode on the CPU.
7494 Disables the 32-bit paging mode on the CPU and returns to 32-bit protected
7495 mode. This function assumes the current execution mode is 32-paged protected
7496 mode. This function is only available on IA-32. After the 32-bit paging mode
7502 If the current execution mode is not 32-bit paged mode, then ASSERT().
7506 There are a number of constraints that must be followed before calling this
7509 2) The caller must be in 32-bit paged mode.
7510 3) CR0, CR3, and CR4 must be compatible with 32-bit paged mode.
7514 @param EntryPoint A pointer to function to call with the new stack after
7516 @param Context1 A pointer to the context to pass into the EntryPoint
7518 @param Context2 A pointer to the context to pass into the EntryPoint
7521 @param NewStack A pointer to the new stack to use for the EntryPoint
7536 Enables the 64-bit paging mode on the CPU.
7538 Enables the 64-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
7540 assumes the current execution mode is 32-bit protected mode with flat
7541 descriptors. This function is only available on IA-32. After the 64-bit
7547 If the current execution mode is not 32-bit protected mode with flat
7552 @param Cs The 16-bit selector to load in the CS before EntryPoint
7555 @param EntryPoint The 64-bit virtual address of the function to call with
7557 @param Context1 The 64-bit virtual address of the context to pass into
7560 @param Context2 The 64-bit virtual address of the context to pass into
7563 @param NewStack The 64-bit virtual address of the new stack to use for
7579 Disables the 64-bit paging mode on the CPU.
7581 Disables the 64-bit paging mode on the CPU and returns to 32-bit protected
7582 mode. This function assumes the current execution mode is 64-paging mode.
7583 This function is only available on x64. After the 64-bit paging mode is
7589 If the current execution mode is not 64-bit paged mode, then ASSERT().
7593 @param Cs The 16-bit selector to load in the CS before EntryPoint
7595 references must be setup for 32-bit protected mode.
7596 @param EntryPoint The 64-bit virtual address of the function to call with
7598 @param Context1 The 64-bit virtual address of the context to pass into
7601 @param Context2 The 64-bit virtual address of the context to pass into
7604 @param NewStack The 64-bit virtual address of the new stack to use for
7620 // 16-bit thunking services
7624 Retrieves the properties for 16-bit thunk functions.
7629 in ExtraStackSize. If parameters are passed to the 16-bit real mode code,
7631 of bytes that need to be passed to the 16-bit real mode code.
7636 @param RealModeBufferSize A pointer to the size of the buffer below 1MB
7637 required to use the 16-bit thunk functions.
7638 @param ExtraStackSize A pointer to the extra size of stack below 1MB
7639 that the 16-bit thunk functions require for
7641 16-bit real mode.
7653 Prepares all structures a code required to use AsmThunk16().
7662 @param ThunkContext A pointer to the context structure that describes the
7663 16-bit real mode code to call.
7674 Transfers control to a 16-bit real mode entry point and returns the results.
7676 Transfers control to a 16-bit real mode entry point and returns the results.
7681 to calling the 16-bit real mode entry point. This includes the EFLAGS field of RealModeState,
7682 which is used to set the interrupt state when a 16-bit real mode entry point is called.
7683 …Control is transferred to the 16-bit real mode entry point specified by the CS and Eip fields of R…
7685 …the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function.
7686 The 16-bit real mode entry point is invoked with a 16-bit CALL FAR instruction,
7687 so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment
7688 …and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry
7689 …point must exit with a RETF instruction. The register state is captured into RealModeState immedia…
7692 If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
7693 …or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for makin…
7694 …ddress 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode.
7696 If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
7697 …then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit r…
7701 …is invoked in big real mode. Otherwise, the user code is invoked in 16-bit real mode with 64KB se…
7722 @param ThunkContext A pointer to the context structure that describes the
7723 16-bit real mode code to call.
7734 Prepares all structures and code for a 16-bit real mode thunk, transfers
7735 control to a 16-bit real mode entry point, and returns the results.
7737 Prepares all structures and code for a 16-bit real mode thunk, transfers
7738 control to a 16-bit real mode entry point, and returns the results. If the
7739 caller only need to perform a single 16-bit real mode thunk, then this
7740 service should be used. If the caller intends to make more than one 16-bit
7742 once and AsmThunk16() can be called for each 16-bit real mode thunk.
7749 @param ThunkContext A pointer to the context structure that describes the
7750 16-bit real mode code to call.
7760 Generates a 16-bit random number through RDRAND instruction.
7777 Generates a 32-bit random number through RDRAND instruction.
7794 Generates a 64-bit random number through RDRAND instruction.
7822 Performs a serializing operation on all load-from-memory instructions that
7825 Executes a LFENCE instruction. This function is only available on IA-32 and x64.