23 #if defined (MDE_CPU_IA32) 35 } BASE_LIBRARY_JUMP_BUFFER;
37 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 39 #endif // defined (MDE_CPU_IA32) 41 #if defined (MDE_CPU_X64) 59 } BASE_LIBRARY_JUMP_BUFFER;
61 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 63 #endif // defined (MDE_CPU_X64) 65 #if defined (MDE_CPU_EBC) 75 } BASE_LIBRARY_JUMP_BUFFER;
77 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 79 #endif // defined (MDE_CPU_EBC) 81 #if defined (MDE_CPU_ARM) 95 } BASE_LIBRARY_JUMP_BUFFER;
97 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 99 #endif // defined (MDE_CPU_ARM) 101 #if defined (MDE_CPU_AARCH64) 127 } BASE_LIBRARY_JUMP_BUFFER;
129 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 131 #endif // defined (MDE_CPU_AARCH64) 133 #if defined (MDE_CPU_RISCV64) 152 } BASE_LIBRARY_JUMP_BUFFER;
154 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 157 RiscVSetSupervisorScratch (
162 RiscVGetSupervisorScratch (
167 RiscVSetSupervisorStvec (
172 RiscVGetSupervisorStvec (
177 RiscVGetSupervisorTrapCause (
182 RiscVSetSupervisorAddressTranslationRegister (
187 RiscVGetSupervisorAddressTranslationRegister (
197 RiscVSetSupervisorTimeCompareRegister (
202 RiscVEnableTimerInterrupt (
207 RiscVDisableTimerInterrupt (
212 RiscVClearPendingTimerInterrupt (
222 RiscVInvalidateInstCacheFenceAsm (
232 RiscVInvalidateDataCacheFenceAsm (
243 RiscVCpuCacheFlushCmoAsm (
255 RiscVCpuCacheCleanCmoAsm (
265 RiscVCpuCacheInvalCmoAsm (
269 #endif // defined (MDE_CPU_RISCV64) 271 #if defined (MDE_CPU_LOONGARCH64) 288 } BASE_LIBRARY_JUMP_BUFFER;
290 #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 298 SetExceptionBaseAddress (
308 SetTlbRebaseAddress (
318 EnableLocalInterrupts (
328 DisableLocalInterrupts (
352 AsmReadStableCounter (
513 #endif // defined (MDE_CPU_LOONGARCH64) 1748 #define GUID_STRING_LENGTH 36 2819 #define INITIALIZE_LIST_HEAD_VARIABLE(ListHead) {&(ListHead), &(ListHead)} 2828 #define BASE_LIST_FOR_EACH(Entry, ListHead) \ 2829 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink) 2844 #define BASE_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \ 2845 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\ 2846 Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink) 4886 #define CRC16ANSI_INIT 0xffff 4960 OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
4982 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
5160 #if defined (MDE_CPU_X64) || defined (MDE_CPU_IA32) 5226 #if defined (MDE_CPU_X64) 5231 PvalidatePageSize4K = 0,
5232 PvalidatePageSize2MB,
5233 } PVALIDATE_PAGE_SIZE;
5238 #define PVALIDATE_RET_SUCCESS 0 5239 #define PVALIDATE_RET_FAIL_INPUT 1 5240 #define PVALIDATE_RET_SIZE_MISMATCH 6 5245 #define PVALIDATE_RET_NO_RMPUPDATE 255 5270 IN PVALIDATE_PAGE_SIZE PageSize,
5278 #define RMPADJUST_VMPL_MAX 3 5279 #define RMPADJUST_VMPL_MASK 0xFF 5280 #define RMPADJUST_VMPL_SHIFT 0 5281 #define RMPADJUST_PERMISSION_MASK_MASK 0xFF 5282 #define RMPADJUST_PERMISSION_MASK_SHIFT 8 5283 #define RMPADJUST_VMSA_PAGE_BIT BIT16 5312 #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) 5455 } IA32_SEGMENT_DESCRIPTOR;
5467 #define IA32_IDT_GATE_TYPE_TASK 0x85 5468 #define IA32_IDT_GATE_TYPE_INTERRUPT_16 0x86 5469 #define IA32_IDT_GATE_TYPE_TRAP_16 0x87 5470 #define IA32_IDT_GATE_TYPE_INTERRUPT_32 0x8E 5471 #define IA32_IDT_GATE_TYPE_TRAP_32 0x8F 5473 #define IA32_GDT_TYPE_TSS 0x9 5474 #define IA32_GDT_ALIGNMENT 8 5476 #if defined (MDE_CPU_IA32) 5489 } IA32_IDT_GATE_DESCRIPTOR;
5530 UINT16 LDTSegmentSelector;
5534 } IA32_TASK_STATE_SEGMENT;
5552 } IA32_TSS_DESCRIPTOR;
5555 #endif // defined (MDE_CPU_IA32) 5557 #if defined (MDE_CPU_X64) 5575 } IA32_IDT_GATE_DESCRIPTOR;
5591 } IA32_TASK_STATE_SEGMENT;
5614 } IA32_TSS_DESCRIPTOR;
5617 #endif // defined (MDE_CPU_X64) 5680 IA32_EFLAGS32 EFLAGS;
5690 } IA32_REGISTER_SET;
5696 IA32_REGISTER_SET *RealModeState;
5697 VOID *RealModeBuffer;
5698 UINT32 RealModeBufferSize;
5702 #define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001 5703 #define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002 5704 #define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004 5718 typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (
5976 AsmMsrBitFieldRead32 (
6009 AsmMsrBitFieldWrite32 (
6045 AsmMsrBitFieldOr32 (
6081 AsmMsrBitFieldAnd32 (
6121 AsmMsrBitFieldAndThenOr32 (
6276 AsmMsrBitFieldRead64 (