Lines Matching +full:64 +full:- +full:bit
3 functions, file path functions, and CPU architecture-specific functions.
5 Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
6 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
10 Copyright (c) 2023 - 2024, Arm Limited. All rights reserved.<BR>
12 SPDX-License-Identifier: BSD-2-Clause-Patent
20 // Definitions for architecture-specific types
24 /// The IA-32 architecture context buffer used by SetJump() and LongJump().
56 UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
145 // Bit shifts for the ID_AA64ISAR0_EL1 register.
163 // Bit masks for the ID_AA64ISAR0_EL1 fields.
181 // Bit masks for the ID_AA64ISAR0_EL1 field values.
220 /// The RISC-V architecture context buffer used by SetJump() and LongJump().
302 RISC-V invalidate instruction cache.
312 RISC-V invalidate data cache.
322 RISC-V flush cache block. Atomically perform a clean operation
400 @param Needs to enable local interrupt bit.
410 @param Needs to disable local interrupt bit.
446 @return The return value of csrrd instruction, return -1 means no CSR instruction
461 the register, return -1 means no CSR instruction is found.
477 the register, return -1 means no CSR instruction is found.
605 Returns the length of a Null-terminated Unicode string.
609 If String is not aligned on a 16-bit boundary, then ASSERT().
611 @param String A pointer to a Null-terminated Unicode string.
628 Returns the size of a Null-terminated Unicode string in bytes, including the
631 This function returns the size of the Null-terminated Unicode string
634 If String is not aligned on a 16-bit boundary, then ASSERT().
636 @param String A pointer to a Null-terminated Unicode string.
644 @return The size of the Null-terminated Unicode string in bytes, including
661 If Destination is not aligned on a 16-bit boundary, then ASSERT().
662 If Source is not aligned on a 16-bit boundary, then ASSERT().
666 @param Destination A pointer to a Null-terminated Unicode string.
669 @param Source A pointer to a Null-terminated Unicode string.
696 If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
697 If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
701 @param Destination A pointer to a Null-terminated Unicode string.
704 @param Source A pointer to a Null-terminated Unicode string.
733 If Destination is not aligned on a 16-bit boundary, then ASSERT().
734 If Source is not aligned on a 16-bit boundary, then ASSERT().
738 @param Destination A pointer to a Null-terminated Unicode string.
741 @param Source A pointer to a Null-terminated Unicode string.
746 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
772 If Destination is not aligned on a 16-bit boundary, then ASSERT().
773 If Source is not aligned on a 16-bit boundary, then ASSERT().
777 @param Destination A pointer to a Null-terminated Unicode string.
780 @param Source A pointer to a Null-terminated Unicode string.
786 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
806 Convert a Null-terminated Unicode decimal string to a value of type UINTN.
814 The valid decimal digit character is in the range [0-9]. The function will
818 valid decimal character or a Null-terminator, whichever one comes first.
820 If String is not aligned in a 16-bit boundary, then ASSERT().
832 @param String Pointer to a Null-terminated Unicode string.
843 Null-terminator.
857 Convert a Null-terminated Unicode decimal string to a value of type UINT64.
865 The valid decimal digit character is in the range [0-9]. The function will
869 valid decimal character or a Null-terminator, whichever one comes first.
871 If String is not aligned in a 16-bit boundary, then ASSERT().
883 @param String Pointer to a Null-terminated Unicode string.
894 Null-terminator.
908 Convert a Null-terminated Unicode hexadecimal string to a value of type
917 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
927 If String is not aligned in a 16-bit boundary, then ASSERT().
939 @param String Pointer to a Null-terminated Unicode string.
950 Null-terminator.
964 Convert a Null-terminated Unicode hexadecimal string to a value of type
973 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
983 If String is not aligned in a 16-bit boundary, then ASSERT().
995 @param String Pointer to a Null-terminated Unicode string.
1006 Null-terminator.
1020 Returns the length of a Null-terminated Ascii string.
1024 @param String A pointer to a Null-terminated Ascii string.
1041 Returns the size of a Null-terminated Ascii string in bytes, including the
1044 This function returns the size of the Null-terminated Ascii string specified
1047 @param String A pointer to a Null-terminated Ascii string.
1055 @return The size of the Null-terminated Ascii string in bytes, including the
1074 @param Destination A pointer to a Null-terminated Ascii string.
1077 @param Source A pointer to a Null-terminated Ascii string.
1106 @param Destination A pointer to a Null-terminated Ascii string.
1109 @param Source A pointer to a Null-terminated Ascii string.
1140 @param Destination A pointer to a Null-terminated Ascii string.
1143 @param Source A pointer to a Null-terminated Ascii string.
1148 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
1176 @param Destination A pointer to a Null-terminated Ascii string.
1179 @param Source A pointer to a Null-terminated Ascii string.
1185 @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
1205 Convert a Null-terminated Ascii decimal string to a value of type UINTN.
1213 The valid decimal digit character is in the range [0-9]. The function will
1217 valid decimal character or a Null-terminator, whichever one comes first.
1229 @param String Pointer to a Null-terminated Ascii string.
1240 Null-terminator.
1254 Convert a Null-terminated Ascii decimal string to a value of type UINT64.
1262 The valid decimal digit character is in the range [0-9]. The function will
1266 valid decimal character or a Null-terminator, whichever one comes first.
1278 @param String Pointer to a Null-terminated Ascii string.
1289 Null-terminator.
1303 Convert a Null-terminated Ascii hexadecimal string to a value of type UINTN.
1311 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1318 character that is a not a valid hexadecimal character or Null-terminator,
1331 @param String Pointer to a Null-terminated Ascii string.
1342 Null-terminator.
1356 Convert a Null-terminated Ascii hexadecimal string to a value of type UINT64.
1364 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1371 character that is a not a valid hexadecimal character or Null-terminator,
1384 @param String Pointer to a Null-terminated Ascii string.
1395 Null-terminator.
1409 Returns the length of a Null-terminated Unicode string.
1411 This function returns the number of Unicode characters in the Null-terminated
1415 If String is not aligned on a 16-bit boundary, then ASSERT().
1418 Null-terminator, then ASSERT().
1420 @param String Pointer to a Null-terminated Unicode string.
1432 Returns the size of a Null-terminated Unicode string in bytes, including the
1435 This function returns the size, in bytes, of the Null-terminated Unicode string
1439 If String is not aligned on a 16-bit boundary, then ASSERT().
1442 Null-terminator, then ASSERT().
1444 @param String The pointer to a Null-terminated Unicode string.
1456 Compares two Null-terminated Unicode strings, and returns the difference
1459 This function compares the Null-terminated Unicode string FirstString to the
1460 Null-terminated Unicode string SecondString. If FirstString is identical to
1466 If FirstString is not aligned on a 16-bit boundary, then ASSERT().
1468 If SecondString is not aligned on a 16-bit boundary, then ASSERT().
1471 Null-terminator, then ASSERT().
1474 Null-terminator, then ASSERT().
1476 @param FirstString The pointer to a Null-terminated Unicode string.
1477 @param SecondString The pointer to a Null-terminated Unicode string.
1491 Compares up to a specified length the contents of two Null-terminated Unicode strings,
1494 This function compares the Null-terminated Unicode string FirstString to the
1495 Null-terminated Unicode string SecondString. At most, Length Unicode
1502 If Length > 0 and FirstString is not aligned on a 16-bit boundary, then ASSERT().
1504 If Length > 0 and SecondString is not aligned on a 16-bit boundary, then ASSERT().
1508 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
1511 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
1514 @param FirstString The pointer to a Null-terminated Unicode string.
1515 @param SecondString The pointer to a Null-terminated Unicode string.
1531 Returns the first occurrence of a Null-terminated Unicode sub-string
1532 in a Null-terminated Unicode string.
1534 This function scans the contents of the Null-terminated Unicode string
1540 If String is not aligned on a 16-bit boundary, then ASSERT().
1542 If SearchString is not aligned on a 16-bit boundary, then ASSERT().
1546 characters, not including the Null-terminator, then ASSERT().
1548 @param String The pointer to a Null-terminated Unicode string.
1549 @param SearchString The pointer to a Null-terminated Unicode string to search for.
1563 Convert a Null-terminated Unicode decimal string to a value of
1572 The valid decimal digit character is in the range [0-9]. The
1577 or a Null-terminator, whichever one comes first.
1580 If String is not aligned in a 16-bit boundary, then ASSERT().
1589 the Null-terminator, then ASSERT().
1591 @param String The pointer to a Null-terminated Unicode string.
1603 Convert a Null-terminated Unicode decimal string to a value of
1612 The valid decimal digit character is in the range [0-9]. The
1617 or a Null-terminator, whichever one comes first.
1620 If String is not aligned in a 16-bit boundary, then ASSERT().
1629 the Null-terminator, then ASSERT().
1631 @param String The pointer to a Null-terminated Unicode string.
1643 Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
1651 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1661 If String is not aligned in a 16-bit boundary, then ASSERT().
1669 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
1672 @param String The pointer to a Null-terminated Unicode string.
1684 Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
1692 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
1702 If String is not aligned in a 16-bit boundary, then ASSERT().
1710 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
1713 @param String The pointer to a Null-terminated Unicode string.
1725 Convert a Null-terminated Unicode string to IPv6 address and prefix length.
1733 X contains one to four hexadecimal digit characters in the range [0-9], [a-f] and
1734 [A-F]. X is converted to a value of type UINT16, whose low byte is stored in low
1736 digit characters in the range [0-9]. The running zero in the beginning of P will
1748 If String is not aligned in a 16-bit boundary, then ASSERT().
1754 @param String Pointer to a Null-terminated Unicode string.
1784 Convert a Null-terminated Unicode string to IPv4 address and prefix length.
1792 D and P are decimal digit characters in the range [0-9]. The running zero in
1801 If String is not aligned in a 16-bit boundary, then ASSERT().
1807 @param String Pointer to a Null-terminated Unicode string.
1836 Convert a Null-terminated Unicode GUID string to a value of type
1843 aabbccdd-eeff-gghh-iijj-kkllmmnnoopp
1845 The pairs aa - pp are two characters in the range [0-9], [a-f] and
1846 [A-F], with each pair representing a single byte hexadecimal value.
1866 If String is not aligned in a 16-bit boundary, then ASSERT().
1868 @param String Pointer to a Null-terminated Unicode string.
1885 Convert a Null-terminated Unicode hexadecimal string to a byte array.
1893 X is a hexadecimal digit character in the range [0-9], [a-f] and [A-F].
1898 If String is not aligned in a 16-bit boundary, then ASSERT().
1900 @param String Pointer to a Null-terminated Unicode string.
1914 digit characters, or a Null-terminator.
1927 Convert a Null-terminated Unicode string to a Null-terminated
1935 Destination by appending a Null-terminator character at the end.
1940 If any Unicode characters in Source contain non-zero value in
1943 If Source is not aligned on a 16-bit boundary, then ASSERT().
1947 @param Source The pointer to a Null-terminated Unicode string.
1948 @param Destination The pointer to a Null-terminated ASCII string.
1975 Convert not more than Length successive characters from a Null-terminated
1976 Unicode string to a Null-terminated Ascii string. If no null char is copied
1982 Destination by appending a Null-terminator character at the end.
1987 If any Unicode characters in Source contain non-zero value in the upper 8
1989 If Source is not aligned on a 16-bit boundary, then ASSERT().
1993 @param Source The pointer to a Null-terminated Unicode string.
1996 @param Destination The pointer to a Null-terminated Ascii string.
2028 Returns the length of a Null-terminated ASCII string.
2030 This function returns the number of ASCII characters in the Null-terminated
2036 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2039 @param String The pointer to a Null-terminated ASCII string.
2051 Returns the size of a Null-terminated ASCII string in bytes, including the
2054 This function returns the size, in bytes, of the Null-terminated ASCII string
2059 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2062 @param String The pointer to a Null-terminated ASCII string.
2074 Compares two Null-terminated ASCII strings, and returns the difference
2077 This function compares the Null-terminated ASCII string FirstString to the
2078 Null-terminated ASCII string SecondString. If FirstString is identical to
2086 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2090 Null-terminator, then ASSERT().
2092 @param FirstString The pointer to a Null-terminated ASCII string.
2093 @param SecondString The pointer to a Null-terminated ASCII string.
2107 Performs a case insensitive comparison of two Null-terminated ASCII strings,
2110 This function performs a case insensitive comparison of the Null-terminated
2111 ASCII string FirstString to the Null-terminated ASCII string SecondString. If
2120 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2124 Null-terminator, then ASSERT().
2126 @param FirstString The pointer to a Null-terminated ASCII string.
2127 @param SecondString The pointer to a Null-terminated ASCII string.
2143 Compares two Null-terminated ASCII strings with maximum lengths, and returns
2146 This function compares the Null-terminated ASCII string FirstString to the
2147 Null-terminated ASCII string SecondString. At most, Length ASCII characters
2158 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2161 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
2164 @param FirstString The pointer to a Null-terminated ASCII string.
2165 @param SecondString The pointer to a Null-terminated ASCII string.
2181 Returns the first occurrence of a Null-terminated ASCII sub-string
2182 in a Null-terminated ASCII string.
2194 not including the Null-terminator, then ASSERT().
2196 @param String The pointer to a Null-terminated ASCII string.
2197 @param SearchString The pointer to a Null-terminated ASCII string to search for.
2212 Convert a Null-terminated ASCII decimal string to a value of type
2221 The valid decimal digit character is in the range [0-9]. The function will
2225 Null-terminator, whichever on comes first.
2233 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2236 @param String The pointer to a Null-terminated ASCII string.
2248 Convert a Null-terminated ASCII decimal string to a value of type
2257 The valid decimal digit character is in the range [0-9]. The function will
2261 Null-terminator, whichever on comes first.
2269 PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
2272 @param String The pointer to a Null-terminated ASCII string.
2284 Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
2292 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
2299 hexadecimal character or Null-terminator, whichever on comes first.
2310 the Null-terminator, then ASSERT().
2312 @param String The pointer to a Null-terminated ASCII string.
2324 Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
2332 The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
2339 hexadecimal character or Null-terminator, whichever on comes first.
2350 the Null-terminator, then ASSERT().
2352 @param String The pointer to a Null-terminated ASCII string.
2364 Convert a Null-terminated ASCII string to IPv6 address and prefix length.
2372 X contains one to four hexadecimal digit characters in the range [0-9], [a-f] and
2373 [A-F]. X is converted to a value of type UINT16, whose low byte is stored in low
2375 digit characters in the range [0-9]. The running zero in the beginning of P will
2391 @param String Pointer to a Null-terminated ASCII string.
2421 Convert a Null-terminated ASCII string to IPv4 address and prefix length.
2429 D and P are decimal digit characters in the range [0-9]. The running zero in
2442 @param String Pointer to a Null-terminated ASCII string.
2469 Convert a Null-terminated ASCII GUID string to a value of type
2476 aabbccdd-eeff-gghh-iijj-kkllmmnnoopp
2478 The pairs aa - pp are two characters in the range [0-9], [a-f] and
2479 [A-F], with each pair representing a single byte hexadecimal value.
2499 @param String Pointer to a Null-terminated ASCII string.
2516 Convert a Null-terminated ASCII hexadecimal string to a byte array.
2524 X is a hexadecimal digit character in the range [0-9], [a-f] and [A-F].
2529 @param String Pointer to a Null-terminated ASCII string.
2543 digit characters, or a Null-terminator.
2556 Convert one Null-terminated ASCII string to a Null-terminated
2563 appending a Null-terminator character at the end.
2568 If Destination is not aligned on a 16-bit boundary, then ASSERT().
2572 @param Source The pointer to a Null-terminated ASCII string.
2573 @param Destination The pointer to a Null-terminated Unicode string.
2600 Convert not more than Length successive characters from a Null-terminated
2601 Ascii string to a Null-terminated Unicode string. If no null char is copied
2606 terminates the Unicode string Destination by appending a Null-terminator
2613 If Destination is not aligned on a 16-bit boundary, then ASSERT().
2618 @param Source The pointer to a Null-terminated Ascii string.
2620 @param Destination The pointer to a Null-terminated Unicode string.
2653 it maps to a valid small-case ASCII character.
2656 which maps to a valid small-case ASCII character, i.e.
2694 …Produce a Null-terminated Ascii string in the output buffer specified by Destination and Destinati…
2705 …D_PARAMETER If SourceLength or DestinationSize is bigger than (MAX_ADDRESS - (UINTN)Destination).
2720 Decode Base64 ASCII encoded data to 8-bit binary representation, based on
2723 Decoding occurs according to "Table 1: The Base 64 Alphabet" in RFC4648.
2726 - 0x09 ('\t') horizontal tab
2727 - 0x0A ('\n') new line
2728 - 0x0B ('\v') vertical tab
2729 - 0x0C ('\f') form feed
2730 - 0x0D ('\r') carriage return
2731 - 0x20 (' ') space
2746 8-bit binary representation. Allocated by the
2749 performed, but the 8-bit binary
2750 representation is not stored. If non-NULL and
2766 been decoded to on-output DestinationSize
2786 @retval RETURN_INVALID_PARAMETER Source is non-NULL, and (Source +
2789 @retval RETURN_INVALID_PARAMETER Destination is non-NULL, and (Destination +
2811 Converts an 8-bit value to an 8-bit BCD value.
2813 Converts the 8-bit value specified by Value to BCD. The BCD value is
2818 @param Value The 8-bit value to convert to BCD. Range 0..99.
2830 Converts an 8-bit BCD value to an 8-bit value.
2832 Converts the 8-bit BCD value specified by Value to an 8-bit value. The 8-bit
2838 @param Value The 8-bit BCD value to convert to an 8-bit value.
2840 @return The 8-bit value is returned.
2869 - Single periods in the path are removed.
2870 - Double periods in the path are removed along with a single parent directory.
2871 - Forward slashes L'/' are converted to backward slashes L'\'.
2914 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
2930 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\
2931 Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)
2934 Checks whether FirstEntry and SecondEntry are part of the same doubly-linked
2938 If FirstEntry->ForwardLink is NULL, then ASSERT().
2939 If FirstEntry->BackLink is NULL, then ASSERT().
2947 @retval TRUE SecondEntry is in the same doubly-linked list as FirstEntry.
2948 @retval FALSE SecondEntry isn't in the same doubly-linked list as FirstEntry,
3168 @retval TRUE Node is the head of the doubly-linked list pointed by List.
3169 @retval FALSE Node is not the head of the doubly-linked list pointed by List.
3292 except that is uses the pre-allocated buffer so the in place sorting does not need to
3324 Shifts a 64-bit integer left between 0 and 63 bits. The low bits are filled
3327 This function shifts the 64-bit value Operand to the left by Count bits. The
3332 @param Operand The 64-bit operand to shift left.
3346 Shifts a 64-bit integer right between 0 and 63 bits. This high bits are
3349 This function shifts the 64-bit value Operand to the right by Count bits. The
3354 @param Operand The 64-bit operand to shift right.
3368 Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled
3369 with original integer's bit 63. The shifted value is returned.
3371 This function shifts the 64-bit value Operand to the right by Count bits. The
3372 high Count bits are set to bit 63 of Operand. The shifted value is returned.
3376 @param Operand The 64-bit operand to shift right.
3390 Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits
3393 This function rotates the 32-bit value Operand to the left by Count bits. The
3399 @param Operand The 32-bit operand to rotate left.
3413 Rotates a 32-bit integer right between 0 and 31 bits, filling the high bits
3416 This function rotates the 32-bit value Operand to the right by Count bits.
3422 @param Operand The 32-bit operand to rotate right.
3436 Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits
3439 This function rotates the 64-bit value Operand to the left by Count bits. The
3445 @param Operand The 64-bit operand to rotate left.
3459 Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits
3462 This function rotates the 64-bit value Operand to the right by Count bits.
3468 @param Operand The 64-bit operand to rotate right.
3482 Returns the bit position of the lowest bit set in a 32-bit value.
3484 This function computes the bit position of the lowest bit set in the 32-bit
3485 value specified by Operand. If Operand is zero, then -1 is returned.
3488 @param Operand The 32-bit operand to evaluate.
3490 @retval 0..31 The lowest bit set in Operand was found.
3491 @retval -1 Operand is zero.
3501 Returns the bit position of the lowest bit set in a 64-bit value.
3503 This function computes the bit position of the lowest bit set in the 64-bit
3504 value specified by Operand. If Operand is zero, then -1 is returned.
3507 @param Operand The 64-bit operand to evaluate.
3509 @retval 0..63 The lowest bit set in Operand was found.
3510 @retval -1 Operand is zero.
3521 Returns the bit position of the highest bit set in a 32-bit value. Equivalent
3524 This function computes the bit position of the highest bit set in the 32-bit
3525 value specified by Operand. If Operand is zero, then -1 is returned.
3528 @param Operand The 32-bit operand to evaluate.
3530 @retval 0..31 Position of the highest bit set in Operand if found.
3531 @retval -1 Operand is zero.
3541 Returns the bit position of the highest bit set in a 64-bit value. Equivalent
3544 This function computes the bit position of the highest bit set in the 64-bit
3545 value specified by Operand. If Operand is zero, then -1 is returned.
3548 @param Operand The 64-bit operand to evaluate.
3550 @retval 0..63 Position of the highest bit set in Operand if found.
3551 @retval -1 Operand is zero.
3561 Returns the value of the highest bit set in a 32-bit value. Equivalent to
3564 This function computes the value of the highest bit set in the 32-bit value
3567 @param Operand The 32-bit operand to evaluate.
3580 Returns the value of the highest bit set in a 64-bit value. Equivalent to
3583 This function computes the value of the highest bit set in the 64-bit value
3586 @param Operand The 64-bit operand to evaluate.
3599 Switches the endianness of a 16-bit integer.
3601 This function swaps the bytes in a 16-bit unsigned value to switch the value
3605 @param Value A 16-bit unsigned value.
3617 Switches the endianness of a 32-bit integer.
3619 This function swaps the bytes in a 32-bit unsigned value to switch the value
3623 @param Value A 32-bit unsigned value.
3635 Switches the endianness of a 64-bit integer.
3637 This function swaps the bytes in a 64-bit unsigned value to switch the value
3641 @param Value A 64-bit unsigned value.
3653 Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and
3654 generates a 64-bit unsigned result.
3656 This function multiples the 64-bit unsigned value Multiplicand by the 32-bit
3657 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
3658 bit unsigned result is returned.
3660 @param Multiplicand A 64-bit unsigned value.
3661 @param Multiplier A 32-bit unsigned value.
3674 Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and
3675 generates a 64-bit unsigned result.
3677 This function multiples the 64-bit unsigned value Multiplicand by the 64-bit
3678 unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
3679 bit unsigned result is returned.
3681 @param Multiplicand A 64-bit unsigned value.
3682 @param Multiplier A 64-bit unsigned value.
3695 Multiples a 64-bit signed integer by a 64-bit signed integer and generates a
3696 64-bit signed result.
3698 This function multiples the 64-bit signed value Multiplicand by the 64-bit
3699 signed value Multiplier and generates a 64-bit signed result. This 64-bit
3702 @param Multiplicand A 64-bit signed value.
3703 @param Multiplier A 64-bit signed value.
3716 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3717 a 64-bit unsigned result.
3719 This function divides the 64-bit unsigned value Dividend by the 32-bit
3720 unsigned value Divisor and generates a 64-bit unsigned quotient. This
3721 function returns the 64-bit unsigned quotient.
3725 @param Dividend A 64-bit unsigned value.
3726 @param Divisor A 32-bit unsigned value.
3739 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3740 a 32-bit unsigned remainder.
3742 This function divides the 64-bit unsigned value Dividend by the 32-bit
3743 unsigned value Divisor and generates a 32-bit remainder. This function
3744 returns the 32-bit unsigned remainder.
3748 @param Dividend A 64-bit unsigned value.
3749 @param Divisor A 32-bit unsigned value.
3762 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
3763 a 64-bit unsigned result and an optional 32-bit unsigned remainder.
3765 This function divides the 64-bit unsigned value Dividend by the 32-bit
3766 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
3767 is not NULL, then the 32-bit unsigned remainder is returned in Remainder.
3768 This function returns the 64-bit unsigned quotient.
3772 @param Dividend A 64-bit unsigned value.
3773 @param Divisor A 32-bit unsigned value.
3774 @param Remainder A pointer to a 32-bit unsigned value. This parameter is
3789 Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates
3790 a 64-bit unsigned result and an optional 64-bit unsigned remainder.
3792 This function divides the 64-bit unsigned value Dividend by the 64-bit
3793 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
3794 is not NULL, then the 64-bit unsigned remainder is returned in Remainder.
3795 This function returns the 64-bit unsigned quotient.
3799 @param Dividend A 64-bit unsigned value.
3800 @param Divisor A 64-bit unsigned value.
3801 @param Remainder A pointer to a 64-bit unsigned value. This parameter is
3816 Divides a 64-bit signed integer by a 64-bit signed integer and generates a
3817 64-bit signed result and a optional 64-bit signed remainder.
3819 This function divides the 64-bit signed value Dividend by the 64-bit signed
3820 value Divisor and generates a 64-bit signed quotient. If Remainder is not
3821 NULL, then the 64-bit signed remainder is returned in Remainder. This
3822 function returns the 64-bit signed quotient.
3830 @param Dividend A 64-bit signed value.
3831 @param Divisor A 64-bit signed value.
3832 @param Remainder A pointer to a 64-bit signed value. This parameter is
3847 Reads a 16-bit value from memory that may be unaligned.
3849 This function returns the 16-bit value pointed to by Buffer. The function
3854 @param Buffer The pointer to a 16-bit value that may be unaligned.
3856 @return The 16-bit value read from Buffer.
3866 Writes a 16-bit value to memory that may be unaligned.
3868 This function writes the 16-bit value specified by Value to Buffer. Value is
3874 @param Buffer The pointer to a 16-bit value that may be unaligned.
3875 @param Value 16-bit value to write to Buffer.
3877 @return The 16-bit value to write to Buffer.
3888 Reads a 24-bit value from memory that may be unaligned.
3890 This function returns the 24-bit value pointed to by Buffer. The function
3895 @param Buffer The pointer to a 24-bit value that may be unaligned.
3897 @return The 24-bit value read from Buffer.
3907 Writes a 24-bit value to memory that may be unaligned.
3909 This function writes the 24-bit value specified by Value to Buffer. Value is
3915 @param Buffer The pointer to a 24-bit value that may be unaligned.
3916 @param Value 24-bit value to write to Buffer.
3918 @return The 24-bit value to write to Buffer.
3929 Reads a 32-bit value from memory that may be unaligned.
3931 This function returns the 32-bit value pointed to by Buffer. The function
3936 @param Buffer The pointer to a 32-bit value that may be unaligned.
3938 @return The 32-bit value read from Buffer.
3948 Writes a 32-bit value to memory that may be unaligned.
3950 This function writes the 32-bit value specified by Value to Buffer. Value is
3956 @param Buffer The pointer to a 32-bit value that may be unaligned.
3957 @param Value 32-bit value to write to Buffer.
3959 @return The 32-bit value to write to Buffer.
3970 Reads a 64-bit value from memory that may be unaligned.
3972 This function returns the 64-bit value pointed to by Buffer. The function
3977 @param Buffer The pointer to a 64-bit value that may be unaligned.
3979 @return The 64-bit value read from Buffer.
3989 Writes a 64-bit value to memory that may be unaligned.
3991 This function writes the 64-bit value specified by Value to Buffer. Value is
3997 @param Buffer The pointer to a 64-bit value that may be unaligned.
3998 @param Value 64-bit value to write to Buffer.
4000 @return The 64-bit value to write to Buffer.
4011 // Bit Field Functions
4015 Returns a bit field from an 8-bit value.
4019 If 8-bit operations are not supported, then ASSERT().
4025 @param StartBit The ordinal of the least significant bit in the bit field.
4027 @param EndBit The ordinal of the most significant bit in the bit field.
4030 @return The bit field read.
4042 Writes a bit field to an 8-bit value, and returns the result.
4044 Writes Value to the bit field specified by the StartBit and the EndBit in
4045 Operand. All other bits in Operand are preserved. The new 8-bit value is
4048 If 8-bit operations are not supported, then ASSERT().
4055 @param StartBit The ordinal of the least significant bit in the bit field.
4057 @param EndBit The ordinal of the most significant bit in the bit field.
4059 @param Value New value of the bit field.
4061 @return The new 8-bit value.
4074 Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the
4077 Performs a bitwise OR between the bit field specified by StartBit
4079 Operand are preserved. The new 8-bit value is returned.
4081 If 8-bit operations are not supported, then ASSERT().
4088 @param StartBit The ordinal of the least significant bit in the bit field.
4090 @param EndBit The ordinal of the most significant bit in the bit field.
4094 @return The new 8-bit value.
4107 Reads a bit field from an 8-bit value, performs a bitwise AND, and returns
4110 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4112 preserved. The new 8-bit value is returned.
4114 If 8-bit operations are not supported, then ASSERT().
4121 @param StartBit The ordinal of the least significant bit in the bit field.
4123 @param EndBit The ordinal of the most significant bit in the bit field.
4127 @return The new 8-bit value.
4140 Reads a bit field from an 8-bit value, performs a bitwise AND followed by a
4143 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4146 preserved. The new 8-bit value is returned.
4148 If 8-bit operations are not supported, then ASSERT().
4156 @param StartBit The ordinal of the least significant bit in the bit field.
4158 @param EndBit The ordinal of the most significant bit in the bit field.
4163 @return The new 8-bit value.
4177 Returns a bit field from a 16-bit value.
4181 If 16-bit operations are not supported, then ASSERT().
4187 @param StartBit The ordinal of the least significant bit in the bit field.
4189 @param EndBit The ordinal of the most significant bit in the bit field.
4192 @return The bit field read.
4204 Writes a bit field to a 16-bit value, and returns the result.
4206 Writes Value to the bit field specified by the StartBit and the EndBit in
4207 Operand. All other bits in Operand are preserved. The new 16-bit value is
4210 If 16-bit operations are not supported, then ASSERT().
4217 @param StartBit The ordinal of the least significant bit in the bit field.
4219 @param EndBit The ordinal of the most significant bit in the bit field.
4221 @param Value New value of the bit field.
4223 @return The new 16-bit value.
4236 Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the
4239 Performs a bitwise OR between the bit field specified by StartBit
4241 Operand are preserved. The new 16-bit value is returned.
4243 If 16-bit operations are not supported, then ASSERT().
4250 @param StartBit The ordinal of the least significant bit in the bit field.
4252 @param EndBit The ordinal of the most significant bit in the bit field.
4256 @return The new 16-bit value.
4269 Reads a bit field from a 16-bit value, performs a bitwise AND, and returns
4272 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4274 preserved. The new 16-bit value is returned.
4276 If 16-bit operations are not supported, then ASSERT().
4283 @param StartBit The ordinal of the least significant bit in the bit field.
4285 @param EndBit The ordinal of the most significant bit in the bit field.
4289 @return The new 16-bit value.
4302 Reads a bit field from a 16-bit value, performs a bitwise AND followed by a
4305 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4308 preserved. The new 16-bit value is returned.
4310 If 16-bit operations are not supported, then ASSERT().
4318 @param StartBit The ordinal of the least significant bit in the bit field.
4320 @param EndBit The ordinal of the most significant bit in the bit field.
4325 @return The new 16-bit value.
4339 Returns a bit field from a 32-bit value.
4343 If 32-bit operations are not supported, then ASSERT().
4349 @param StartBit The ordinal of the least significant bit in the bit field.
4351 @param EndBit The ordinal of the most significant bit in the bit field.
4354 @return The bit field read.
4366 Writes a bit field to a 32-bit value, and returns the result.
4368 Writes Value to the bit field specified by the StartBit and the EndBit in
4369 Operand. All other bits in Operand are preserved. The new 32-bit value is
4372 If 32-bit operations are not supported, then ASSERT().
4379 @param StartBit The ordinal of the least significant bit in the bit field.
4381 @param EndBit The ordinal of the most significant bit in the bit field.
4383 @param Value New value of the bit field.
4385 @return The new 32-bit value.
4398 Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the
4401 Performs a bitwise OR between the bit field specified by StartBit
4403 Operand are preserved. The new 32-bit value is returned.
4405 If 32-bit operations are not supported, then ASSERT().
4412 @param StartBit The ordinal of the least significant bit in the bit field.
4414 @param EndBit The ordinal of the most significant bit in the bit field.
4418 @return The new 32-bit value.
4431 Reads a bit field from a 32-bit value, performs a bitwise AND, and returns
4434 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4436 preserved. The new 32-bit value is returned.
4438 If 32-bit operations are not supported, then ASSERT().
4445 @param StartBit The ordinal of the least significant bit in the bit field.
4447 @param EndBit The ordinal of the most significant bit in the bit field.
4451 @return The new 32-bit value.
4464 Reads a bit field from a 32-bit value, performs a bitwise AND followed by a
4467 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4470 preserved. The new 32-bit value is returned.
4472 If 32-bit operations are not supported, then ASSERT().
4480 @param StartBit The ordinal of the least significant bit in the bit field.
4482 @param EndBit The ordinal of the most significant bit in the bit field.
4487 @return The new 32-bit value.
4501 Returns a bit field from a 64-bit value.
4505 If 64-bit operations are not supported, then ASSERT().
4511 @param StartBit The ordinal of the least significant bit in the bit field.
4513 @param EndBit The ordinal of the most significant bit in the bit field.
4516 @return The bit field read.
4528 Writes a bit field to a 64-bit value, and returns the result.
4530 Writes Value to the bit field specified by the StartBit and the EndBit in
4531 Operand. All other bits in Operand are preserved. The new 64-bit value is
4534 If 64-bit operations are not supported, then ASSERT().
4541 @param StartBit The ordinal of the least significant bit in the bit field.
4543 @param EndBit The ordinal of the most significant bit in the bit field.
4545 @param Value New value of the bit field.
4547 @return The new 64-bit value.
4560 Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the
4563 Performs a bitwise OR between the bit field specified by StartBit
4565 Operand are preserved. The new 64-bit value is returned.
4567 If 64-bit operations are not supported, then ASSERT().
4574 @param StartBit The ordinal of the least significant bit in the bit field.
4576 @param EndBit The ordinal of the most significant bit in the bit field.
4580 @return The new 64-bit value.
4593 Reads a bit field from a 64-bit value, performs a bitwise AND, and returns
4596 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4598 preserved. The new 64-bit value is returned.
4600 If 64-bit operations are not supported, then ASSERT().
4607 @param StartBit The ordinal of the least significant bit in the bit field.
4609 @param EndBit The ordinal of the most significant bit in the bit field.
4613 @return The new 64-bit value.
4626 Reads a bit field from a 64-bit value, performs a bitwise AND followed by a
4629 Performs a bitwise AND between the bit field specified by StartBit and EndBit
4632 preserved. The new 64-bit value is returned.
4634 If 64-bit operations are not supported, then ASSERT().
4642 @param StartBit The ordinal of the least significant bit in the bit field.
4644 @param EndBit The ordinal of the most significant bit in the bit field.
4649 @return The new 64-bit value.
4663 Reads a bit field from a 32-bit value, counts and returns
4666 Counts the number of set bits in the bit field specified by
4674 @param StartBit The ordinal of the least significant bit in the bit field.
4676 @param EndBit The ordinal of the most significant bit in the bit field.
4691 Reads a bit field from a 64-bit value, counts and returns
4694 Counts the number of set bits in the bit field specified by
4702 @param StartBit The ordinal of the least significant bit in the bit field.
4704 @param EndBit The ordinal of the most significant bit in the bit field.
4732 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4749 of 8-bit values.
4751 This function first calculates the sum of the 8-bit values in the
4757 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4773 Returns the sum of all elements in a buffer of 16-bit values. During
4776 This function calculates the sum of the 16-bit values in the buffer
4778 The 16-bit result is returned. If Length is 0, then 0 is returned.
4781 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
4782 If Length is not aligned on a 16-bit boundary, then ASSERT().
4783 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
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().
4826 Returns the sum of all elements in a buffer of 32-bit values. During
4829 This function calculates the sum of the 32-bit values in the buffer
4831 The 32-bit result is returned. If Length is 0, then 0 is returned.
4834 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
4835 If Length is not aligned on a 32-bit boundary, then ASSERT().
4836 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4853 32-bit values.
4855 This function first calculates the sum of the 32-bit values in the buffer
4861 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
4862 If Length is not aligned on a 32-bit boundary, then ASSERT().
4863 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4879 Returns the sum of all elements in a buffer of 64-bit values. During
4882 This function calculates the sum of the 64-bit values in the buffer
4884 The 64-bit result is returned. If Length is 0, then 0 is returned.
4887 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
4888 If Length is not aligned on a 64-bit boundary, then ASSERT().
4889 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4906 64-bit values.
4908 This function first calculates the sum of the 64-bit values in the buffer
4914 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
4915 If Length is not aligned on a 64-bit boundary, then ASSERT().
4916 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4932 Computes and returns a 32-bit CRC for a data buffer.
4933 CRC32 value bases on ITU-T V.42.
4936 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4938 @param[in] Buffer A pointer to the buffer on which the 32-bit CRC is to be computed.
4941 @retval Crc32 The 32-bit CRC was computed for the data buffer.
4952 Calculates the CRC16-ANSI checksum of the given buffer.
4958 @return The CRC16-ANSI checksum.
4969 // Initial value for the CRC16-ANSI algorithm, when no prior checksum has been calculated.
4991 Calculates the CRC16-CCITT-FALSE checksum of the given buffer.
4997 @return The CRC16-CCITT-FALSE checksum.
5043 calls to LongJump() cause a non-zero value to be returned by SetJump().
5046 For Itanium processors, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
5050 …For example, a BASE_LIBRARY_JUMP_BUFFER allocated by an IA-32 module must never be used from an x6…
5073 For Itanium processors, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
5078 restored and must be non-zero.
5190 These additional arguments are ignored on IA-32, x64, and EBC architectures.
5204 @param ... This variable argument list is ignored for IA-32, x64, and
5264 used to call guest-side Intel TDX functions, either local or a TD exit
5290 @param[in] Leaf Number of sub-functions
5295 @param[in,out] Results Returned result of the sub-function
5298 @return Other See individual sub-functions
5384 Adjusts the permissions of an SEV-SNP guest page.
5413 /// Byte packed structure for 16-bit Real Mode EFLAGS.
5438 /// 32-bits on IA-32.
5439 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5471 /// 32-bits on IA-32.
5472 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5487 UINT32 NW : 1; ///< Mot Write-through.
5496 /// 32-bits on IA-32.
5497 /// 64-bits on x64. The upper 32-bits on x64 are reserved.
5501 UINT32 VME : 1; ///< Virtual-8086 Mode Extensions.
5502 UINT32 PVI : 1; ///< Protected-Mode Virtual Interrupts.
5516 UINT32 UMIP : 1; ///< User-Mode Instruction Prevention.
5517 UINT32 LA57 : 1; ///< Linear Address 57bit.
5527 UINT32 PKE : 1; ///< Protection-Key Enable.
5576 /// Byte packed structure for an IA-32 Interrupt Gate Descriptor.
5591 // IA32 Task-State Segment Definition
5677 // IA32 Task-State Segment Definition
5725 /// Structures for the 16-bit real mode thunks.
5791 /// Byte packed structure for an 16-bit real mode thunks.
5809 /// pointer-to-function type), such labels in NASM source code never stand for
5813 /// edk2 coding style for function (or pointer-to-function) typedefs. The VOID
5829 This function is only available on IA-32 and x64.
5831 @param Index The 32-bit value to load into EAX prior to invoking the CPUID
5833 @param Eax The pointer to the 32-bit EAX value returned by the CPUID
5835 @param Ebx The pointer to the 32-bit EBX value returned by the CPUID
5837 @param Ecx The pointer to the 32-bit ECX value returned by the CPUID
5839 @param Edx The pointer to the 32-bit EDX value returned by the CPUID
5860 Index. This function is only available on IA-32 and x64.
5867 @param Index The 32-bit value to load into EAX prior to invoking the
5869 @param SubIndex The 32-bit value to load into ECX prior to invoking the
5871 @param Eax The pointer to the 32-bit EAX value returned by the CPUID
5874 @param Ebx The pointer to the 32-bit EBX value returned by the CPUID
5877 @param Ecx The pointer to the 32-bit ECX value returned by the CPUID
5880 @param Edx The pointer to the 32-bit EDX value returned by the CPUID
5899 Set CD bit and clear NW bit of CR0 followed by a WBINVD.
5901 Disables the caches by setting the CD bit of CR0 to 1, clearing the NW bit of CR0 to 0,
5902 and executing a WBINVD instruction. This function is only available on IA-32 and x64.
5915 bits of CR0 to 0. This function is only available on IA-32 and x64.
5925 Returns the lower 32-bits of a Machine Specific Register(MSR).
5927 Reads and returns the lower 32-bits of the MSR specified by Index.
5931 is only available on IA-32 and x64.
5933 @param Index The 32-bit MSR index to read.
5945 Writes a 32-bit value to a Machine Specific Register(MSR), and returns the value.
5946 The upper 32-bits of the MSR are set to zero.
5948 Writes the 32-bit value specified by Value to the MSR specified by Index. The
5949 upper 32-bits of the MSR write are set to zero. The 32-bit value written to
5953 handlers. This function is only available on IA-32 and x64.
5955 @param Index The 32-bit MSR index to write.
5956 @param Value The 32-bit value to write to the MSR.
5969 Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and
5970 writes the result back to the 64-bit MSR.
5972 Reads the 64-bit MSR specified by Index, performs a bitwise OR
5973 between the lower 32-bits of the read result and the value specified by
5974 OrData, and writes the result to the 64-bit MSR specified by Index. The lower
5975 32-bits of the value written to the MSR is returned. No parameter checking is
5979 IA-32 and x64.
5981 @param Index The 32-bit MSR index to write.
5984 @return The lower 32-bit value written to the MSR.
5995 Reads a 64-bit MSR, performs a bitwise AND on the lower 32-bits, and writes
5996 the result back to the 64-bit MSR.
5998 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
5999 lower 32-bits of the read result and the value specified by AndData, and
6000 writes the result to the 64-bit MSR specified by Index. The lower 32-bits of
6004 establish proper exception handlers. This function is only available on IA-32
6007 @param Index The 32-bit MSR index to write.
6010 @return The lower 32-bit value written to the MSR.
6021 Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR
6022 on the lower 32-bits, and writes the result back to the 64-bit MSR.
6024 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6025 lower 32-bits of the read result and the value specified by AndData
6026 preserving the upper 32-bits, performs a bitwise OR between the
6028 result to the 64-bit MSR specified by Address. The lower 32-bits of the value
6033 available on IA-32 and x64.
6035 @param Index The 32-bit MSR index to write.
6039 @return The lower 32-bit value written to the MSR.
6051 Reads a bit field of an MSR.
6053 Reads the bit field in the lower 32-bits of a 64-bit MSR. The bit field is
6054 specified by the StartBit and the EndBit. The value of the bit field is
6057 available on IA-32 and x64.
6063 @param Index The 32-bit MSR index to read.
6064 @param StartBit The ordinal of the least significant bit in the bit field.
6066 @param EndBit The ordinal of the most significant bit in the bit field.
6069 @return The bit field read from the MSR.
6081 Writes a bit field to an MSR.
6083 Writes Value to a bit field in the lower 32-bits of a 64-bit MSR. The bit
6085 destination MSR are preserved. The lower 32-bits of the MSR written is
6088 This function is only available on IA-32 and x64.
6095 @param Index The 32-bit MSR index to write.
6096 @param StartBit The ordinal of the least significant bit in the bit field.
6098 @param EndBit The ordinal of the most significant bit in the bit field.
6100 @param Value New value of the bit field.
6102 @return The lower 32-bit of the value written to the MSR.
6115 Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the
6116 result back to the bit field in the 64-bit MSR.
6118 Reads the 64-bit MSR specified by Index, performs a bitwise OR
6120 result to the 64-bit MSR specified by Index. The lower 32-bits of the value
6124 function is only available on IA-32 and x64.
6131 @param Index The 32-bit MSR index to write.
6132 @param StartBit The ordinal of the least significant bit in the bit field.
6134 @param EndBit The ordinal of the most significant bit in the bit field.
6138 @return The lower 32-bit of the value written to the MSR.
6151 Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
6152 result back to the bit field in the 64-bit MSR.
6154 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6156 64-bit MSR specified by Index. The lower 32-bits of the value written to the
6160 available on IA-32 and x64.
6167 @param Index The 32-bit MSR index to write.
6168 @param StartBit The ordinal of the least significant bit in the bit field.
6170 @param EndBit The ordinal of the most significant bit in the bit field.
6174 @return The lower 32-bit of the value written to the MSR.
6187 Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
6188 bitwise OR, and writes the result back to the bit field in the
6189 64-bit MSR.
6191 Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by a
6193 AndData, and writes the result to the 64-bit MSR specified by Index. The
6194 lower 32-bits of the value written to the MSR are returned. Extra left bits
6197 handlers to catch the exceptions. This function is only available on IA-32
6206 @param Index The 32-bit MSR index to write.
6207 @param StartBit The ordinal of the least significant bit in the bit field.
6209 @param EndBit The ordinal of the most significant bit in the bit field.
6214 @return The lower 32-bit of the value written to the MSR.
6228 Returns a 64-bit Machine Specific Register(MSR).
6230 Reads and returns the 64-bit MSR specified by Index. No parameter checking is
6234 on IA-32 and x64.
6236 @param Index The 32-bit MSR index to read.
6248 Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
6251 Writes the 64-bit value specified by Value to the MSR specified by Index. The
6252 64-bit value written to the MSR is returned. No parameter checking is
6256 IA-32 and x64.
6258 @param Index The 32-bit MSR index to write.
6259 @param Value The 64-bit value to write to the MSR.
6272 Reads a 64-bit MSR, performs a bitwise OR, and writes the result
6273 back to the 64-bit MSR.
6275 Reads the 64-bit MSR specified by Index, performs a bitwise OR
6277 result to the 64-bit MSR specified by Index. The value written to the MSR is
6281 This function is only available on IA-32 and x64.
6283 @param Index The 32-bit MSR index to write.
6297 Reads a 64-bit MSR, performs a bitwise AND, and writes the result back to the
6298 64-bit MSR.
6300 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6302 64-bit MSR specified by Index. The value written to the MSR is returned. No
6306 function is only available on IA-32 and x64.
6308 @param Index The 32-bit MSR index to write.
6322 Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
6323 OR, and writes the result back to the 64-bit MSR.
6325 Reads the 64-bit MSR specified by Index, performs a bitwise AND between read
6328 and writes the result to the 64-bit MSR specified by Index. The value written
6332 establish proper exception handlers. This function is only available on IA-32
6335 @param Index The 32-bit MSR index to write.
6351 Reads a bit field of an MSR.
6353 Reads the bit field in the 64-bit MSR. The bit field is specified by the
6354 StartBit and the EndBit. The value of the bit field is returned. The caller
6357 on IA-32 and x64.
6363 @param Index The 32-bit MSR index to read.
6364 @param StartBit The ordinal of the least significant bit in the bit field.
6366 @param EndBit The ordinal of the most significant bit in the bit field.
6381 Writes a bit field to an MSR.
6383 Writes Value to a bit field in a 64-bit MSR. The bit field is specified by
6387 handlers to catch the exceptions. This function is only available on IA-32 and x64.
6394 @param Index The 32-bit MSR index to write.
6395 @param StartBit The ordinal of the least significant bit in the bit field.
6397 @param EndBit The ordinal of the most significant bit in the bit field.
6399 @param Value New value of the bit field.
6414 Reads a bit field in a 64-bit MSR, performs a bitwise OR, and
6415 writes the result back to the bit field in the 64-bit MSR.
6417 Reads the 64-bit MSR specified by Index, performs a bitwise OR
6419 result to the 64-bit MSR specified by Index. The value written to the MSR is
6423 on IA-32 and x64.
6430 @param Index The 32-bit MSR index to write.
6431 @param StartBit The ordinal of the least significant bit in the bit field.
6433 @param EndBit The ordinal of the most significant bit in the bit field.
6435 @param OrData The value to OR with the read value from the bit field.
6450 Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
6451 result back to the bit field in the 64-bit MSR.
6453 Reads the 64-bit MSR specified by Index, performs a bitwise AND between the
6455 64-bit MSR specified by Index. The value written to the MSR is returned.
6458 handlers to catch the exceptions. This function is only available on IA-32
6466 @param Index The 32-bit MSR index to write.
6467 @param StartBit The ordinal of the least significant bit in the bit field.
6469 @param EndBit The ordinal of the most significant bit in the bit field.
6471 @param AndData The value to AND with the read value from the bit field.
6486 Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
6487 bitwise OR, and writes the result back to the bit field in the
6488 64-bit MSR.
6490 Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by
6492 AndData, and writes the result to the 64-bit MSR specified by Index. The
6496 exceptions. This function is only available on IA-32 and x64.
6504 @param Index The 32-bit MSR index to write.
6505 @param StartBit The ordinal of the least significant bit in the bit field.
6507 @param EndBit The ordinal of the most significant bit in the bit field.
6509 @param AndData The value to AND with the read value from the bit field.
6529 only available on IA-32 and x64. This returns a 32-bit value on IA-32 and a
6530 64-bit value on x64.
6532 @return EFLAGS on IA-32 or RFLAGS on x64.
6545 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6561 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6577 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6593 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6609 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6626 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6643 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6660 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6677 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6693 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6709 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6725 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6741 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6757 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6773 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6789 on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on
6805 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6822 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6839 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6856 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6873 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6890 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6907 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6924 IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.
6941 IA-32 and x64.
6956 IA-32 and x64.
6971 IA-32 and x64.
6986 IA-32 and x64.
7001 IA-32 and x64.
7016 IA-32 and x64.
7031 IA-32 and x64.
7046 function is only available on IA-32 and x64.
7063 only available on IA-32 and x64.
7080 function is only available on IA-32 and x64.
7097 only available on IA-32 and x64.
7113 Reads and returns the current 16-bit LDTR descriptor value. This function is
7114 only available on IA-32 and x64.
7129 only available on IA-32 and x64.
7131 @param Ldtr 16-bit LDTR selector value.
7144 Buffer. Buffer must be aligned on a 16-byte boundary. This function is only
7145 available on IA-32 and x64.
7148 If Buffer is not aligned on a 16-byte boundary, then ASSERT().
7163 by Buffer. Buffer must be aligned on a 16-byte boundary. This function is
7164 only available on IA-32 and x64.
7167 If Buffer is not aligned on a 16-byte boundary, then ASSERT().
7180 Reads the current value of 64-bit MMX Register #0 (MM0).
7183 on IA-32 and x64.
7195 Reads the current value of 64-bit MMX Register #1 (MM1).
7198 on IA-32 and x64.
7210 Reads the current value of 64-bit MMX Register #2 (MM2).
7213 on IA-32 and x64.
7225 Reads the current value of 64-bit MMX Register #3 (MM3).
7228 on IA-32 and x64.
7240 Reads the current value of 64-bit MMX Register #4 (MM4).
7243 on IA-32 and x64.
7255 Reads the current value of 64-bit MMX Register #5 (MM5).
7258 on IA-32 and x64.
7270 Reads the current value of 64-bit MMX Register #6 (MM6).
7273 on IA-32 and x64.
7285 Reads the current value of 64-bit MMX Register #7 (MM7).
7288 on IA-32 and x64.
7300 Writes the current value of 64-bit MMX Register #0 (MM0).
7305 @param Value The 64-bit value to write to MM0.
7315 Writes the current value of 64-bit MMX Register #1 (MM1).
7320 @param Value The 64-bit value to write to MM1.
7330 Writes the current value of 64-bit MMX Register #2 (MM2).
7335 @param Value The 64-bit value to write to MM2.
7345 Writes the current value of 64-bit MMX Register #3 (MM3).
7350 @param Value The 64-bit value to write to MM3.
7360 Writes the current value of 64-bit MMX Register #4 (MM4).
7365 @param Value The 64-bit value to write to MM4.
7375 Writes the current value of 64-bit MMX Register #5 (MM5).
7380 @param Value The 64-bit value to write to MM5.
7390 Writes the current value of 64-bit MMX Register #6 (MM6).
7395 @param Value The 64-bit value to write to MM6.
7405 Writes the current value of 64-bit MMX Register #7 (MM7).
7410 @param Value The 64-bit value to write to MM7.
7423 on IA-32 and x64.
7438 Index. This function is only available on IA-32 and x64.
7440 @param Index The 32-bit Performance Counter index to read.
7455 and Edx. Returns Eax. This function is only available on IA-32 and x64.
7479 Ecx. Returns Eax. This function is only available on IA-32 and x64.
7499 Executes a WBINVD instruction. This function is only available on IA-32 and
7512 Executes a INVD instruction. This function is only available on IA-32 and
7527 This function is only available on IA-32 and x64.
7544 Enables the 32-bit paging mode on the CPU.
7546 Enables the 32-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
7548 assumes the current execution mode is 32-bit protected mode. This function is
7549 only available on IA-32. After the 32-bit paging mode is enabled, control is
7555 If the current execution mode is not 32-bit protected mode, then ASSERT().
7562 2) The caller must be in 32-bit protected mode with flat descriptors. This
7564 3) CR0 and CR4 must be compatible with 32-bit protected mode with flat
7590 Disables the 32-bit paging mode on the CPU.
7592 Disables the 32-bit paging mode on the CPU and returns to 32-bit protected
7593 mode. This function assumes the current execution mode is 32-paged protected
7594 mode. This function is only available on IA-32. After the 32-bit paging mode
7600 If the current execution mode is not 32-bit paged mode, then ASSERT().
7607 2) The caller must be in 32-bit paged mode.
7608 3) CR0, CR3, and CR4 must be compatible with 32-bit paged mode.
7633 Enables the 64-bit paging mode on the CPU.
7635 Enables the 64-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables
7637 assumes the current execution mode is 32-bit protected mode with flat
7638 descriptors. This function is only available on IA-32. After the 64-bit
7644 If the current execution mode is not 32-bit protected mode with flat
7649 @param Cs The 16-bit selector to load in the CS before EntryPoint
7652 @param EntryPoint The 64-bit virtual address of the function to call with
7654 @param Context1 The 64-bit virtual address of the context to pass into
7657 @param Context2 The 64-bit virtual address of the context to pass into
7660 @param NewStack The 64-bit virtual address of the new stack to use for
7675 Disables the 64-bit paging mode on the CPU.
7677 Disables the 64-bit paging mode on the CPU and returns to 32-bit protected
7678 mode. This function assumes the current execution mode is 64-paging mode.
7679 This function is only available on x64. After the 64-bit paging mode is
7685 If the current execution mode is not 64-bit paged mode, then ASSERT().
7689 @param Cs The 16-bit selector to load in the CS before EntryPoint
7691 references must be setup for 32-bit protected mode.
7692 @param EntryPoint The 64-bit virtual address of the function to call with
7694 @param Context1 The 64-bit virtual address of the context to pass into
7697 @param Context2 The 64-bit virtual address of the context to pass into
7700 @param NewStack The 64-bit virtual address of the new stack to use for
7715 // 16-bit thunking services
7719 Retrieves the properties for 16-bit thunk functions.
7724 in ExtraStackSize. If parameters are passed to the 16-bit real mode code,
7726 of bytes that need to be passed to the 16-bit real mode code.
7732 required to use the 16-bit thunk functions.
7734 that the 16-bit thunk functions require for
7736 16-bit real mode.
7757 16-bit real mode code to call.
7767 Transfers control to a 16-bit real mode entry point and returns the results.
7769 Transfers control to a 16-bit real mode entry point and returns the results.
7774 to calling the 16-bit real mode entry point. This includes the EFLAGS field of RealModeState,
7775 which is used to set the interrupt state when a 16-bit real mode entry point is called.
7776 …Control is transferred to the 16-bit real mode entry point specified by the CS and Eip fields of R…
7778 …the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function.
7779 The 16-bit real mode entry point is invoked with a 16-bit CALL FAR instruction,
7780 so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment
7781 …and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry
7785 If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
7786 …or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for makin…
7787 …ddress 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode.
7789 If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
7790 …then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit r…
7794 …is invoked in big real mode. Otherwise, the user code is invoked in 16-bit real mode with 64KB se…
7816 16-bit real mode code to call.
7826 Prepares all structures and code for a 16-bit real mode thunk, transfers
7827 control to a 16-bit real mode entry point, and returns the results.
7829 Prepares all structures and code for a 16-bit real mode thunk, transfers
7830 control to a 16-bit real mode entry point, and returns the results. If the
7831 caller only need to perform a single 16-bit real mode thunk, then this
7832 service should be used. If the caller intends to make more than one 16-bit
7834 once and AsmThunk16() can be called for each 16-bit real mode thunk.
7842 16-bit real mode code to call.
7852 Generates a 16-bit random number through RDRAND instruction.
7869 Generates a 32-bit random number through RDRAND instruction.
7886 Generates a 64-bit random number through RDRAND instruction.
7914 Performs a serializing operation on all load-from-memory instructions that
7917 Executes a LFENCE instruction. This function is only available on IA-32 and x64.
7929 Executes a XGETBV instruction. This function is only available on IA-32 and
7943 Executes a XSETBV instruction to write a 64-bit value to a Extended Control
7946 Writes the 64-bit value specified by Value to the XCR specified by Index. The
7947 64-bit value written to the XCR is returned. No parameter checking is
7951 IA-32 and x64.
7953 @param Index The 32-bit XCR index to write.
7954 @param Value The 64-bit value to write to the XCR.
7969 Executes a VMGEXIT instruction. This function is only available on IA-32 and
8005 for use with an SVSM. This function is only available on IA-32 and x64.