summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Library/BaseLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Include/Library/BaseLib.h')
-rw-r--r--MdePkg/Include/Library/BaseLib.h1610
1 files changed, 707 insertions, 903 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 8c07277fe4..6aa0d97218 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -22,16 +22,16 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// The IA-32 architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT32 Ebx;
- UINT32 Esi;
- UINT32 Edi;
- UINT32 Ebp;
- UINT32 Esp;
- UINT32 Eip;
- UINT32 Ssp;
+ UINT32 Ebx;
+ UINT32 Esi;
+ UINT32 Edi;
+ UINT32 Ebp;
+ UINT32 Esp;
+ UINT32 Eip;
+ UINT32 Ssp;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
#endif // defined (MDE_CPU_IA32)
@@ -40,22 +40,22 @@ typedef struct {
/// The x64 architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 Rbx;
- UINT64 Rsp;
- UINT64 Rbp;
- UINT64 Rdi;
- UINT64 Rsi;
- UINT64 R12;
- UINT64 R13;
- UINT64 R14;
- UINT64 R15;
- UINT64 Rip;
- UINT64 MxCsr;
- UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
- UINT64 Ssp;
+ UINT64 Rbx;
+ UINT64 Rsp;
+ UINT64 Rbp;
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+ UINT64 Rip;
+ UINT64 MxCsr;
+ UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
+ UINT64 Ssp;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
#endif // defined (MDE_CPU_X64)
@@ -64,14 +64,14 @@ typedef struct {
/// The EBC context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 R0;
- UINT64 R1;
- UINT64 R2;
- UINT64 R3;
- UINT64 IP;
+ UINT64 R0;
+ UINT64 R1;
+ UINT64 R2;
+ UINT64 R3;
+ UINT64 IP;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
#endif // defined (MDE_CPU_EBC)
@@ -91,9 +91,9 @@ typedef struct {
UINT32 R14;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
-#endif // defined (MDE_CPU_ARM)
+#endif // defined (MDE_CPU_ARM)
#if defined (MDE_CPU_AARCH64)
typedef struct {
@@ -123,32 +123,32 @@ typedef struct {
UINT64 D15;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
-#endif // defined (MDE_CPU_AARCH64)
+#endif // defined (MDE_CPU_AARCH64)
#if defined (MDE_CPU_RISCV64)
///
/// The RISC-V architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 RA;
- UINT64 S0;
- UINT64 S1;
- UINT64 S2;
- UINT64 S3;
- UINT64 S4;
- UINT64 S5;
- UINT64 S6;
- UINT64 S7;
- UINT64 S8;
- UINT64 S9;
- UINT64 S10;
- UINT64 S11;
- UINT64 SP;
+ UINT64 RA;
+ UINT64 S0;
+ UINT64 S1;
+ UINT64 S2;
+ UINT64 S3;
+ UINT64 S4;
+ UINT64 S5;
+ UINT64 S6;
+ UINT64 S7;
+ UINT64 S8;
+ UINT64 S9;
+ UINT64 S10;
+ UINT64 S11;
+ UINT64 SP;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
#endif // defined (MDE_CPU_RISCV64)
@@ -156,7 +156,6 @@ typedef struct {
// String Services
//
-
/**
Returns the length of a Null-terminated Unicode string.
@@ -176,8 +175,8 @@ typedef struct {
UINTN
EFIAPI
StrnLenS (
- IN CONST CHAR16 *String,
- IN UINTN MaxSize
+ IN CONST CHAR16 *String,
+ IN UINTN MaxSize
);
/**
@@ -204,8 +203,8 @@ StrnLenS (
UINTN
EFIAPI
StrnSizeS (
- IN CONST CHAR16 *String,
- IN UINTN MaxSize
+ IN CONST CHAR16 *String,
+ IN UINTN MaxSize
);
/**
@@ -237,9 +236,9 @@ StrnSizeS (
RETURN_STATUS
EFIAPI
StrCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source
);
/**
@@ -274,10 +273,10 @@ StrCpyS (
RETURN_STATUS
EFIAPI
StrnCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source,
+ IN UINTN Length
);
/**
@@ -312,9 +311,9 @@ StrnCpyS (
RETURN_STATUS
EFIAPI
StrCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
+ IN OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source
);
/**
@@ -352,10 +351,10 @@ StrCatS (
RETURN_STATUS
EFIAPI
StrnCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
+ IN OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source,
+ IN UINTN Length
);
/**
@@ -404,9 +403,9 @@ StrnCatS (
RETURN_STATUS
EFIAPI
StrDecimalToUintnS (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT UINTN *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -455,9 +454,9 @@ StrDecimalToUintnS (
RETURN_STATUS
EFIAPI
StrDecimalToUint64S (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT UINT64 *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -511,9 +510,9 @@ StrDecimalToUint64S (
RETURN_STATUS
EFIAPI
StrHexToUintnS (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT UINTN *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -567,9 +566,9 @@ StrHexToUintnS (
RETURN_STATUS
EFIAPI
StrHexToUint64S (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT UINT64 *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -589,8 +588,8 @@ StrHexToUint64S (
UINTN
EFIAPI
AsciiStrnLenS (
- IN CONST CHAR8 *String,
- IN UINTN MaxSize
+ IN CONST CHAR8 *String,
+ IN UINTN MaxSize
);
/**
@@ -615,8 +614,8 @@ AsciiStrnLenS (
UINTN
EFIAPI
AsciiStrnSizeS (
- IN CONST CHAR8 *String,
- IN UINTN MaxSize
+ IN CONST CHAR8 *String,
+ IN UINTN MaxSize
);
/**
@@ -801,9 +800,9 @@ AsciiStrnCatS (
RETURN_STATUS
EFIAPI
AsciiStrDecimalToUintnS (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT UINTN *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -850,9 +849,9 @@ AsciiStrDecimalToUintnS (
RETURN_STATUS
EFIAPI
AsciiStrDecimalToUint64S (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT UINT64 *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -903,9 +902,9 @@ AsciiStrDecimalToUint64S (
RETURN_STATUS
EFIAPI
AsciiStrHexToUintnS (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT UINTN *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -956,12 +955,11 @@ AsciiStrHexToUintnS (
RETURN_STATUS
EFIAPI
AsciiStrHexToUint64S (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT UINT64 *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
-
/**
Returns the length of a Null-terminated Unicode string.
@@ -982,10 +980,9 @@ AsciiStrHexToUint64S (
UINTN
EFIAPI
StrLen (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Returns the size of a Null-terminated Unicode string in bytes, including the
Null terminator.
@@ -1007,10 +1004,9 @@ StrLen (
UINTN
EFIAPI
StrSize (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Compares two Null-terminated Unicode strings, and returns the difference
between the first mismatched Unicode characters.
@@ -1042,11 +1038,10 @@ StrSize (
INTN
EFIAPI
StrCmp (
- IN CONST CHAR16 *FirstString,
- IN CONST CHAR16 *SecondString
+ IN CONST CHAR16 *FirstString,
+ IN CONST CHAR16 *SecondString
);
-
/**
Compares up to a specified length the contents of two Null-terminated Unicode strings,
and returns the difference between the first mismatched Unicode characters.
@@ -1082,12 +1077,11 @@ StrCmp (
INTN
EFIAPI
StrnCmp (
- IN CONST CHAR16 *FirstString,
- IN CONST CHAR16 *SecondString,
- IN UINTN Length
+ IN CONST CHAR16 *FirstString,
+ IN CONST CHAR16 *SecondString,
+ IN UINTN Length
);
-
/**
Returns the first occurrence of a Null-terminated Unicode sub-string
in a Null-terminated Unicode string.
@@ -1116,8 +1110,8 @@ StrnCmp (
CHAR16 *
EFIAPI
StrStr (
- IN CONST CHAR16 *String,
- IN CONST CHAR16 *SearchString
+ IN CONST CHAR16 *String,
+ IN CONST CHAR16 *SearchString
);
/**
@@ -1157,7 +1151,7 @@ StrStr (
UINTN
EFIAPI
StrDecimalToUintn (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
/**
@@ -1197,10 +1191,9 @@ StrDecimalToUintn (
UINT64
EFIAPI
StrDecimalToUint64 (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
@@ -1239,10 +1232,9 @@ StrDecimalToUint64 (
UINTN
EFIAPI
StrHexToUintn (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
@@ -1281,7 +1273,7 @@ StrHexToUintn (
UINT64
EFIAPI
StrHexToUint64 (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
/**
@@ -1337,10 +1329,10 @@ StrHexToUint64 (
RETURN_STATUS
EFIAPI
StrToIpv6Address (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT IPv6_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT IPv6_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -1387,10 +1379,10 @@ StrToIpv6Address (
RETURN_STATUS
EFIAPI
StrToIpv4Address (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer OPTIONAL,
- OUT IPv4_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT IPv4_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
#define GUID_STRING_LENGTH 36
@@ -1440,8 +1432,8 @@ StrToIpv4Address (
RETURN_STATUS
EFIAPI
StrToGuid (
- IN CONST CHAR16 *String,
- OUT GUID *Guid
+ IN CONST CHAR16 *String,
+ OUT GUID *Guid
);
/**
@@ -1480,13 +1472,12 @@ StrToGuid (
RETURN_STATUS
EFIAPI
StrHexToBytes (
- IN CONST CHAR16 *String,
- IN UINTN Length,
- OUT UINT8 *Buffer,
- IN UINTN MaxBufferSize
+ IN CONST CHAR16 *String,
+ IN UINTN Length,
+ OUT UINT8 *Buffer,
+ IN UINTN MaxBufferSize
);
-
/**
Convert a Null-terminated Unicode string to a Null-terminated
ASCII string.
@@ -1530,9 +1521,9 @@ StrHexToBytes (
RETURN_STATUS
EFIAPI
UnicodeStrToAsciiStrS (
- IN CONST CHAR16 *Source,
- OUT CHAR8 *Destination,
- IN UINTN DestMax
+ IN CONST CHAR16 *Source,
+ OUT CHAR8 *Destination,
+ IN UINTN DestMax
);
/**
@@ -1581,14 +1572,13 @@ UnicodeStrToAsciiStrS (
RETURN_STATUS
EFIAPI
UnicodeStrnToAsciiStrS (
- IN CONST CHAR16 *Source,
- IN UINTN Length,
- OUT CHAR8 *Destination,
- IN UINTN DestMax,
- OUT UINTN *DestinationLength
+ IN CONST CHAR16 *Source,
+ IN UINTN Length,
+ OUT CHAR8 *Destination,
+ IN UINTN DestMax,
+ OUT UINTN *DestinationLength
);
-
/**
Returns the length of a Null-terminated ASCII string.
@@ -1609,10 +1599,9 @@ UnicodeStrnToAsciiStrS (
UINTN
EFIAPI
AsciiStrLen (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Returns the size of a Null-terminated ASCII string in bytes, including the
Null terminator.
@@ -1633,10 +1622,9 @@ AsciiStrLen (
UINTN
EFIAPI
AsciiStrSize (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Compares two Null-terminated ASCII strings, and returns the difference
between the first mismatched ASCII characters.
@@ -1666,11 +1654,10 @@ AsciiStrSize (
INTN
EFIAPI
AsciiStrCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString
);
-
/**
Performs a case insensitive comparison of two Null-terminated ASCII strings,
and returns the difference between the first mismatched ASCII characters.
@@ -1703,11 +1690,10 @@ AsciiStrCmp (
INTN
EFIAPI
AsciiStriCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString
);
-
/**
Compares two Null-terminated ASCII strings with maximum lengths, and returns
the difference between the first mismatched ASCII characters.
@@ -1741,12 +1727,11 @@ AsciiStriCmp (
INTN
EFIAPI
AsciiStrnCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString,
- IN UINTN Length
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString,
+ IN UINTN Length
);
-
/**
Returns the first occurrence of a Null-terminated ASCII sub-string
in a Null-terminated ASCII string.
@@ -1774,11 +1759,10 @@ AsciiStrnCmp (
CHAR8 *
EFIAPI
AsciiStrStr (
- IN CONST CHAR8 *String,
- IN CONST CHAR8 *SearchString
+ IN CONST CHAR8 *String,
+ IN CONST CHAR8 *SearchString
);
-
/**
Convert a Null-terminated ASCII decimal string to a value of type
UINTN.
@@ -1812,10 +1796,9 @@ AsciiStrStr (
UINTN
EFIAPI
AsciiStrDecimalToUintn (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII decimal string to a value of type
UINT64.
@@ -1849,10 +1832,9 @@ AsciiStrDecimalToUintn (
UINT64
EFIAPI
AsciiStrDecimalToUint64 (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
@@ -1890,10 +1872,9 @@ AsciiStrDecimalToUint64 (
UINTN
EFIAPI
AsciiStrHexToUintn (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
@@ -1931,7 +1912,7 @@ AsciiStrHexToUintn (
UINT64
EFIAPI
AsciiStrHexToUint64 (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
/**
@@ -1985,10 +1966,10 @@ AsciiStrHexToUint64 (
RETURN_STATUS
EFIAPI
AsciiStrToIpv6Address (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT IPv6_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT IPv6_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -2033,10 +2014,10 @@ AsciiStrToIpv6Address (
RETURN_STATUS
EFIAPI
AsciiStrToIpv4Address (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer OPTIONAL,
- OUT IPv4_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT IPv4_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -2082,8 +2063,8 @@ AsciiStrToIpv4Address (
RETURN_STATUS
EFIAPI
AsciiStrToGuid (
- IN CONST CHAR8 *String,
- OUT GUID *Guid
+ IN CONST CHAR8 *String,
+ OUT GUID *Guid
);
/**
@@ -2120,13 +2101,12 @@ AsciiStrToGuid (
RETURN_STATUS
EFIAPI
AsciiStrHexToBytes (
- IN CONST CHAR8 *String,
- IN UINTN Length,
- OUT UINT8 *Buffer,
- IN UINTN MaxBufferSize
+ IN CONST CHAR8 *String,
+ IN UINTN Length,
+ OUT UINT8 *Buffer,
+ IN UINTN MaxBufferSize
);
-
/**
Convert one Null-terminated ASCII string to a Null-terminated
Unicode string.
@@ -2166,9 +2146,9 @@ AsciiStrHexToBytes (
RETURN_STATUS
EFIAPI
AsciiStrToUnicodeStrS (
- IN CONST CHAR8 *Source,
- OUT CHAR16 *Destination,
- IN UINTN DestMax
+ IN CONST CHAR8 *Source,
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax
);
/**
@@ -2216,11 +2196,11 @@ AsciiStrToUnicodeStrS (
RETURN_STATUS
EFIAPI
AsciiStrnToUnicodeStrS (
- IN CONST CHAR8 *Source,
- IN UINTN Length,
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- OUT UINTN *DestinationLength
+ IN CONST CHAR8 *Source,
+ IN UINTN Length,
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ OUT UINTN *DestinationLength
);
/**
@@ -2241,7 +2221,7 @@ AsciiStrnToUnicodeStrS (
CHAR16
EFIAPI
CharToUpper (
- IN CHAR16 Char
+ IN CHAR16 Char
);
/**
@@ -2260,7 +2240,7 @@ CharToUpper (
CHAR8
EFIAPI
AsciiCharToUpper (
- IN CHAR8 Chr
+ IN CHAR8 Chr
);
/**
@@ -2286,7 +2266,7 @@ RETURN_STATUS
EFIAPI
Base64Encode (
IN CONST UINT8 *Source,
- IN UINTN SourceLength,
+ IN UINTN SourceLength,
OUT CHAR8 *Destination OPTIONAL,
IN OUT UINTN *DestinationSize
);
@@ -2376,10 +2356,10 @@ Base64Encode (
RETURN_STATUS
EFIAPI
Base64Decode (
- IN CONST CHAR8 *Source OPTIONAL,
- IN UINTN SourceSize,
- OUT UINT8 *Destination OPTIONAL,
- IN OUT UINTN *DestinationSize
+ IN CONST CHAR8 *Source OPTIONAL,
+ IN UINTN SourceSize,
+ OUT UINT8 *Destination OPTIONAL,
+ IN OUT UINTN *DestinationSize
);
/**
@@ -2398,10 +2378,9 @@ Base64Decode (
UINT8
EFIAPI
DecimalToBcd8 (
- IN UINT8 Value
+ IN UINT8 Value
);
-
/**
Converts an 8-bit BCD value to an 8-bit value.
@@ -2419,7 +2398,7 @@ DecimalToBcd8 (
UINT8
EFIAPI
BcdToDecimal8 (
- IN UINT8 Value
+ IN UINT8 Value
);
//
@@ -2436,8 +2415,8 @@ BcdToDecimal8 (
**/
BOOLEAN
EFIAPI
-PathRemoveLastItem(
- IN OUT CHAR16 *Path
+PathRemoveLastItem (
+ IN OUT CHAR16 *Path
);
/**
@@ -2453,10 +2432,10 @@ PathRemoveLastItem(
@return Returns Path, otherwise returns NULL to indicate that an error has occurred.
**/
-CHAR16*
+CHAR16 *
EFIAPI
-PathCleanUpDirectories(
- IN CHAR16 *Path
+PathCleanUpDirectories (
+ IN CHAR16 *Path
);
//
@@ -2528,11 +2507,10 @@ PathCleanUpDirectories(
BOOLEAN
EFIAPI
IsNodeInList (
- IN CONST LIST_ENTRY *FirstEntry,
- IN CONST LIST_ENTRY *SecondEntry
+ IN CONST LIST_ENTRY *FirstEntry,
+ IN CONST LIST_ENTRY *SecondEntry
);
-
/**
Initializes the head node of a doubly linked list, and returns the pointer to
the head node of the doubly linked list.
@@ -2552,10 +2530,9 @@ IsNodeInList (
LIST_ENTRY *
EFIAPI
InitializeListHead (
- IN OUT LIST_ENTRY *ListHead
+ IN OUT LIST_ENTRY *ListHead
);
-
/**
Adds a node to the beginning of a doubly linked list, and returns the pointer
to the head node of the doubly linked list.
@@ -2581,11 +2558,10 @@ InitializeListHead (
LIST_ENTRY *
EFIAPI
InsertHeadList (
- IN OUT LIST_ENTRY *ListHead,
- IN OUT LIST_ENTRY *Entry
+ IN OUT LIST_ENTRY *ListHead,
+ IN OUT LIST_ENTRY *Entry
);
-
/**
Adds a node to the end of a doubly linked list, and returns the pointer to
the head node of the doubly linked list.
@@ -2611,11 +2587,10 @@ InsertHeadList (
LIST_ENTRY *
EFIAPI
InsertTailList (
- IN OUT LIST_ENTRY *ListHead,
- IN OUT LIST_ENTRY *Entry
+ IN OUT LIST_ENTRY *ListHead,
+ IN OUT LIST_ENTRY *Entry
);
-
/**
Retrieves the first node of a doubly linked list.
@@ -2639,10 +2614,9 @@ InsertTailList (
LIST_ENTRY *
EFIAPI
GetFirstNode (
- IN CONST LIST_ENTRY *List
+ IN CONST LIST_ENTRY *List
);
-
/**
Retrieves the next node of a doubly linked list.
@@ -2667,11 +2641,10 @@ GetFirstNode (
LIST_ENTRY *
EFIAPI
GetNextNode (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Retrieves the previous node of a doubly linked list.
@@ -2696,11 +2669,10 @@ GetNextNode (
LIST_ENTRY *
EFIAPI
GetPreviousNode (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Checks to see if a doubly linked list is empty or not.
@@ -2723,10 +2695,9 @@ GetPreviousNode (
BOOLEAN
EFIAPI
IsListEmpty (
- IN CONST LIST_ENTRY *ListHead
+ IN CONST LIST_ENTRY *ListHead
);
-
/**
Determines if a node in a doubly linked list is the head node of a the same
doubly linked list. This function is typically used to terminate a loop that
@@ -2756,11 +2727,10 @@ IsListEmpty (
BOOLEAN
EFIAPI
IsNull (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Determines if a node the last node in a doubly linked list.
@@ -2787,11 +2757,10 @@ IsNull (
BOOLEAN
EFIAPI
IsNodeAtEnd (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Swaps the location of two nodes in a doubly linked list, and returns the
first node after the swap.
@@ -2821,11 +2790,10 @@ IsNodeAtEnd (
LIST_ENTRY *
EFIAPI
SwapListEntries (
- IN OUT LIST_ENTRY *FirstEntry,
- IN OUT LIST_ENTRY *SecondEntry
+ IN OUT LIST_ENTRY *FirstEntry,
+ IN OUT LIST_ENTRY *SecondEntry
);
-
/**
Removes a node from a doubly linked list, and returns the node that follows
the removed node.
@@ -2850,12 +2818,13 @@ SwapListEntries (
LIST_ENTRY *
EFIAPI
RemoveEntryList (
- IN CONST LIST_ENTRY *Entry
+ IN CONST LIST_ENTRY *Entry
);
//
// Math Services
//
+
/**
Prototype for comparison function for any two element types.
@@ -2899,11 +2868,11 @@ INTN
VOID
EFIAPI
QuickSort (
- IN OUT VOID *BufferToSort,
- IN CONST UINTN Count,
- IN CONST UINTN ElementSize,
- IN BASE_SORT_COMPARE CompareFunction,
- OUT VOID *BufferOneElement
+ IN OUT VOID *BufferToSort,
+ IN CONST UINTN Count,
+ IN CONST UINTN ElementSize,
+ IN BASE_SORT_COMPARE CompareFunction,
+ OUT VOID *BufferOneElement
);
/**
@@ -2924,11 +2893,10 @@ QuickSort (
UINT64
EFIAPI
LShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. This high bits are
filled with zeros. The shifted value is returned.
@@ -2947,11 +2915,10 @@ LShiftU64 (
UINT64
EFIAPI
RShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled
with original integer's bit 63. The shifted value is returned.
@@ -2970,11 +2937,10 @@ RShiftU64 (
UINT64
EFIAPI
ARShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits
with the high bits that were rotated.
@@ -2994,11 +2960,10 @@ ARShiftU64 (
UINT32
EFIAPI
LRotU32 (
- IN UINT32 Operand,
- IN UINTN Count
+ IN UINT32 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 32-bit integer right between 0 and 31 bits, filling the high bits
with the low bits that were rotated.
@@ -3018,11 +2983,10 @@ LRotU32 (
UINT32
EFIAPI
RRotU32 (
- IN UINT32 Operand,
- IN UINTN Count
+ IN UINT32 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits
with the high bits that were rotated.
@@ -3042,11 +3006,10 @@ RRotU32 (
UINT64
EFIAPI
LRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits
with the high low bits that were rotated.
@@ -3066,11 +3029,10 @@ LRotU64 (
UINT64
EFIAPI
RRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Returns the bit position of the lowest bit set in a 32-bit value.
@@ -3087,10 +3049,9 @@ RRotU64 (
INTN
EFIAPI
LowBitSet32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the bit position of the lowest bit set in a 64-bit value.
@@ -3108,10 +3069,9 @@ LowBitSet32 (
INTN
EFIAPI
LowBitSet64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Returns the bit position of the highest bit set in a 32-bit value. Equivalent
to log2(x).
@@ -3129,10 +3089,9 @@ LowBitSet64 (
INTN
EFIAPI
HighBitSet32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the bit position of the highest bit set in a 64-bit value. Equivalent
to log2(x).
@@ -3150,10 +3109,9 @@ HighBitSet32 (
INTN
EFIAPI
HighBitSet64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Returns the value of the highest bit set in a 32-bit value. Equivalent to
1 << log2(x).
@@ -3170,10 +3128,9 @@ HighBitSet64 (
UINT32
EFIAPI
GetPowerOfTwo32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the value of the highest bit set in a 64-bit value. Equivalent to
1 << log2(x).
@@ -3190,10 +3147,9 @@ GetPowerOfTwo32 (
UINT64
EFIAPI
GetPowerOfTwo64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Switches the endianness of a 16-bit integer.
@@ -3209,10 +3165,9 @@ GetPowerOfTwo64 (
UINT16
EFIAPI
SwapBytes16 (
- IN UINT16 Value
+ IN UINT16 Value
);
-
/**
Switches the endianness of a 32-bit integer.
@@ -3228,10 +3183,9 @@ SwapBytes16 (
UINT32
EFIAPI
SwapBytes32 (
- IN UINT32 Value
+ IN UINT32 Value
);
-
/**
Switches the endianness of a 64-bit integer.
@@ -3247,10 +3201,9 @@ SwapBytes32 (
UINT64
EFIAPI
SwapBytes64 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and
generates a 64-bit unsigned result.
@@ -3268,11 +3221,10 @@ SwapBytes64 (
UINT64
EFIAPI
MultU64x32 (
- IN UINT64 Multiplicand,
- IN UINT32 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT32 Multiplier
);
-
/**
Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and
generates a 64-bit unsigned result.
@@ -3290,11 +3242,10 @@ MultU64x32 (
UINT64
EFIAPI
MultU64x64 (
- IN UINT64 Multiplicand,
- IN UINT64 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT64 Multiplier
);
-
/**
Multiples a 64-bit signed integer by a 64-bit signed integer and generates a
64-bit signed result.
@@ -3312,11 +3263,10 @@ MultU64x64 (
INT64
EFIAPI
MultS64x64 (
- IN INT64 Multiplicand,
- IN INT64 Multiplier
+ IN INT64 Multiplicand,
+ IN INT64 Multiplier
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 64-bit unsigned result.
@@ -3336,11 +3286,10 @@ MultS64x64 (
UINT64
EFIAPI
DivU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 32-bit unsigned remainder.
@@ -3360,11 +3309,10 @@ DivU64x32 (
UINT32
EFIAPI
ModU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 64-bit unsigned result and an optional 32-bit unsigned remainder.
@@ -3387,12 +3335,11 @@ ModU64x32 (
UINT64
EFIAPI
DivU64x32Remainder (
- IN UINT64 Dividend,
- IN UINT32 Divisor,
- OUT UINT32 *Remainder OPTIONAL
+ IN UINT64 Dividend,
+ IN UINT32 Divisor,
+ OUT UINT32 *Remainder OPTIONAL
);
-
/**
Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates
a 64-bit unsigned result and an optional 64-bit unsigned remainder.
@@ -3415,12 +3362,11 @@ DivU64x32Remainder (
UINT64
EFIAPI
DivU64x64Remainder (
- IN UINT64 Dividend,
- IN UINT64 Divisor,
- OUT UINT64 *Remainder OPTIONAL
+ IN UINT64 Dividend,
+ IN UINT64 Divisor,
+ OUT UINT64 *Remainder OPTIONAL
);
-
/**
Divides a 64-bit signed integer by a 64-bit signed integer and generates a
64-bit signed result and a optional 64-bit signed remainder.
@@ -3447,12 +3393,11 @@ DivU64x64Remainder (
INT64
EFIAPI
DivS64x64Remainder (
- IN INT64 Dividend,
- IN INT64 Divisor,
- OUT INT64 *Remainder OPTIONAL
+ IN INT64 Dividend,
+ IN INT64 Divisor,
+ OUT INT64 *Remainder OPTIONAL
);
-
/**
Reads a 16-bit value from memory that may be unaligned.
@@ -3469,10 +3414,9 @@ DivS64x64Remainder (
UINT16
EFIAPI
ReadUnaligned16 (
- IN CONST UINT16 *Buffer
+ IN CONST UINT16 *Buffer
);
-
/**
Writes a 16-bit value to memory that may be unaligned.
@@ -3491,11 +3435,10 @@ ReadUnaligned16 (
UINT16
EFIAPI
WriteUnaligned16 (
- OUT UINT16 *Buffer,
- IN UINT16 Value
+ OUT UINT16 *Buffer,
+ IN UINT16 Value
);
-
/**
Reads a 24-bit value from memory that may be unaligned.
@@ -3512,10 +3455,9 @@ WriteUnaligned16 (
UINT32
EFIAPI
ReadUnaligned24 (
- IN CONST UINT32 *Buffer
+ IN CONST UINT32 *Buffer
);
-
/**
Writes a 24-bit value to memory that may be unaligned.
@@ -3534,11 +3476,10 @@ ReadUnaligned24 (
UINT32
EFIAPI
WriteUnaligned24 (
- OUT UINT32 *Buffer,
- IN UINT32 Value
+ OUT UINT32 *Buffer,
+ IN UINT32 Value
);
-
/**
Reads a 32-bit value from memory that may be unaligned.
@@ -3555,10 +3496,9 @@ WriteUnaligned24 (
UINT32
EFIAPI
ReadUnaligned32 (
- IN CONST UINT32 *Buffer
+ IN CONST UINT32 *Buffer
);
-
/**
Writes a 32-bit value to memory that may be unaligned.
@@ -3577,11 +3517,10 @@ ReadUnaligned32 (
UINT32
EFIAPI
WriteUnaligned32 (
- OUT UINT32 *Buffer,
- IN UINT32 Value
+ OUT UINT32 *Buffer,
+ IN UINT32 Value
);
-
/**
Reads a 64-bit value from memory that may be unaligned.
@@ -3598,10 +3537,9 @@ WriteUnaligned32 (
UINT64
EFIAPI
ReadUnaligned64 (
- IN CONST UINT64 *Buffer
+ IN CONST UINT64 *Buffer
);
-
/**
Writes a 64-bit value to memory that may be unaligned.
@@ -3620,11 +3558,10 @@ ReadUnaligned64 (
UINT64
EFIAPI
WriteUnaligned64 (
- OUT UINT64 *Buffer,
- IN UINT64 Value
+ OUT UINT64 *Buffer,
+ IN UINT64 Value
);
-
//
// Bit Field Functions
//
@@ -3651,12 +3588,11 @@ WriteUnaligned64 (
UINT8
EFIAPI
BitFieldRead8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an 8-bit value, and returns the result.
@@ -3683,13 +3619,12 @@ BitFieldRead8 (
UINT8
EFIAPI
BitFieldWrite8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 Value
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 Value
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the
result.
@@ -3717,13 +3652,12 @@ BitFieldWrite8 (
UINT8
EFIAPI
BitFieldOr8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 OrData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 OrData
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise AND, and returns
the result.
@@ -3751,13 +3685,12 @@ BitFieldOr8 (
UINT8
EFIAPI
BitFieldAnd8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 AndData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 AndData
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -3788,14 +3721,13 @@ BitFieldAnd8 (
UINT8
EFIAPI
BitFieldAndThenOr8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 AndData,
- IN UINT8 OrData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 AndData,
+ IN UINT8 OrData
);
-
/**
Returns a bit field from a 16-bit value.
@@ -3818,12 +3750,11 @@ BitFieldAndThenOr8 (
UINT16
EFIAPI
BitFieldRead16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 16-bit value, and returns the result.
@@ -3850,13 +3781,12 @@ BitFieldRead16 (
UINT16
EFIAPI
BitFieldWrite16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 Value
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 Value
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the
result.
@@ -3884,13 +3814,12 @@ BitFieldWrite16 (
UINT16
EFIAPI
BitFieldOr16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 OrData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 OrData
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise AND, and returns
the result.
@@ -3918,13 +3847,12 @@ BitFieldOr16 (
UINT16
EFIAPI
BitFieldAnd16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 AndData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 AndData
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -3955,14 +3883,13 @@ BitFieldAnd16 (
UINT16
EFIAPI
BitFieldAndThenOr16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 AndData,
- IN UINT16 OrData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 AndData,
+ IN UINT16 OrData
);
-
/**
Returns a bit field from a 32-bit value.
@@ -3985,12 +3912,11 @@ BitFieldAndThenOr16 (
UINT32
EFIAPI
BitFieldRead32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 32-bit value, and returns the result.
@@ -4017,13 +3943,12 @@ BitFieldRead32 (
UINT32
EFIAPI
BitFieldWrite32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 Value
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 Value
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the
result.
@@ -4051,13 +3976,12 @@ BitFieldWrite32 (
UINT32
EFIAPI
BitFieldOr32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 OrData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 OrData
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise AND, and returns
the result.
@@ -4085,13 +4009,12 @@ BitFieldOr32 (
UINT32
EFIAPI
BitFieldAnd32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4122,14 +4045,13 @@ BitFieldAnd32 (
UINT32
EFIAPI
BitFieldAndThenOr32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Returns a bit field from a 64-bit value.
@@ -4152,12 +4074,11 @@ BitFieldAndThenOr32 (
UINT64
EFIAPI
BitFieldRead64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 64-bit value, and returns the result.
@@ -4184,13 +4105,12 @@ BitFieldRead64 (
UINT64
EFIAPI
BitFieldWrite64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 Value
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 Value
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the
result.
@@ -4218,13 +4138,12 @@ BitFieldWrite64 (
UINT64
EFIAPI
BitFieldOr64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 OrData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 OrData
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise AND, and returns
the result.
@@ -4252,13 +4171,12 @@ BitFieldOr64 (
UINT64
EFIAPI
BitFieldAnd64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4289,11 +4207,11 @@ BitFieldAnd64 (
UINT64
EFIAPI
BitFieldAndThenOr64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
/**
@@ -4319,9 +4237,9 @@ BitFieldAndThenOr64 (
UINT8
EFIAPI
BitFieldCountOnes32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
/**
@@ -4347,9 +4265,9 @@ BitFieldCountOnes32 (
UINT8
EFIAPI
BitFieldCountOnes64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
//
@@ -4377,11 +4295,10 @@ BitFieldCountOnes64 (
UINT8
EFIAPI
CalculateSum8 (
- IN CONST UINT8 *Buffer,
- IN UINTN Length
+ IN CONST UINT8 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer
of 8-bit values.
@@ -4403,11 +4320,10 @@ CalculateSum8 (
UINT8
EFIAPI
CalculateCheckSum8 (
- IN CONST UINT8 *Buffer,
- IN UINTN Length
+ IN CONST UINT8 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 16-bit values. During
calculation, the carry bits are dropped.
@@ -4430,11 +4346,10 @@ CalculateCheckSum8 (
UINT16
EFIAPI
CalculateSum16 (
- IN CONST UINT16 *Buffer,
- IN UINTN Length
+ IN CONST UINT16 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
16-bit values.
@@ -4458,11 +4373,10 @@ CalculateSum16 (
UINT16
EFIAPI
CalculateCheckSum16 (
- IN CONST UINT16 *Buffer,
- IN UINTN Length
+ IN CONST UINT16 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 32-bit values. During
calculation, the carry bits are dropped.
@@ -4485,11 +4399,10 @@ CalculateCheckSum16 (
UINT32
EFIAPI
CalculateSum32 (
- IN CONST UINT32 *Buffer,
- IN UINTN Length
+ IN CONST UINT32 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
32-bit values.
@@ -4513,11 +4426,10 @@ CalculateSum32 (
UINT32
EFIAPI
CalculateCheckSum32 (
- IN CONST UINT32 *Buffer,
- IN UINTN Length
+ IN CONST UINT32 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 64-bit values. During
calculation, the carry bits are dropped.
@@ -4540,11 +4452,10 @@ CalculateCheckSum32 (
UINT64
EFIAPI
CalculateSum64 (
- IN CONST UINT64 *Buffer,
- IN UINTN Length
+ IN CONST UINT64 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
64-bit values.
@@ -4568,8 +4479,8 @@ CalculateSum64 (
UINT64
EFIAPI
CalculateCheckSum64 (
- IN CONST UINT64 *Buffer,
- IN UINTN Length
+ IN CONST UINT64 *Buffer,
+ IN UINTN Length
);
/**
@@ -4587,9 +4498,9 @@ CalculateCheckSum64 (
**/
UINT32
EFIAPI
-CalculateCrc32(
- IN VOID *Buffer,
- IN UINTN Length
+CalculateCrc32 (
+ IN VOID *Buffer,
+ IN UINTN Length
);
//
@@ -4610,7 +4521,6 @@ VOID
IN VOID *Context2 OPTIONAL
);
-
/**
Used to serialize load and store operations.
@@ -4624,7 +4534,6 @@ MemoryFence (
VOID
);
-
/**
Saves the current CPU context that can be restored with a call to LongJump()
and returns 0.
@@ -4653,7 +4562,6 @@ SetJump (
OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
);
-
/**
Restores the CPU context that was saved with SetJump().
@@ -4677,7 +4585,6 @@ LongJump (
IN UINTN Value
);
-
/**
Enables CPU interrupts.
@@ -4688,7 +4595,6 @@ EnableInterrupts (
VOID
);
-
/**
Disables CPU interrupts.
@@ -4699,7 +4605,6 @@ DisableInterrupts (
VOID
);
-
/**
Disables CPU interrupts and returns the interrupt state prior to the disable
operation.
@@ -4714,7 +4619,6 @@ SaveAndDisableInterrupts (
VOID
);
-
/**
Enables CPU interrupts for the smallest window required to capture any
pending interrupts.
@@ -4726,7 +4630,6 @@ EnableDisableInterrupts (
VOID
);
-
/**
Retrieves the current CPU interrupt state.
@@ -4743,7 +4646,6 @@ GetInterruptState (
VOID
);
-
/**
Set the current CPU interrupt state.
@@ -4761,10 +4663,9 @@ GetInterruptState (
BOOLEAN
EFIAPI
SetInterruptState (
- IN BOOLEAN InterruptState
+ IN BOOLEAN InterruptState
);
-
/**
Requests CPU to pause for a short period of time.
@@ -4778,7 +4679,6 @@ CpuPause (
VOID
);
-
/**
Transfers control to a function starting with a new stack.
@@ -4818,7 +4718,6 @@ SwitchStack (
...
);
-
/**
Generates a breakpoint on the CPU.
@@ -4832,7 +4731,6 @@ CpuBreakpoint (
VOID
);
-
/**
Executes an infinite loop.
@@ -4848,7 +4746,6 @@ CpuDeadLoop (
VOID
);
-
/**
Uses as a barrier to stop speculative execution.
@@ -4874,14 +4771,14 @@ typedef enum {
//
// PVALIDATE Return Code.
//
-#define PVALIDATE_RET_SUCCESS 0
-#define PVALIDATE_RET_FAIL_INPUT 1
-#define PVALIDATE_RET_SIZE_MISMATCH 6
+#define PVALIDATE_RET_SUCCESS 0
+#define PVALIDATE_RET_FAIL_INPUT 1
+#define PVALIDATE_RET_SIZE_MISMATCH 6
//
// The PVALIDATE instruction did not make any changes to the RMP entry.
//
-#define PVALIDATE_RET_NO_RMPUPDATE 255
+#define PVALIDATE_RET_NO_RMPUPDATE 255
/**
Execute a PVALIDATE instruction to validate or to rescinds validation of a guest
@@ -4906,9 +4803,9 @@ typedef enum {
UINT32
EFIAPI
AsmPvalidate (
- IN PVALIDATE_PAGE_SIZE PageSize,
- IN BOOLEAN Validate,
- IN PHYSICAL_ADDRESS Address
+ IN PVALIDATE_PAGE_SIZE PageSize,
+ IN BOOLEAN Validate,
+ IN PHYSICAL_ADDRESS Address
);
//
@@ -4941,12 +4838,12 @@ AsmPvalidate (
UINT32
EFIAPI
AsmRmpAdjust (
- IN UINT64 Rax,
- IN UINT64 Rcx,
- IN UINT64 Rdx
+ IN UINT64 Rax,
+ IN UINT64 Rcx,
+ IN UINT64 Rdx
);
-#endif
+#endif
#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
///
@@ -4955,21 +4852,21 @@ AsmRmpAdjust (
///
typedef union {
struct {
- UINT32 CF:1; ///< Carry Flag.
- UINT32 Reserved_0:1; ///< Reserved.
- UINT32 PF:1; ///< Parity Flag.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AF:1; ///< Auxiliary Carry Flag.
- UINT32 Reserved_2:1; ///< Reserved.
- UINT32 ZF:1; ///< Zero Flag.
- UINT32 SF:1; ///< Sign Flag.
- UINT32 TF:1; ///< Trap Flag.
- UINT32 IF:1; ///< Interrupt Enable Flag.
- UINT32 DF:1; ///< Direction Flag.
- UINT32 OF:1; ///< Overflow Flag.
- UINT32 IOPL:2; ///< I/O Privilege Level.
- UINT32 NT:1; ///< Nested Task.
- UINT32 Reserved_3:1; ///< Reserved.
+ UINT32 CF : 1; ///< Carry Flag.
+ UINT32 Reserved_0 : 1; ///< Reserved.
+ UINT32 PF : 1; ///< Parity Flag.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AF : 1; ///< Auxiliary Carry Flag.
+ UINT32 Reserved_2 : 1; ///< Reserved.
+ UINT32 ZF : 1; ///< Zero Flag.
+ UINT32 SF : 1; ///< Sign Flag.
+ UINT32 TF : 1; ///< Trap Flag.
+ UINT32 IF : 1; ///< Interrupt Enable Flag.
+ UINT32 DF : 1; ///< Direction Flag.
+ UINT32 OF : 1; ///< Overflow Flag.
+ UINT32 IOPL : 2; ///< I/O Privilege Level.
+ UINT32 NT : 1; ///< Nested Task.
+ UINT32 Reserved_3 : 1; ///< Reserved.
} Bits;
UINT16 Uint16;
} IA32_FLAGS16;
@@ -4981,30 +4878,30 @@ typedef union {
///
typedef union {
struct {
- UINT32 CF:1; ///< Carry Flag.
- UINT32 Reserved_0:1; ///< Reserved.
- UINT32 PF:1; ///< Parity Flag.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AF:1; ///< Auxiliary Carry Flag.
- UINT32 Reserved_2:1; ///< Reserved.
- UINT32 ZF:1; ///< Zero Flag.
- UINT32 SF:1; ///< Sign Flag.
- UINT32 TF:1; ///< Trap Flag.
- UINT32 IF:1; ///< Interrupt Enable Flag.
- UINT32 DF:1; ///< Direction Flag.
- UINT32 OF:1; ///< Overflow Flag.
- UINT32 IOPL:2; ///< I/O Privilege Level.
- UINT32 NT:1; ///< Nested Task.
- UINT32 Reserved_3:1; ///< Reserved.
- UINT32 RF:1; ///< Resume Flag.
- UINT32 VM:1; ///< Virtual 8086 Mode.
- UINT32 AC:1; ///< Alignment Check.
- UINT32 VIF:1; ///< Virtual Interrupt Flag.
- UINT32 VIP:1; ///< Virtual Interrupt Pending.
- UINT32 ID:1; ///< ID Flag.
- UINT32 Reserved_4:10; ///< Reserved.
+ UINT32 CF : 1; ///< Carry Flag.
+ UINT32 Reserved_0 : 1; ///< Reserved.
+ UINT32 PF : 1; ///< Parity Flag.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AF : 1; ///< Auxiliary Carry Flag.
+ UINT32 Reserved_2 : 1; ///< Reserved.
+ UINT32 ZF : 1; ///< Zero Flag.
+ UINT32 SF : 1; ///< Sign Flag.
+ UINT32 TF : 1; ///< Trap Flag.
+ UINT32 IF : 1; ///< Interrupt Enable Flag.
+ UINT32 DF : 1; ///< Direction Flag.
+ UINT32 OF : 1; ///< Overflow Flag.
+ UINT32 IOPL : 2; ///< I/O Privilege Level.
+ UINT32 NT : 1; ///< Nested Task.
+ UINT32 Reserved_3 : 1; ///< Reserved.
+ UINT32 RF : 1; ///< Resume Flag.
+ UINT32 VM : 1; ///< Virtual 8086 Mode.
+ UINT32 AC : 1; ///< Alignment Check.
+ UINT32 VIF : 1; ///< Virtual Interrupt Flag.
+ UINT32 VIP : 1; ///< Virtual Interrupt Pending.
+ UINT32 ID : 1; ///< ID Flag.
+ UINT32 Reserved_4 : 10; ///< Reserved.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_EFLAGS32;
///
@@ -5014,22 +4911,22 @@ typedef union {
///
typedef union {
struct {
- UINT32 PE:1; ///< Protection Enable.
- UINT32 MP:1; ///< Monitor Coprocessor.
- UINT32 EM:1; ///< Emulation.
- UINT32 TS:1; ///< Task Switched.
- UINT32 ET:1; ///< Extension Type.
- UINT32 NE:1; ///< Numeric Error.
- UINT32 Reserved_0:10; ///< Reserved.
- UINT32 WP:1; ///< Write Protect.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AM:1; ///< Alignment Mask.
- UINT32 Reserved_2:10; ///< Reserved.
- UINT32 NW:1; ///< Mot Write-through.
- UINT32 CD:1; ///< Cache Disable.
- UINT32 PG:1; ///< Paging.
+ UINT32 PE : 1; ///< Protection Enable.
+ UINT32 MP : 1; ///< Monitor Coprocessor.
+ UINT32 EM : 1; ///< Emulation.
+ UINT32 TS : 1; ///< Task Switched.
+ UINT32 ET : 1; ///< Extension Type.
+ UINT32 NE : 1; ///< Numeric Error.
+ UINT32 Reserved_0 : 10; ///< Reserved.
+ UINT32 WP : 1; ///< Write Protect.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AM : 1; ///< Alignment Mask.
+ UINT32 Reserved_2 : 10; ///< Reserved.
+ UINT32 NW : 1; ///< Mot Write-through.
+ UINT32 CD : 1; ///< Cache Disable.
+ UINT32 PG : 1; ///< Paging.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_CR0;
///
@@ -5039,36 +4936,36 @@ typedef union {
///
typedef union {
struct {
- UINT32 VME:1; ///< Virtual-8086 Mode Extensions.
- UINT32 PVI:1; ///< Protected-Mode Virtual Interrupts.
- UINT32 TSD:1; ///< Time Stamp Disable.
- UINT32 DE:1; ///< Debugging Extensions.
- UINT32 PSE:1; ///< Page Size Extensions.
- UINT32 PAE:1; ///< Physical Address Extension.
- UINT32 MCE:1; ///< Machine Check Enable.
- UINT32 PGE:1; ///< Page Global Enable.
- UINT32 PCE:1; ///< Performance Monitoring Counter
- ///< Enable.
- UINT32 OSFXSR:1; ///< Operating System Support for
- ///< FXSAVE and FXRSTOR instructions
- UINT32 OSXMMEXCPT:1; ///< Operating System Support for
- ///< Unmasked SIMD Floating Point
- ///< Exceptions.
- UINT32 UMIP:1; ///< User-Mode Instruction Prevention.
- UINT32 LA57:1; ///< Linear Address 57bit.
- UINT32 VMXE:1; ///< VMX Enable.
- UINT32 SMXE:1; ///< SMX Enable.
- UINT32 Reserved_3:1; ///< Reserved.
- UINT32 FSGSBASE:1; ///< FSGSBASE Enable.
- UINT32 PCIDE:1; ///< PCID Enable.
- UINT32 OSXSAVE:1; ///< XSAVE and Processor Extended States Enable.
- UINT32 Reserved_4:1; ///< Reserved.
- UINT32 SMEP:1; ///< SMEP Enable.
- UINT32 SMAP:1; ///< SMAP Enable.
- UINT32 PKE:1; ///< Protection-Key Enable.
- UINT32 Reserved_5:9; ///< Reserved.
+ UINT32 VME : 1; ///< Virtual-8086 Mode Extensions.
+ UINT32 PVI : 1; ///< Protected-Mode Virtual Interrupts.
+ UINT32 TSD : 1; ///< Time Stamp Disable.
+ UINT32 DE : 1; ///< Debugging Extensions.
+ UINT32 PSE : 1; ///< Page Size Extensions.
+ UINT32 PAE : 1; ///< Physical Address Extension.
+ UINT32 MCE : 1; ///< Machine Check Enable.
+ UINT32 PGE : 1; ///< Page Global Enable.
+ UINT32 PCE : 1; ///< Performance Monitoring Counter
+ ///< Enable.
+ UINT32 OSFXSR : 1; ///< Operating System Support for
+ ///< FXSAVE and FXRSTOR instructions
+ UINT32 OSXMMEXCPT : 1; ///< Operating System Support for
+ ///< Unmasked SIMD Floating Point
+ ///< Exceptions.
+ UINT32 UMIP : 1; ///< User-Mode Instruction Prevention.
+ UINT32 LA57 : 1; ///< Linear Address 57bit.
+ UINT32 VMXE : 1; ///< VMX Enable.
+ UINT32 SMXE : 1; ///< SMX Enable.
+ UINT32 Reserved_3 : 1; ///< Reserved.
+ UINT32 FSGSBASE : 1; ///< FSGSBASE Enable.
+ UINT32 PCIDE : 1; ///< PCID Enable.
+ UINT32 OSXSAVE : 1; ///< XSAVE and Processor Extended States Enable.
+ UINT32 Reserved_4 : 1; ///< Reserved.
+ UINT32 SMEP : 1; ///< SMEP Enable.
+ UINT32 SMAP : 1; ///< SMAP Enable.
+ UINT32 PKE : 1; ///< Protection-Key Enable.
+ UINT32 Reserved_5 : 9; ///< Reserved.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_CR4;
///
@@ -5076,32 +4973,32 @@ typedef union {
///
typedef union {
struct {
- UINT32 LimitLow:16;
- UINT32 BaseLow:16;
- UINT32 BaseMid:8;
- UINT32 Type:4;
- UINT32 S:1;
- UINT32 DPL:2;
- UINT32 P:1;
- UINT32 LimitHigh:4;
- UINT32 AVL:1;
- UINT32 L:1;
- UINT32 DB:1;
- UINT32 G:1;
- UINT32 BaseHigh:8;
+ UINT32 LimitLow : 16;
+ UINT32 BaseLow : 16;
+ UINT32 BaseMid : 8;
+ UINT32 Type : 4;
+ UINT32 S : 1;
+ UINT32 DPL : 2;
+ UINT32 P : 1;
+ UINT32 LimitHigh : 4;
+ UINT32 AVL : 1;
+ UINT32 L : 1;
+ UINT32 DB : 1;
+ UINT32 G : 1;
+ UINT32 BaseHigh : 8;
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_SEGMENT_DESCRIPTOR;
///
/// Byte packed structure for an IDTR, GDTR, LDTR descriptor.
///
-#pragma pack (1)
+ #pragma pack (1)
typedef struct {
- UINT16 Limit;
- UINTN Base;
+ UINT16 Limit;
+ UINTN Base;
} IA32_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
#define IA32_IDT_GATE_TYPE_TASK 0x85
#define IA32_IDT_GATE_TYPE_INTERRUPT_16 0x86
@@ -5109,25 +5006,25 @@ typedef struct {
#define IA32_IDT_GATE_TYPE_INTERRUPT_32 0x8E
#define IA32_IDT_GATE_TYPE_TRAP_32 0x8F
-#define IA32_GDT_TYPE_TSS 0x9
-#define IA32_GDT_ALIGNMENT 8
+#define IA32_GDT_TYPE_TSS 0x9
+#define IA32_GDT_ALIGNMENT 8
-#if defined (MDE_CPU_IA32)
+ #if defined (MDE_CPU_IA32)
///
/// Byte packed structure for an IA-32 Interrupt Gate Descriptor.
///
typedef union {
struct {
- UINT32 OffsetLow:16; ///< Offset bits 15..0.
- UINT32 Selector:16; ///< Selector.
- UINT32 Reserved_0:8; ///< Reserved.
- UINT32 GateType:8; ///< Gate Type. See #defines above.
- UINT32 OffsetHigh:16; ///< Offset bits 31..16.
+ UINT32 OffsetLow : 16; ///< Offset bits 15..0.
+ UINT32 Selector : 16; ///< Selector.
+ UINT32 Reserved_0 : 8; ///< Reserved.
+ UINT32 GateType : 8; ///< Gate Type. See #defines above.
+ UINT32 OffsetHigh : 16; ///< Offset bits 31..16.
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_IDT_GATE_DESCRIPTOR;
-#pragma pack (1)
+ #pragma pack (1)
//
// IA32 Task-State Segment Definition
//
@@ -5174,46 +5071,46 @@ typedef struct {
typedef union {
struct {
- UINT32 LimitLow:16; ///< Segment Limit 15..00
- UINT32 BaseLow:16; ///< Base Address 15..00
- UINT32 BaseMid:8; ///< Base Address 23..16
- UINT32 Type:4; ///< Type (1 0 B 1)
- UINT32 Reserved_43:1; ///< 0
- UINT32 DPL:2; ///< Descriptor Privilege Level
- UINT32 P:1; ///< Segment Present
- UINT32 LimitHigh:4; ///< Segment Limit 19..16
- UINT32 AVL:1; ///< Available for use by system software
- UINT32 Reserved_52:2; ///< 0 0
- UINT32 G:1; ///< Granularity
- UINT32 BaseHigh:8; ///< Base Address 31..24
+ UINT32 LimitLow : 16; ///< Segment Limit 15..00
+ UINT32 BaseLow : 16; ///< Base Address 15..00
+ UINT32 BaseMid : 8; ///< Base Address 23..16
+ UINT32 Type : 4; ///< Type (1 0 B 1)
+ UINT32 Reserved_43 : 1; ///< 0
+ UINT32 DPL : 2; ///< Descriptor Privilege Level
+ UINT32 P : 1; ///< Segment Present
+ UINT32 LimitHigh : 4; ///< Segment Limit 19..16
+ UINT32 AVL : 1; ///< Available for use by system software
+ UINT32 Reserved_52 : 2; ///< 0 0
+ UINT32 G : 1; ///< Granularity
+ UINT32 BaseHigh : 8; ///< Base Address 31..24
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_TSS_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
-#endif // defined (MDE_CPU_IA32)
+ #endif // defined (MDE_CPU_IA32)
-#if defined (MDE_CPU_X64)
+ #if defined (MDE_CPU_X64)
///
/// Byte packed structure for an x64 Interrupt Gate Descriptor.
///
typedef union {
struct {
- UINT32 OffsetLow:16; ///< Offset bits 15..0.
- UINT32 Selector:16; ///< Selector.
- UINT32 Reserved_0:8; ///< Reserved.
- UINT32 GateType:8; ///< Gate Type. See #defines above.
- UINT32 OffsetHigh:16; ///< Offset bits 31..16.
- UINT32 OffsetUpper:32; ///< Offset bits 63..32.
- UINT32 Reserved_1:32; ///< Reserved.
+ UINT32 OffsetLow : 16; ///< Offset bits 15..0.
+ UINT32 Selector : 16; ///< Selector.
+ UINT32 Reserved_0 : 8; ///< Reserved.
+ UINT32 GateType : 8; ///< Gate Type. See #defines above.
+ UINT32 OffsetHigh : 16; ///< Offset bits 31..16.
+ UINT32 OffsetUpper : 32; ///< Offset bits 63..32.
+ UINT32 Reserved_1 : 32; ///< Reserved.
} Bits;
struct {
- UINT64 Uint64;
- UINT64 Uint64_1;
+ UINT64 Uint64;
+ UINT64 Uint64_1;
} Uint128;
} IA32_IDT_GATE_DESCRIPTOR;
-#pragma pack (1)
+ #pragma pack (1)
//
// IA32 Task-State Segment Definition
//
@@ -5231,116 +5128,116 @@ typedef struct {
typedef union {
struct {
- UINT32 LimitLow:16; ///< Segment Limit 15..00
- UINT32 BaseLow:16; ///< Base Address 15..00
- UINT32 BaseMidl:8; ///< Base Address 23..16
- UINT32 Type:4; ///< Type (1 0 B 1)
- UINT32 Reserved_43:1; ///< 0
- UINT32 DPL:2; ///< Descriptor Privilege Level
- UINT32 P:1; ///< Segment Present
- UINT32 LimitHigh:4; ///< Segment Limit 19..16
- UINT32 AVL:1; ///< Available for use by system software
- UINT32 Reserved_52:2; ///< 0 0
- UINT32 G:1; ///< Granularity
- UINT32 BaseMidh:8; ///< Base Address 31..24
- UINT32 BaseHigh:32; ///< Base Address 63..32
- UINT32 Reserved_96:32; ///< Reserved
+ UINT32 LimitLow : 16; ///< Segment Limit 15..00
+ UINT32 BaseLow : 16; ///< Base Address 15..00
+ UINT32 BaseMidl : 8; ///< Base Address 23..16
+ UINT32 Type : 4; ///< Type (1 0 B 1)
+ UINT32 Reserved_43 : 1; ///< 0
+ UINT32 DPL : 2; ///< Descriptor Privilege Level
+ UINT32 P : 1; ///< Segment Present
+ UINT32 LimitHigh : 4; ///< Segment Limit 19..16
+ UINT32 AVL : 1; ///< Available for use by system software
+ UINT32 Reserved_52 : 2; ///< 0 0
+ UINT32 G : 1; ///< Granularity
+ UINT32 BaseMidh : 8; ///< Base Address 31..24
+ UINT32 BaseHigh : 32; ///< Base Address 63..32
+ UINT32 Reserved_96 : 32; ///< Reserved
} Bits;
struct {
- UINT64 Uint64;
- UINT64 Uint64_1;
+ UINT64 Uint64;
+ UINT64 Uint64_1;
} Uint128;
} IA32_TSS_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
-#endif // defined (MDE_CPU_X64)
+ #endif // defined (MDE_CPU_X64)
///
/// Byte packed structure for an FP/SSE/SSE2 context.
///
typedef struct {
- UINT8 Buffer[512];
+ UINT8 Buffer[512];
} IA32_FX_BUFFER;
///
/// Structures for the 16-bit real mode thunks.
///
typedef struct {
- UINT32 Reserved1;
- UINT32 Reserved2;
- UINT32 Reserved3;
- UINT32 Reserved4;
- UINT8 BL;
- UINT8 BH;
- UINT16 Reserved5;
- UINT8 DL;
- UINT8 DH;
- UINT16 Reserved6;
- UINT8 CL;
- UINT8 CH;
- UINT16 Reserved7;
- UINT8 AL;
- UINT8 AH;
- UINT16 Reserved8;
+ UINT32 Reserved1;
+ UINT32 Reserved2;
+ UINT32 Reserved3;
+ UINT32 Reserved4;
+ UINT8 BL;
+ UINT8 BH;
+ UINT16 Reserved5;
+ UINT8 DL;
+ UINT8 DH;
+ UINT16 Reserved6;
+ UINT8 CL;
+ UINT8 CH;
+ UINT16 Reserved7;
+ UINT8 AL;
+ UINT8 AH;
+ UINT16 Reserved8;
} IA32_BYTE_REGS;
typedef struct {
- UINT16 DI;
- UINT16 Reserved1;
- UINT16 SI;
- UINT16 Reserved2;
- UINT16 BP;
- UINT16 Reserved3;
- UINT16 SP;
- UINT16 Reserved4;
- UINT16 BX;
- UINT16 Reserved5;
- UINT16 DX;
- UINT16 Reserved6;
- UINT16 CX;
- UINT16 Reserved7;
- UINT16 AX;
- UINT16 Reserved8;
+ UINT16 DI;
+ UINT16 Reserved1;
+ UINT16 SI;
+ UINT16 Reserved2;
+ UINT16 BP;
+ UINT16 Reserved3;
+ UINT16 SP;
+ UINT16 Reserved4;
+ UINT16 BX;
+ UINT16 Reserved5;
+ UINT16 DX;
+ UINT16 Reserved6;
+ UINT16 CX;
+ UINT16 Reserved7;
+ UINT16 AX;
+ UINT16 Reserved8;
} IA32_WORD_REGS;
typedef struct {
- UINT32 EDI;
- UINT32 ESI;
- UINT32 EBP;
- UINT32 ESP;
- UINT32 EBX;
- UINT32 EDX;
- UINT32 ECX;
- UINT32 EAX;
- UINT16 DS;
- UINT16 ES;
- UINT16 FS;
- UINT16 GS;
- IA32_EFLAGS32 EFLAGS;
- UINT32 Eip;
- UINT16 CS;
- UINT16 SS;
+ UINT32 EDI;
+ UINT32 ESI;
+ UINT32 EBP;
+ UINT32 ESP;
+ UINT32 EBX;
+ UINT32 EDX;
+ UINT32 ECX;
+ UINT32 EAX;
+ UINT16 DS;
+ UINT16 ES;
+ UINT16 FS;
+ UINT16 GS;
+ IA32_EFLAGS32 EFLAGS;
+ UINT32 Eip;
+ UINT16 CS;
+ UINT16 SS;
} IA32_DWORD_REGS;
typedef union {
- IA32_DWORD_REGS E;
- IA32_WORD_REGS X;
- IA32_BYTE_REGS H;
+ IA32_DWORD_REGS E;
+ IA32_WORD_REGS X;
+ IA32_BYTE_REGS H;
} IA32_REGISTER_SET;
///
/// Byte packed structure for an 16-bit real mode thunks.
///
typedef struct {
- IA32_REGISTER_SET *RealModeState;
- VOID *RealModeBuffer;
- UINT32 RealModeBufferSize;
- UINT32 ThunkAttributes;
+ IA32_REGISTER_SET *RealModeState;
+ VOID *RealModeBuffer;
+ UINT32 RealModeBufferSize;
+ UINT32 ThunkAttributes;
} THUNK_CONTEXT;
-#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001
-#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002
-#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004
+#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004
///
/// Type definition for representing labels in NASM source code that allow for
@@ -5354,7 +5251,9 @@ typedef struct {
/// edk2 coding style for function (or pointer-to-function) typedefs. The VOID
/// return type and the VOID argument list are merely artifacts.
///
-typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID);
+typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (
+ VOID
+ );
/**
Retrieves CPUID information.
@@ -5384,14 +5283,13 @@ typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID);
UINT32
EFIAPI
AsmCpuid (
- IN UINT32 Index,
- OUT UINT32 *Eax OPTIONAL,
- OUT UINT32 *Ebx OPTIONAL,
- OUT UINT32 *Ecx OPTIONAL,
- OUT UINT32 *Edx OPTIONAL
+ IN UINT32 Index,
+ OUT UINT32 *Eax OPTIONAL,
+ OUT UINT32 *Ebx OPTIONAL,
+ OUT UINT32 *Ecx OPTIONAL,
+ OUT UINT32 *Edx OPTIONAL
);
-
/**
Retrieves CPUID information using an extended leaf identifier.
@@ -5427,15 +5325,14 @@ AsmCpuid (
UINT32
EFIAPI
AsmCpuidEx (
- IN UINT32 Index,
- IN UINT32 SubIndex,
- OUT UINT32 *Eax OPTIONAL,
- OUT UINT32 *Ebx OPTIONAL,
- OUT UINT32 *Ecx OPTIONAL,
- OUT UINT32 *Edx OPTIONAL
+ IN UINT32 Index,
+ IN UINT32 SubIndex,
+ OUT UINT32 *Eax OPTIONAL,
+ OUT UINT32 *Ebx OPTIONAL,
+ OUT UINT32 *Ecx OPTIONAL,
+ OUT UINT32 *Edx OPTIONAL
);
-
/**
Set CD bit and clear NW bit of CR0 followed by a WBINVD.
@@ -5449,7 +5346,6 @@ AsmDisableCache (
VOID
);
-
/**
Perform a WBINVD and clear both the CD and NW bits of CR0.
@@ -5463,7 +5359,6 @@ AsmEnableCache (
VOID
);
-
/**
Returns the lower 32-bits of a Machine Specific Register(MSR).
@@ -5481,10 +5376,9 @@ AsmEnableCache (
UINT32
EFIAPI
AsmReadMsr32 (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Writes a 32-bit value to a Machine Specific Register(MSR), and returns the value.
The upper 32-bits of the MSR are set to zero.
@@ -5505,11 +5399,10 @@ AsmReadMsr32 (
UINT32
EFIAPI
AsmWriteMsr32 (
- IN UINT32 Index,
- IN UINT32 Value
+ IN UINT32 Index,
+ IN UINT32 Value
);
-
/**
Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and
writes the result back to the 64-bit MSR.
@@ -5532,11 +5425,10 @@ AsmWriteMsr32 (
UINT32
EFIAPI
AsmMsrOr32 (
- IN UINT32 Index,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINT32 OrData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND on the lower 32-bits, and writes
the result back to the 64-bit MSR.
@@ -5559,11 +5451,10 @@ AsmMsrOr32 (
UINT32
EFIAPI
AsmMsrAnd32 (
- IN UINT32 Index,
- IN UINT32 AndData
+ IN UINT32 Index,
+ IN UINT32 AndData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR
on the lower 32-bits, and writes the result back to the 64-bit MSR.
@@ -5589,12 +5480,11 @@ AsmMsrAnd32 (
UINT32
EFIAPI
AsmMsrAndThenOr32 (
- IN UINT32 Index,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Reads a bit field of an MSR.
@@ -5620,12 +5510,11 @@ AsmMsrAndThenOr32 (
UINT32
EFIAPI
AsmMsrBitFieldRead32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an MSR.
@@ -5654,13 +5543,12 @@ AsmMsrBitFieldRead32 (
UINT32
EFIAPI
AsmMsrBitFieldWrite32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 Value
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 Value
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the
result back to the bit field in the 64-bit MSR.
@@ -5691,13 +5579,12 @@ AsmMsrBitFieldWrite32 (
UINT32
EFIAPI
AsmMsrBitFieldOr32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 OrData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
result back to the bit field in the 64-bit MSR.
@@ -5728,13 +5615,12 @@ AsmMsrBitFieldOr32 (
UINT32
EFIAPI
AsmMsrBitFieldAnd32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
bitwise OR, and writes the result back to the bit field in the
@@ -5769,14 +5655,13 @@ AsmMsrBitFieldAnd32 (
UINT32
EFIAPI
AsmMsrBitFieldAndThenOr32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Returns a 64-bit Machine Specific Register(MSR).
@@ -5794,10 +5679,9 @@ AsmMsrBitFieldAndThenOr32 (
UINT64
EFIAPI
AsmReadMsr64 (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
value.
@@ -5818,11 +5702,10 @@ AsmReadMsr64 (
UINT64
EFIAPI
AsmWriteMsr64 (
- IN UINT32 Index,
- IN UINT64 Value
+ IN UINT32 Index,
+ IN UINT64 Value
);
-
/**
Reads a 64-bit MSR, performs a bitwise OR, and writes the result
back to the 64-bit MSR.
@@ -5844,11 +5727,10 @@ AsmWriteMsr64 (
UINT64
EFIAPI
AsmMsrOr64 (
- IN UINT32 Index,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINT64 OrData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND, and writes the result back to the
64-bit MSR.
@@ -5870,11 +5752,10 @@ AsmMsrOr64 (
UINT64
EFIAPI
AsmMsrAnd64 (
- IN UINT32 Index,
- IN UINT64 AndData
+ IN UINT32 Index,
+ IN UINT64 AndData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
OR, and writes the result back to the 64-bit MSR.
@@ -5899,12 +5780,11 @@ AsmMsrAnd64 (
UINT64
EFIAPI
AsmMsrAndThenOr64 (
- IN UINT32 Index,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
-
/**
Reads a bit field of an MSR.
@@ -5930,12 +5810,11 @@ AsmMsrAndThenOr64 (
UINT64
EFIAPI
AsmMsrBitFieldRead64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an MSR.
@@ -5963,13 +5842,12 @@ AsmMsrBitFieldRead64 (
UINT64
EFIAPI
AsmMsrBitFieldWrite64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 Value
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 Value
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise OR, and
writes the result back to the bit field in the 64-bit MSR.
@@ -6000,13 +5878,12 @@ AsmMsrBitFieldWrite64 (
UINT64
EFIAPI
AsmMsrBitFieldOr64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 OrData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
result back to the bit field in the 64-bit MSR.
@@ -6037,13 +5914,12 @@ AsmMsrBitFieldOr64 (
UINT64
EFIAPI
AsmMsrBitFieldAnd64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
bitwise OR, and writes the result back to the bit field in the
@@ -6077,14 +5953,13 @@ AsmMsrBitFieldAnd64 (
UINT64
EFIAPI
AsmMsrBitFieldAndThenOr64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
-
/**
Reads the current value of the EFLAGS register.
@@ -6101,7 +5976,6 @@ AsmReadEflags (
VOID
);
-
/**
Reads the current value of the Control Register 0 (CR0).
@@ -6118,7 +5992,6 @@ AsmReadCr0 (
VOID
);
-
/**
Reads the current value of the Control Register 2 (CR2).
@@ -6135,7 +6008,6 @@ AsmReadCr2 (
VOID
);
-
/**
Reads the current value of the Control Register 3 (CR3).
@@ -6152,7 +6024,6 @@ AsmReadCr3 (
VOID
);
-
/**
Reads the current value of the Control Register 4 (CR4).
@@ -6169,7 +6040,6 @@ AsmReadCr4 (
VOID
);
-
/**
Writes a value to Control Register 0 (CR0).
@@ -6187,7 +6057,6 @@ AsmWriteCr0 (
UINTN Cr0
);
-
/**
Writes a value to Control Register 2 (CR2).
@@ -6205,7 +6074,6 @@ AsmWriteCr2 (
UINTN Cr2
);
-
/**
Writes a value to Control Register 3 (CR3).
@@ -6223,7 +6091,6 @@ AsmWriteCr3 (
UINTN Cr3
);
-
/**
Writes a value to Control Register 4 (CR4).
@@ -6241,7 +6108,6 @@ AsmWriteCr4 (
UINTN Cr4
);
-
/**
Reads the current value of Debug Register 0 (DR0).
@@ -6258,7 +6124,6 @@ AsmReadDr0 (
VOID
);
-
/**
Reads the current value of Debug Register 1 (DR1).
@@ -6275,7 +6140,6 @@ AsmReadDr1 (
VOID
);
-
/**
Reads the current value of Debug Register 2 (DR2).
@@ -6292,7 +6156,6 @@ AsmReadDr2 (
VOID
);
-
/**
Reads the current value of Debug Register 3 (DR3).
@@ -6309,7 +6172,6 @@ AsmReadDr3 (
VOID
);
-
/**
Reads the current value of Debug Register 4 (DR4).
@@ -6326,7 +6188,6 @@ AsmReadDr4 (
VOID
);
-
/**
Reads the current value of Debug Register 5 (DR5).
@@ -6343,7 +6204,6 @@ AsmReadDr5 (
VOID
);
-
/**
Reads the current value of Debug Register 6 (DR6).
@@ -6360,7 +6220,6 @@ AsmReadDr6 (
VOID
);
-
/**
Reads the current value of Debug Register 7 (DR7).
@@ -6377,7 +6236,6 @@ AsmReadDr7 (
VOID
);
-
/**
Writes a value to Debug Register 0 (DR0).
@@ -6395,7 +6253,6 @@ AsmWriteDr0 (
UINTN Dr0
);
-
/**
Writes a value to Debug Register 1 (DR1).
@@ -6413,7 +6270,6 @@ AsmWriteDr1 (
UINTN Dr1
);
-
/**
Writes a value to Debug Register 2 (DR2).
@@ -6431,7 +6287,6 @@ AsmWriteDr2 (
UINTN Dr2
);
-
/**
Writes a value to Debug Register 3 (DR3).
@@ -6449,7 +6304,6 @@ AsmWriteDr3 (
UINTN Dr3
);
-
/**
Writes a value to Debug Register 4 (DR4).
@@ -6467,7 +6321,6 @@ AsmWriteDr4 (
UINTN Dr4
);
-
/**
Writes a value to Debug Register 5 (DR5).
@@ -6485,7 +6338,6 @@ AsmWriteDr5 (
UINTN Dr5
);
-
/**
Writes a value to Debug Register 6 (DR6).
@@ -6503,7 +6355,6 @@ AsmWriteDr6 (
UINTN Dr6
);
-
/**
Writes a value to Debug Register 7 (DR7).
@@ -6521,7 +6372,6 @@ AsmWriteDr7 (
UINTN Dr7
);
-
/**
Reads the current value of Code Segment Register (CS).
@@ -6537,7 +6387,6 @@ AsmReadCs (
VOID
);
-
/**
Reads the current value of Data Segment Register (DS).
@@ -6553,7 +6402,6 @@ AsmReadDs (
VOID
);
-
/**
Reads the current value of Extra Segment Register (ES).
@@ -6569,7 +6417,6 @@ AsmReadEs (
VOID
);
-
/**
Reads the current value of FS Data Segment Register (FS).
@@ -6585,7 +6432,6 @@ AsmReadFs (
VOID
);
-
/**
Reads the current value of GS Data Segment Register (GS).
@@ -6601,7 +6447,6 @@ AsmReadGs (
VOID
);
-
/**
Reads the current value of Stack Segment Register (SS).
@@ -6617,7 +6462,6 @@ AsmReadSs (
VOID
);
-
/**
Reads the current value of Task Register (TR).
@@ -6633,7 +6477,6 @@ AsmReadTr (
VOID
);
-
/**
Reads the current Global Descriptor Table Register(GDTR) descriptor.
@@ -6648,10 +6491,9 @@ AsmReadTr (
VOID
EFIAPI
AsmReadGdtr (
- OUT IA32_DESCRIPTOR *Gdtr
+ OUT IA32_DESCRIPTOR *Gdtr
);
-
/**
Writes the current Global Descriptor Table Register (GDTR) descriptor.
@@ -6666,10 +6508,9 @@ AsmReadGdtr (
VOID
EFIAPI
AsmWriteGdtr (
- IN CONST IA32_DESCRIPTOR *Gdtr
+ IN CONST IA32_DESCRIPTOR *Gdtr
);
-
/**
Reads the current Interrupt Descriptor Table Register(IDTR) descriptor.
@@ -6684,10 +6525,9 @@ AsmWriteGdtr (
VOID
EFIAPI
AsmReadIdtr (
- OUT IA32_DESCRIPTOR *Idtr
+ OUT IA32_DESCRIPTOR *Idtr
);
-
/**
Writes the current Interrupt Descriptor Table Register(IDTR) descriptor.
@@ -6702,10 +6542,9 @@ AsmReadIdtr (
VOID
EFIAPI
AsmWriteIdtr (
- IN CONST IA32_DESCRIPTOR *Idtr
+ IN CONST IA32_DESCRIPTOR *Idtr
);
-
/**
Reads the current Local Descriptor Table Register(LDTR) selector.
@@ -6721,7 +6560,6 @@ AsmReadLdtr (
VOID
);
-
/**
Writes the current Local Descriptor Table Register (LDTR) selector.
@@ -6734,10 +6572,9 @@ AsmReadLdtr (
VOID
EFIAPI
AsmWriteLdtr (
- IN UINT16 Ldtr
+ IN UINT16 Ldtr
);
-
/**
Save the current floating point/SSE/SSE2 context to a buffer.
@@ -6754,10 +6591,9 @@ AsmWriteLdtr (
VOID
EFIAPI
AsmFxSave (
- OUT IA32_FX_BUFFER *Buffer
+ OUT IA32_FX_BUFFER *Buffer
);
-
/**
Restores the current floating point/SSE/SSE2 context from a buffer.
@@ -6775,10 +6611,9 @@ AsmFxSave (
VOID
EFIAPI
AsmFxRestore (
- IN CONST IA32_FX_BUFFER *Buffer
+ IN CONST IA32_FX_BUFFER *Buffer
);
-
/**
Reads the current value of 64-bit MMX Register #0 (MM0).
@@ -6794,7 +6629,6 @@ AsmReadMm0 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #1 (MM1).
@@ -6810,7 +6644,6 @@ AsmReadMm1 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #2 (MM2).
@@ -6826,7 +6659,6 @@ AsmReadMm2 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #3 (MM3).
@@ -6842,7 +6674,6 @@ AsmReadMm3 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #4 (MM4).
@@ -6858,7 +6689,6 @@ AsmReadMm4 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #5 (MM5).
@@ -6874,7 +6704,6 @@ AsmReadMm5 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #6 (MM6).
@@ -6890,7 +6719,6 @@ AsmReadMm6 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #7 (MM7).
@@ -6906,7 +6734,6 @@ AsmReadMm7 (
VOID
);
-
/**
Writes the current value of 64-bit MMX Register #0 (MM0).
@@ -6919,10 +6746,9 @@ AsmReadMm7 (
VOID
EFIAPI
AsmWriteMm0 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #1 (MM1).
@@ -6935,10 +6761,9 @@ AsmWriteMm0 (
VOID
EFIAPI
AsmWriteMm1 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #2 (MM2).
@@ -6951,10 +6776,9 @@ AsmWriteMm1 (
VOID
EFIAPI
AsmWriteMm2 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #3 (MM3).
@@ -6967,10 +6791,9 @@ AsmWriteMm2 (
VOID
EFIAPI
AsmWriteMm3 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #4 (MM4).
@@ -6983,10 +6806,9 @@ AsmWriteMm3 (
VOID
EFIAPI
AsmWriteMm4 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #5 (MM5).
@@ -6999,10 +6821,9 @@ AsmWriteMm4 (
VOID
EFIAPI
AsmWriteMm5 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #6 (MM6).
@@ -7015,10 +6836,9 @@ AsmWriteMm5 (
VOID
EFIAPI
AsmWriteMm6 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #7 (MM7).
@@ -7031,10 +6851,9 @@ AsmWriteMm6 (
VOID
EFIAPI
AsmWriteMm7 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Reads the current value of Time Stamp Counter (TSC).
@@ -7050,7 +6869,6 @@ AsmReadTsc (
VOID
);
-
/**
Reads the current value of a Performance Counter (PMC).
@@ -7065,10 +6883,9 @@ AsmReadTsc (
UINT64
EFIAPI
AsmReadPmc (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Sets up a monitor buffer that is used by AsmMwait().
@@ -7088,12 +6905,11 @@ AsmReadPmc (
UINTN
EFIAPI
AsmMonitor (
- IN UINTN Eax,
- IN UINTN Ecx,
- IN UINTN Edx
+ IN UINTN Eax,
+ IN UINTN Ecx,
+ IN UINTN Edx
);
-
/**
Executes an MWAIT instruction.
@@ -7111,11 +6927,10 @@ AsmMonitor (
UINTN
EFIAPI
AsmMwait (
- IN UINTN Eax,
- IN UINTN Ecx
+ IN UINTN Eax,
+ IN UINTN Ecx
);
-
/**
Executes a WBINVD instruction.
@@ -7129,7 +6944,6 @@ AsmWbinvd (
VOID
);
-
/**
Executes a INVD instruction.
@@ -7143,7 +6957,6 @@ AsmInvd (
VOID
);
-
/**
Flushes a cache line from all the instruction and data caches within the
coherency domain of the CPU.
@@ -7162,10 +6975,9 @@ AsmInvd (
VOID *
EFIAPI
AsmFlushCacheLine (
- IN VOID *LinearAddress
+ IN VOID *LinearAddress
);
-
/**
Enables the 32-bit paging mode on the CPU.
@@ -7212,7 +7024,6 @@ AsmEnablePaging32 (
IN VOID *NewStack
);
-
/**
Disables the 32-bit paging mode on the CPU.
@@ -7256,7 +7067,6 @@ AsmDisablePaging32 (
IN VOID *NewStack
);
-
/**
Enables the 64-bit paging mode on the CPU.
@@ -7292,14 +7102,13 @@ AsmDisablePaging32 (
VOID
EFIAPI
AsmEnablePaging64 (
- IN UINT16 Cs,
- IN UINT64 EntryPoint,
- IN UINT64 Context1 OPTIONAL,
- IN UINT64 Context2 OPTIONAL,
- IN UINT64 NewStack
+ IN UINT16 Cs,
+ IN UINT64 EntryPoint,
+ IN UINT64 Context1 OPTIONAL,
+ IN UINT64 Context2 OPTIONAL,
+ IN UINT64 NewStack
);
-
/**
Disables the 64-bit paging mode on the CPU.
@@ -7333,14 +7142,13 @@ AsmEnablePaging64 (
VOID
EFIAPI
AsmDisablePaging64 (
- IN UINT16 Cs,
- IN UINT32 EntryPoint,
- IN UINT32 Context1 OPTIONAL,
- IN UINT32 Context2 OPTIONAL,
- IN UINT32 NewStack
+ IN UINT16 Cs,
+ IN UINT32 EntryPoint,
+ IN UINT32 Context1 OPTIONAL,
+ IN UINT32 Context2 OPTIONAL,
+ IN UINT32 NewStack
);
-
//
// 16-bit thunking services
//
@@ -7369,11 +7177,10 @@ AsmDisablePaging64 (
VOID
EFIAPI
AsmGetThunk16Properties (
- OUT UINT32 *RealModeBufferSize,
- OUT UINT32 *ExtraStackSize
+ OUT UINT32 *RealModeBufferSize,
+ OUT UINT32 *ExtraStackSize
);
-
/**
Prepares all structures a code required to use AsmThunk16().
@@ -7391,10 +7198,9 @@ AsmGetThunk16Properties (
VOID
EFIAPI
AsmPrepareThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
-
/**
Transfers control to a 16-bit real mode entry point and returns the results.
@@ -7451,10 +7257,9 @@ AsmPrepareThunk16 (
VOID
EFIAPI
AsmThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
-
/**
Prepares all structures and code for a 16-bit real mode thunk, transfers
control to a 16-bit real mode entry point, and returns the results.
@@ -7478,7 +7283,7 @@ AsmThunk16 (
VOID
EFIAPI
AsmPrepareAndThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
/**
@@ -7495,7 +7300,7 @@ AsmPrepareAndThunk16 (
BOOLEAN
EFIAPI
AsmRdRand16 (
- OUT UINT16 *Rand
+ OUT UINT16 *Rand
);
/**
@@ -7512,7 +7317,7 @@ AsmRdRand16 (
BOOLEAN
EFIAPI
AsmRdRand32 (
- OUT UINT32 *Rand
+ OUT UINT32 *Rand
);
/**
@@ -7529,7 +7334,7 @@ AsmRdRand32 (
BOOLEAN
EFIAPI
AsmRdRand64 (
- OUT UINT64 *Rand
+ OUT UINT64 *Rand
);
/**
@@ -7540,7 +7345,7 @@ AsmRdRand64 (
VOID
EFIAPI
AsmWriteTr (
- IN UINT16 Selector
+ IN UINT16 Selector
);
/**
@@ -7609,7 +7414,6 @@ AsmVmgExit (
VOID
);
-
/**
Patch the immediate operand of an IA32 or X64 instruction such that the byte,
word, dword or qword operand is encoded at the end of the instruction's
@@ -7647,9 +7451,9 @@ AsmVmgExit (
VOID
EFIAPI
PatchInstructionX86 (
- OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
- IN UINT64 PatchValue,
- IN UINTN ValueSize
+ OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
+ IN UINT64 PatchValue,
+ IN UINTN ValueSize
);
#endif // defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)