24 #if defined (MDE_CPU_IA32) 36 } BASE_LIBRARY_JUMP_BUFFER;
38 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 40 #endif // defined (MDE_CPU_IA32) 42 #if defined (MDE_CPU_X64) 60 } BASE_LIBRARY_JUMP_BUFFER;
62 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 64 #endif // defined (MDE_CPU_X64) 66 #if defined (MDE_CPU_EBC) 76 } BASE_LIBRARY_JUMP_BUFFER;
78 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 80 #endif // defined (MDE_CPU_EBC) 82 #if defined (MDE_CPU_ARM) 96 } BASE_LIBRARY_JUMP_BUFFER;
98 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 100 #endif // defined (MDE_CPU_ARM) 102 #if defined (MDE_CPU_AARCH64) 128 } BASE_LIBRARY_JUMP_BUFFER;
130 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 149 #define ARM_ID_AA64ISAR0_EL1_AES_SHIFT (4U) 150 #define ARM_ID_AA64ISAR0_EL1_SHA1_SHIFT (8U) 151 #define ARM_ID_AA64ISAR0_EL1_SHA2_SHIFT (12U) 152 #define ARM_ID_AA64ISAR0_EL1_CRC32_SHIFT (16U) 153 #define ARM_ID_AA64ISAR0_EL1_ATOMIC_SHIFT (20U) 154 #define ARM_ID_AA64ISAR0_EL1_RDM_SHIFT (28U) 155 #define ARM_ID_AA64ISAR0_EL1_SHA3_SHIFT (32U) 156 #define ARM_ID_AA64ISAR0_EL1_SM3_SHIFT (36U) 157 #define ARM_ID_AA64ISAR0_EL1_SM4_SHIFT (40U) 158 #define ARM_ID_AA64ISAR0_EL1_DP_SHIFT (44U) 159 #define ARM_ID_AA64ISAR0_EL1_FHM_SHIFT (48U) 160 #define ARM_ID_AA64ISAR0_EL1_TS_SHIFT (52U) 161 #define ARM_ID_AA64ISAR0_EL1_TLB_SHIFT (56U) 162 #define ARM_ID_AA64ISAR0_EL1_RNDR_SHIFT (60U) 167 #define ARM_ID_AA64ISAR0_EL1_AES_MASK (0xFU) 168 #define ARM_ID_AA64ISAR0_EL1_SHA1_MASK (0xFU) 169 #define ARM_ID_AA64ISAR0_EL1_SHA2_MASK (0xFU) 170 #define ARM_ID_AA64ISAR0_EL1_CRC32_MASK (0xFU) 171 #define ARM_ID_AA64ISAR0_EL1_ATOMIC_MASK (0xFU) 172 #define ARM_ID_AA64ISAR0_EL1_RDM_MASK (0xFU) 173 #define ARM_ID_AA64ISAR0_EL1_SHA3_MASK (0xFU) 174 #define ARM_ID_AA64ISAR0_EL1_SM3_MASK (0xFU) 175 #define ARM_ID_AA64ISAR0_EL1_SM4_MASK (0xFU) 176 #define ARM_ID_AA64ISAR0_EL1_DP_MASK (0xFU) 177 #define ARM_ID_AA64ISAR0_EL1_FHM_MASK (0xFU) 178 #define ARM_ID_AA64ISAR0_EL1_TS_MASK (0xFU) 179 #define ARM_ID_AA64ISAR0_EL1_TLB_MASK (0xFU) 180 #define ARM_ID_AA64ISAR0_EL1_RNDR_MASK (0xFU) 185 #define ARM_ID_AA64ISAR0_EL1_AES_FEAT_AES_MASK (0x1U) 186 #define ARM_ID_AA64ISAR0_EL1_AES_FEAT_PMULL_MASK (0x2U) 187 #define ARM_ID_AA64ISAR0_EL1_SHA1_FEAT_SHA1_MASK (0x1U) 188 #define ARM_ID_AA64ISAR0_EL1_SHA2_FEAT_SHA256_MASK (0x1U) 189 #define ARM_ID_AA64ISAR0_EL1_SHA2_FEAT_SHA512_MASK (0x2U) 190 #define ARM_ID_AA64ISAR0_EL1_CRC32_HAVE_CRC32_MASK (0x1U) 191 #define ARM_ID_AA64ISAR0_EL1_ATOMIC_FEAT_LSE_MASK (0x2U) 192 #define ARM_ID_AA64ISAR0_EL1_RDM_FEAT_RDM_MASK (0x1U) 193 #define ARM_ID_AA64ISAR0_EL1_SHA3_FEAT_SHA3_MASK (0x1U) 194 #define ARM_ID_AA64ISAR0_EL1_SM3_FEAT_SM3_MASK (0x1U) 195 #define ARM_ID_AA64ISAR0_EL1_SM4_FEAT_SM4_MASK (0x1U) 196 #define ARM_ID_AA64ISAR0_EL1_DP_FEAT_DOTPROD_MASK (0x1U) 197 #define ARM_ID_AA64ISAR0_EL1_FHM_FEAT_FHM_MASK (0x1U) 198 #define ARM_ID_AA64ISAR0_EL1_TS_FEAT_FLAGM_MASK (0x1U) 199 #define ARM_ID_AA64ISAR0_EL1_TS_FEAT_FLAGM2_MASK (0x2U) 200 #define ARM_ID_AA64ISAR0_EL1_TLB_FEAT_TLBIOS_MASK (0x1U) 201 #define ARM_ID_AA64ISAR0_EL1_TLB_FEAT_TLBIRANGE_MASK (0x2U) 202 #define ARM_ID_AA64ISAR0_EL1_RNDR_FEAT_RNG_MASK (0x1U) 214 ArmReadIdAA64Isar0Reg (
218 #endif // defined (MDE_CPU_AARCH64) 220 #if defined (MDE_CPU_RISCV64) 239 } BASE_LIBRARY_JUMP_BUFFER;
241 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 244 RiscVSetSupervisorScratch (
249 RiscVGetSupervisorScratch (
254 RiscVSetSupervisorStvec (
259 RiscVGetSupervisorStvec (
264 RiscVGetSupervisorTrapCause (
269 RiscVSetSupervisorAddressTranslationRegister (
274 RiscVGetSupervisorAddressTranslationRegister (
284 RiscVSetSupervisorTimeCompareRegister (
289 RiscVEnableTimerInterrupt (
294 RiscVDisableTimerInterrupt (
299 RiscVClearPendingTimerInterrupt (
309 RiscVInvalidateInstCacheFenceAsm (
319 RiscVInvalidateDataCacheFenceAsm (
330 RiscVCpuCacheFlushCmoAsm (
342 RiscVCpuCacheCleanCmoAsm (
352 RiscVCpuCacheInvalCmoAsm (
356 #endif // defined (MDE_CPU_RISCV64) 358 #if defined (MDE_CPU_LOONGARCH64) 375 } BASE_LIBRARY_JUMP_BUFFER;
377 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 385 SetExceptionBaseAddress (
395 SetTlbRebaseAddress (
405 EnableLocalInterrupts (
415 DisableLocalInterrupts (
439 AsmReadStableCounter (
600 #endif // defined (MDE_CPU_LOONGARCH64) 1835 #define GUID_STRING_LENGTH 36 2906 #define INITIALIZE_LIST_HEAD_VARIABLE(ListHead) {&(ListHead), &(ListHead)} 2915 #define BASE_LIST_FOR_EACH(Entry, ListHead) \ 2916 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink) 2931 #define BASE_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \ 2932 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\ 2933 Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink) 4973 #define CRC16ANSI_INIT 0xffff 5064 OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
5086 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
5326 #if defined (MDE_CPU_X64) 5331 PvalidatePageSize4K = 0,
5332 PvalidatePageSize2MB,
5333 } PVALIDATE_PAGE_SIZE;
5338 #define PVALIDATE_RET_SUCCESS 0 5339 #define PVALIDATE_RET_FAIL_INPUT 1 5340 #define PVALIDATE_RET_SIZE_MISMATCH 6 5345 #define PVALIDATE_RET_NO_RMPUPDATE 255 5370 IN PVALIDATE_PAGE_SIZE PageSize,
5378 #define RMPADJUST_VMPL_MAX 3 5379 #define RMPADJUST_VMPL_MASK 0xFF 5380 #define RMPADJUST_VMPL_SHIFT 0 5381 #define RMPADJUST_PERMISSION_MASK_MASK 0xFF 5382 #define RMPADJUST_PERMISSION_MASK_SHIFT 8 5383 #define RMPADJUST_VMSA_PAGE_BIT BIT16 5412 #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) 5555 } IA32_SEGMENT_DESCRIPTOR;
5567 #define IA32_IDT_GATE_TYPE_TASK 0x85 5568 #define IA32_IDT_GATE_TYPE_INTERRUPT_16 0x86 5569 #define IA32_IDT_GATE_TYPE_TRAP_16 0x87 5570 #define IA32_IDT_GATE_TYPE_INTERRUPT_32 0x8E 5571 #define IA32_IDT_GATE_TYPE_TRAP_32 0x8F 5573 #define IA32_GDT_TYPE_TSS 0x9 5574 #define IA32_GDT_ALIGNMENT 8 5576 #if defined (MDE_CPU_IA32) 5589 } IA32_IDT_GATE_DESCRIPTOR;
5630 UINT16 LDTSegmentSelector;
5634 } IA32_TASK_STATE_SEGMENT;
5652 } IA32_TSS_DESCRIPTOR;
5655 #endif // defined (MDE_CPU_IA32) 5657 #if defined (MDE_CPU_X64) 5675 } IA32_IDT_GATE_DESCRIPTOR;
5691 } IA32_TASK_STATE_SEGMENT;
5714 } IA32_TSS_DESCRIPTOR;
5717 #endif // defined (MDE_CPU_X64) 5780 IA32_EFLAGS32 EFLAGS;
5790 } IA32_REGISTER_SET;
5796 IA32_REGISTER_SET *RealModeState;
5797 VOID *RealModeBuffer;
5798 UINT32 RealModeBufferSize;
5802 #define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001 5803 #define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002 5804 #define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004 5818 typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (
6076 AsmMsrBitFieldRead32 (
6109 AsmMsrBitFieldWrite32 (
6145 AsmMsrBitFieldOr32 (
6181 AsmMsrBitFieldAnd32 (
6221 AsmMsrBitFieldAndThenOr32 (
6376 AsmMsrBitFieldRead64 (
6408 AsmMsrBitFieldWrite64 (
6444 AsmMsrBitFieldOr64 (
6480 AsmMsrBitFieldAnd64 (
6519 AsmMsrBitFieldAndThenOr64 (
7058 OUT IA32_DESCRIPTOR *Gdtr
7075 IN CONST IA32_DESCRIPTOR *Gdtr
7092 OUT IA32_DESCRIPTOR *Idtr
7109 IN CONST IA32_DESCRIPTOR *Idtr
7627 AsmDisablePaging32 (
7708 AsmDisablePaging64 (
7743 AsmGetThunk16Properties (
7765 IN OUT THUNK_CONTEXT *ThunkContext
7824 IN OUT THUNK_CONTEXT *ThunkContext
7849 AsmPrepareAndThunk16 (
7850 IN OUT THUNK_CONTEXT *ThunkContext
8017 IN OUT SVSM_CALL_DATA *SvsmCallData
8056 PatchInstructionX86 (
8057 OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
8062 #endif // defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) 8063 #endif // !defined (__BASE_LIB__) UINTN EFIAPI AsciiStrnSizeS(IN CONST CHAR8 *String, IN UINTN MaxSize)
Returns the size of a Null-terminated Ascii string in bytes, including the Null terminator.
LIST_ENTRY *EFIAPI InsertTailList(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 doubl...
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
Compares two Null-terminated ASCII strings, and returns the difference between the first mismatched A...
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
BOOLEAN EFIAPI TdIsEnabled(VOID)
Probe if TD is enabled.
BOOLEAN EFIAPI SaveAndDisableInterrupts(VOID)
Disables CPU interrupts and returns the interrupt state prior to the disable operation.
RETURN_STATUS EFIAPI StrDecimalToUintnS(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINTN *Data)
Convert a Null-terminated Unicode decimal string to a value of type UINTN.
RETURN_STATUS EFIAPI AsciiStrDecimalToUint64S(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINT64 *Data)
Convert a Null-terminated Ascii decimal string to a value of type UINT64.
UINT16 EFIAPI BitFieldOr16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the result.
UINTN EFIAPI StrnSizeS(IN CONST CHAR16 *String, IN UINTN MaxSize)
Returns the size of a Null-terminated Unicode string in bytes, including the Null terminator.
UINTN EFIAPI AsciiStrnLenS(IN CONST CHAR8 *String, IN UINTN MaxSize)
Returns the length of a Null-terminated Ascii string.
RETURN_STATUS EFIAPI StrDecimalToUint64S(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINT64 *Data)
Convert a Null-terminated Unicode decimal string to a value of type UINT64.
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
Reads a 64-bit value from memory that may be unaligned.
UINT8 EFIAPI BitFieldCountOnes64(IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit)
Reads a bit field from a 64-bit value, counts and returns the number of set bits.
UINT64 EFIAPI BitFieldOr64(IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 OrData)
Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the result.
INT64 EFIAPI MultS64x64(IN INT64 Multiplicand, IN INT64 Multiplier)
Multiples a 64-bit signed integer by a 64-bit signed integer and generates a 64-bit signed result.
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
Returns the size of a Null-terminated Unicode string in bytes, including the Null terminator.
UINT32 EFIAPI BitFieldAndThenOr32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
Reads a bit field from a 32-bit value, performs a bitwise AND followed by a bitwise OR,...
UINTN EFIAPI StrnLenS(IN CONST CHAR16 *String, IN UINTN MaxSize)
Returns the length of a Null-terminated Unicode string.
INTN EFIAPI LowBitSet32(IN UINT32 Operand)
Returns the bit position of the lowest bit set in a 32-bit value.
RETURN_STATUS EFIAPI AsciiStrnToUnicodeStrS(IN CONST CHAR8 *Source, IN UINTN Length, OUT CHAR16 *Destination, IN UINTN DestMax, OUT UINTN *DestinationLength)
Convert not more than Length successive characters from a Null-terminated Ascii string to a Null-term...
UINT32 EFIAPI GetPowerOfTwo32(IN UINT32 Operand)
Returns the value of the highest bit set in a 32-bit value.
BOOLEAN EFIAPI IsNodeInList(IN CONST LIST_ENTRY *FirstEntry, IN CONST LIST_ENTRY *SecondEntry)
Checks whether FirstEntry and SecondEntry are part of the same doubly-linked list.
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
Reads a 16-bit value from memory that may be unaligned.
128 bit buffer containing a unique identifier value.
UINT8 EFIAPI CalculateSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
Returns the sum of all elements in a buffer in unit of UINT8.
RETURN_STATUS EFIAPI UnicodeStrnToAsciiStrS(IN CONST CHAR16 *Source, IN UINTN Length, OUT CHAR8 *Destination, IN UINTN DestMax, OUT UINTN *DestinationLength)
Convert not more than Length successive characters from a Null-terminated Unicode string to a Null-te...
UINT64 EFIAPI DivU64x32(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...
UINTN EFIAPI AsciiStrDecimalToUintn(IN CONST CHAR8 *String)
Convert a Null-terminated ASCII decimal string to a value of type UINTN.
RETURN_STATUS EFIAPI AsciiStrnCatS(IN OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
Appends not more than Length successive char from the string pointed to by Source to the end of the s...
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
Returns the first occurrence of a Null-terminated Unicode sub-string in a Null-terminated Unicode str...
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
Initializes the head node of a doubly linked list, and returns the pointer to the head node of the do...
VOID EFIAPI CpuDeadLoop(VOID)
Executes an infinite loop.
BOOLEAN EFIAPI IsNodeAtEnd(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
Determines if a node the last node in a doubly linked list.
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned resu...
UINT64 EFIAPI MultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned resu...
UINT32 EFIAPI ReadUnaligned24(IN CONST UINT32 *Buffer)
Reads a 24-bit value from memory that may be unaligned.
UINT32 EFIAPI ModU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 32-bit unsigned remain...
VOID EFIAPI LongJump(IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value)
Restores the CPU context that was saved with SetJump().
INT64 INTN
Signed value of native width.
RETURN_STATUS EFIAPI StrHexToUint64S(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINT64 *Data)
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
Compares two Null-terminated ASCII strings with maximum lengths, and returns the difference between t...
INTN EFIAPI HighBitSet32(IN UINT32 Operand)
Returns the bit position of the highest bit set in a 32-bit value.
RETURN_STATUS EFIAPI Base64Decode(IN CONST CHAR8 *Source OPTIONAL, IN UINTN SourceSize, OUT UINT8 *Destination OPTIONAL, IN OUT UINTN *DestinationSize)
Decode Base64 ASCII encoded data to 8-bit binary representation, based on RFC4648.
UINT16 EFIAPI CalculateCrc16Ansi(IN CONST VOID *Buffer, IN UINTN Length, IN UINT16 InitialValue)
Calculates the CRC16-ANSI checksum of the given buffer.
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
Convert one Null-terminated ASCII string to a Null-terminated Unicode string.
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
Checks to see if a doubly linked list is empty or not.
LIST_ENTRY *EFIAPI SwapListEntries(IN OUT LIST_ENTRY *FirstEntry, IN OUT LIST_ENTRY *SecondEntry)
Swaps the location of two nodes in a doubly linked list, and returns the first node after the swap.
UINT32 EFIAPI BitFieldRead32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit)
Returns a bit field from a 32-bit value.
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
Retrieves the next node of a doubly linked list.
UINTN EFIAPI TdVmCall(IN UINT64 Leaf, IN UINT64 Arg1, IN UINT64 Arg2, IN UINT64 Arg3, IN UINT64 Arg4, IN OUT VOID *Results)
TDVMALL is a leaf function 0 for TDCALL.
UINT32 EFIAPI CalculateCrc32(IN VOID *Buffer, IN UINTN Length)
Computes and returns a 32-bit CRC for a data buffer.
VOID EFIAPI EnableDisableInterrupts(VOID)
Enables CPU interrupts for the smallest window required to capture any pending interrupts.
UINT8 EFIAPI DecimalToBcd8(IN UINT8 Value)
Converts an 8-bit value to an 8-bit BCD value.
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
Copies the string pointed to by Source (including the terminating null char) to the array pointed to ...
UINT8_t Length
Length of this structure.
UINTN EFIAPI StrDecimalToUintn(IN CONST CHAR16 *String)
Convert a Null-terminated Unicode decimal string to a value of type UINTN.
UINT64 EFIAPI BitFieldWrite64(IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 Value)
Writes a bit field to a 64-bit value, and returns the result.
INTN EFIAPI AsciiStriCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
Performs a case insensitive comparison of two Null-terminated ASCII strings, and returns the differen...
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
Determines if a node in a doubly linked list is the head node of a the same doubly linked list.
UINT16 EFIAPI BitFieldAnd16(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, and returns the result.
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
Appends a copy of the string pointed to by Source (including the terminating null char) to the end of...
OFF16_t DI
di register as passed to the Option ROM initialisation routine.
VOID EFIAPI EnableInterrupts(VOID)
Enables CPU interrupts.
RETURN_STATUS EFIAPI AsciiStrHexToUintnS(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINTN *Data)
Convert a Null-terminated Ascii hexadecimal string to a value of type UINTN.
INTN(EFIAPI * BASE_SORT_COMPARE)(IN CONST VOID *Buffer1, IN CONST VOID *Buffer2)
Prototype for comparison function for any two element types.
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
Writes a 32-bit value to memory that may be unaligned.
UINT64 EFIAPI BitFieldAndThenOr64(IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData, IN UINT64 OrData)
Reads a bit field from a 64-bit value, performs a bitwise AND followed by a bitwise OR,...
SEGSEL_t ES
es register as passed to the Option ROM initialisation routine.
static u16 S(u16 v)
Perform S-box mapping on a 16-bit value.
UINT16 EFIAPI BitFieldAndThenOr16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
Reads a bit field from a 16-bit value, performs a bitwise AND followed by a bitwise OR,...
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
Function entry point used when a stack switch is requested with SwitchStack()
UINT8 EFIAPI BitFieldOr8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the result.
BOOLEAN EFIAPI PathRemoveLastItem(IN OUT CHAR16 *Path)
Removes the last directory or file entry in a path.
UINT16 EFIAPI CalculateSum16(IN CONST UINT16 *Buffer, IN UINTN Length)
Returns the sum of all elements in a buffer of 16-bit values.
LIST_ENTRY *EFIAPI GetPreviousNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
Retrieves the previous node of a doubly linked list.
UINT16 EFIAPI CalculateCheckSum16(IN CONST UINT16 *Buffer, IN UINTN Length)
Returns the two's complement checksum of all elements in a buffer of 16-bit values.
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
Compares two Null-terminated Unicode strings, and returns the difference between the first mismatched...
UINT16_t DX
dx register as passed to the Option ROM initialisation routine.
UINT32 EFIAPI BitFieldOr32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the result.
UINT64 EFIAPI StrDecimalToUint64(IN CONST CHAR16 *String)
Convert a Null-terminated Unicode decimal string to a value of type UINT64.
VOID EFIAPI SwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack,...)
Transfers control to a function starting with a new stack.
UINT8 EFIAPI BcdToDecimal8(IN UINT8 Value)
Converts an 8-bit BCD value to an 8-bit value.
FILE_LICENCE(BSD2_PATENT)
UINT64 EFIAPI AsciiStrHexToUint64(IN CONST CHAR8 *String)
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
BOOLEAN EFIAPI GetInterruptState(VOID)
Retrieves the current CPU interrupt state.
UINT32 EFIAPI BitFieldAnd32(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, and returns the result.
UINT32 EFIAPI CalculateSum32(IN CONST UINT32 *Buffer, IN UINTN Length)
Returns the sum of all elements in a buffer of 32-bit values.
RETURN_STATUS EFIAPI AsciiStrDecimalToUintnS(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINTN *Data)
Convert a Null-terminated Ascii decimal string to a value of type UINTN.
PACKED struct @531::@545 Bits
UINT32 EFIAPI WriteUnaligned24(OUT UINT32 *Buffer, IN UINT32 Value)
Writes a 24-bit value to memory that may be unaligned.
UINT64 EFIAPI GetPowerOfTwo64(IN UINT64 Operand)
Returns the value of the highest bit set in a 64-bit value.
SEGOFF16_t Buffer
Buffer address.
RETURN_STATUS EFIAPI AsciiStrToIpv6Address(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT IPv6_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
Convert a Null-terminated ASCII string to IPv6 address and prefix length.
UINT64 EFIAPI BitFieldRead64(IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit)
Returns a bit field from a 64-bit value.
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
Convert a Null-terminated Unicode string to a Null-terminated ASCII string.
INT64 EFIAPI DivS64x64Remainder(IN INT64 Dividend, IN INT64 Divisor, OUT INT64 *Remainder OPTIONAL)
Divides a 64-bit signed integer by a 64-bit signed integer and generates a 64-bit signed result and a...
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Shifts a 64-bit integer right between 0 and 63 bits.
UINT8 EFIAPI BitFieldAnd8(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, and returns the result.
UINT64 UINTN
Unsigned value of native width.
UINT16_t AX
ax register as passed to the Option ROM initialisation routine.
UINT64 EFIAPI LRotU64(IN UINT64 Operand, IN UINTN Count)
Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits with the high bits that wer...
UINT16 EFIAPI WriteUnaligned16(OUT UINT16 *Buffer, IN UINT16 Value)
Writes a 16-bit value to memory that may be unaligned.
LIST_ENTRY *EFIAPI InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
Adds a node to the beginning of a doubly linked list, and returns the pointer to the head node of the...
RETURN_STATUS EFIAPI StrToIpv4Address(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT IPv4_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
Convert a Null-terminated Unicode string to IPv4 address and prefix length.
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
Copies the string pointed to by Source (including the terminating null char) to the array pointed to ...
RETURN_STATUS EFIAPI AsciiStrHexToBytes(IN CONST CHAR8 *String, IN UINTN Length, OUT UINT8 *Buffer, IN UINTN MaxBufferSize)
Convert a Null-terminated ASCII hexadecimal string to a byte array.
RETURNS_TWICE UINTN EFIAPI SetJump(OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer)
Saves the current CPU context that can be restored with a call to LongJump() and returns 0.
#define VOID
Undeclared type.
UINT8 EFIAPI BitFieldRead8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit)
Returns a bit field from an 8-bit value.
unsigned long long UINT64
RETURN_STATUS EFIAPI StrToGuid(IN CONST CHAR16 *String, OUT GUID *Guid)
Convert a Null-terminated Unicode GUID string to a value of type EFI_GUID.
UINT32 EFIAPI CalculateCrc32c(IN CONST VOID *Buffer, IN UINTN Length, IN UINT32 InitialValue)
Calculates the CRC32c checksum of the given buffer.
UINT16 EFIAPI BitFieldWrite16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
Writes a bit field to a 16-bit value, and returns the result.
_LIST_ENTRY structure definition.
UINT64 EFIAPI WriteUnaligned64(OUT UINT64 *Buffer, IN UINT64 Value)
Writes a 64-bit value to memory that may be unaligned.
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
Returns the size of a Null-terminated ASCII string in bytes, including the Null terminator.
RETURN_STATUS EFIAPI StrnCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
Copies not more than Length successive char from the string pointed to by Source to the array pointed...
UINT64 EFIAPI ARShiftU64(IN UINT64 Operand, IN UINTN Count)
Shifts a 64-bit integer right between 0 and 63 bits.
RETURN_STATUS EFIAPI AsciiStrCatS(IN OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
Appends a copy of the string pointed to by Source (including the terminating null char) to the end of...
VOID EFIAPI DisableInterrupts(VOID)
Disables CPU interrupts.
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
Returns the length of a Null-terminated ASCII string.
UINTN EFIAPI TdCall(IN UINT64 Leaf, IN UINT64 Arg1, IN UINT64 Arg2, IN UINT64 Arg3, IN OUT VOID *Results)
The TDCALL instruction causes a VM exit to the Intel TDX module.
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
Shifts a 64-bit integer left between 0 and 63 bits.
#define CONST
Datum is read-only.
CHAR8 *EFIAPI AsciiStrStr(IN CONST CHAR8 *String, IN CONST CHAR8 *SearchString)
Returns the first occurrence of a Null-terminated ASCII sub-string in a Null-terminated ASCII string.
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
Switches the endianness of a 16-bit integer.
RETURN_STATUS EFIAPI AsciiStrnCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
Copies not more than Length successive char from the string pointed to by Source to the array pointed...
RETURN_STATUS EFIAPI StrHexToUintnS(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT UINTN *Data)
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
RETURN_STATUS EFIAPI AsciiStrToIpv4Address(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT IPv4_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
Convert a Null-terminated ASCII string to IPv4 address and prefix length.
UINT32 EFIAPI RRotU32(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 we...
VOID EFIAPI QuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN BASE_SORT_COMPARE CompareFunction, OUT VOID *BufferOneElement)
This function is identical to perform QuickSort, except that is uses the pre-allocated buffer so the ...
RETURN_STATUS EFIAPI StrToIpv6Address(IN CONST CHAR16 *String, OUT CHAR16 **EndPointer OPTIONAL, OUT IPv6_ADDRESS *Address, OUT UINT8 *PrefixLength OPTIONAL)
Convert a Null-terminated Unicode string to IPv6 address and prefix length.
INTN EFIAPI StrnCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString, IN UINTN Length)
Compares up to a specified length the contents of two Null-terminated Unicode strings,...
CHAR16 *EFIAPI PathCleanUpDirectories(IN CHAR16 *Path)
Function to clean up paths.
UINT64 EFIAPI StrHexToUint64(IN CONST CHAR16 *String)
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
UINT32 EFIAPI CalculateCheckSum32(IN CONST UINT32 *Buffer, IN UINTN Length)
Returns the two's complement checksum of all elements in a buffer of 32-bit values.
UINT64 EFIAPI RRotU64(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 th...
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
Removes a node from a doubly linked list, and returns the node that follows the removed node.
UINT64 EFIAPI BitFieldAnd64(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, and returns the result.
CHAR16 EFIAPI CharToUpper(IN CHAR16 Char)
Convert a Unicode character to upper case only if it maps to a valid small-case ASCII character.
UINT64 EFIAPI DivU64x64Remainder(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result...
UINT32 EFIAPI LRotU32(IN UINT32 Operand, IN UINTN Count)
Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits with the high bits that wer...
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
Reads a 32-bit value from memory that may be unaligned.
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
Retrieves the first node of a doubly linked list.
UINT8 EFIAPI BitFieldCountOnes32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit)
Reads a bit field from a 32-bit value, counts and returns the number of set bits.
INTN EFIAPI LowBitSet64(IN UINT64 Operand)
Returns the bit position of the lowest bit set in a 64-bit value.
UINT64 EFIAPI SwapBytes64(IN UINT64 Value)
Switches the endianness of a 64-bit integer.
UINT64 EFIAPI CalculateCheckSum64(IN CONST UINT64 *Buffer, IN UINTN Length)
Returns the two's complement checksum of all elements in a buffer of 64-bit values.
INTN EFIAPI HighBitSet64(IN UINT64 Operand)
Returns the bit position of the highest bit set in a 64-bit value.
UINTN EFIAPI AsciiStrHexToUintn(IN CONST CHAR8 *String)
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
UINT8 EFIAPI BitFieldAndThenOr8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
Reads a bit field from an 8-bit value, performs a bitwise AND followed by a bitwise OR,...
UINT8 EFIAPI CalculateCheckSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
Returns the two's complement checksum of all elements in a buffer of 8-bit values.
RETURN_STATUS EFIAPI AsciiStrHexToUint64S(IN CONST CHAR8 *String, OUT CHAR8 **EndPointer OPTIONAL, OUT UINT64 *Data)
Convert a Null-terminated Ascii hexadecimal string to a value of type UINT64.
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result...
UINT16 EFIAPI BitFieldRead16(IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit)
Returns a bit field from a 16-bit value.
RETURN_STATUS EFIAPI StrnCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
Appends not more than Length successive char from the string pointed to by Source to the end of the s...
VOID EFIAPI CpuBreakpoint(VOID)
Generates a breakpoint on the CPU.
RETURN_STATUS EFIAPI Base64Encode(IN CONST UINT8 *Source, IN UINTN SourceLength, OUT CHAR8 *Destination OPTIONAL, IN OUT UINTN *DestinationSize)
Convert binary data to a Base64 encoded ascii string based on RFC4648.
UINT64 EFIAPI CalculateSum64(IN CONST UINT64 *Buffer, IN UINTN Length)
Returns the sum of all elements in a buffer of 64-bit values.
UINT8 EFIAPI BitFieldWrite8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
Writes a bit field to an 8-bit value, and returns the result.
UINTN EFIAPI StrHexToUintn(IN CONST CHAR16 *String)
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
#define SMAP
Magic value for INT 15,e820 calls.
UINT16 EFIAPI CalculateCrc16CcittF(IN CONST VOID *Buffer, IN UINTN Length, IN UINT16 InitialValue)
Calculates the CRC16-CCITT-FALSE checksum of the given buffer.
VOID EFIAPI CpuPause(VOID)
Requests CPU to pause for a short period of time.
BOOLEAN EFIAPI SetInterruptState(IN BOOLEAN InterruptState)
Set the current CPU interrupt state.
UINT32 EFIAPI BitFieldWrite32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
Writes a bit field to a 32-bit value, and returns the result.
RETURN_STATUS EFIAPI AsciiStrToGuid(IN CONST CHAR8 *String, OUT GUID *Guid)
Convert a Null-terminated ASCII GUID string to a value of type EFI_GUID.
#define RETURNS_TWICE
Tell the code optimizer that the function will return twice.
VOID EFIAPI MemoryFence(VOID)
Used to serialize load and store operations.
CHAR8 EFIAPI AsciiCharToUpper(IN CHAR8 Chr)
Converts a lowercase Ascii character to upper one.
RETURN_STATUS EFIAPI StrHexToBytes(IN CONST CHAR16 *String, IN UINTN Length, OUT UINT8 *Buffer, IN UINTN MaxBufferSize)
Convert a Null-terminated Unicode hexadecimal string to a byte array.
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
Switches the endianness of a 32-bit integer.
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
Returns the length of a Null-terminated Unicode string.
UINT16_t BX
bx register as passed to the Option ROM initialisation routine.
UINT64 EFIAPI AsciiStrDecimalToUint64(IN CONST CHAR8 *String)
Convert a Null-terminated ASCII decimal string to a value of type UINT64.
VOID EFIAPI SpeculationBarrier(VOID)
Uses as a barrier to stop speculative execution.