TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestHostBaseLib.h
Go to the documentation of this file.
1
9#ifndef __UNIT_TEST_HOST_BASE_LIB_H__
10#define __UNIT_TEST_HOST_BASE_LIB_H__
11
15typedef
16VOID
18 VOID
19 );
20
26typedef
27BOOLEAN
29 VOID
30 );
31
37typedef
38UINT16
40 VOID
41 );
42
48typedef
51 VOID
52 );
53
61typedef
62VOID
64 IN UINT16 Value
65 );
66
74typedef
77 IN UINTN Value
78 );
79
85typedef
86VOID
88 OUT IA32_DESCRIPTOR *Ia32Descriptor
89 );
90
96typedef
97VOID
99 IN CONST IA32_DESCRIPTOR *Ia32Descriptor
100 );
101
127typedef
128UINT32
130 IN UINT32 Index,
131 OUT UINT32 *Eax OPTIONAL,
132 OUT UINT32 *Ebx OPTIONAL,
133 OUT UINT32 *Ecx OPTIONAL,
134 OUT UINT32 *Edx OPTIONAL
135 );
136
169typedef
170UINT32
172 IN UINT32 Index,
173 IN UINT32 SubIndex,
174 OUT UINT32 *Eax OPTIONAL,
175 OUT UINT32 *Ebx OPTIONAL,
176 OUT UINT32 *Ecx OPTIONAL,
177 OUT UINT32 *Edx OPTIONAL
178 );
179
194typedef
195UINT64
197 IN UINT32 Index
198 );
199
217typedef
218UINT64
220 IN UINT32 Index,
221 IN UINT64 Value
222 );
223
235typedef
236UINT64
238 IN UINT32 Index
239 );
240
257typedef
260 IN UINTN Eax,
261 IN UINTN Ecx,
262 IN UINTN Edx
263 );
264
279typedef
282 IN UINTN Eax,
283 IN UINTN Ecx
284 );
285
301typedef
302VOID *
304 IN VOID *LinearAddress
305 );
306
320typedef
321VOID
323 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
324 IN VOID *Context1 OPTIONAL,
325 IN VOID *Context2 OPTIONAL,
326 IN VOID *NewStack
327 );
328
361typedef
362VOID
364 IN UINT16 Cs,
365 IN UINT64 EntryPoint,
366 IN UINT64 Context1 OPTIONAL,
367 IN UINT64 Context2 OPTIONAL,
368 IN UINT64 NewStack
369 );
370
401typedef
402VOID
404 IN UINT16 Cs,
405 IN UINT32 EntryPoint,
406 IN UINT32 Context1 OPTIONAL,
407 IN UINT32 Context2 OPTIONAL,
408 IN UINT32 NewStack
409 );
410
432typedef
433VOID
435 OUT UINT32 *RealModeBufferSize,
436 OUT UINT32 *ExtraStackSize
437 );
438
446typedef
447VOID
449 IN OUT THUNK_CONTEXT *ThunkContext
450 );
451
486typedef
487VOID
489 OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
490 IN UINT64 PatchValue,
491 IN UINTN ValueSize
492 );
493
497typedef struct {
503
507typedef struct {
569
575typedef struct {
579
581
582#endif
UINT64 UINTN
BOOLEAN EFIAPI GetInterruptState(VOID)
Definition: CpuBreakpoint.c:86
VOID EFIAPI EnableInterrupts(VOID)
Definition: CpuBreakpoint.c:67
VOID EFIAPI DisableInterrupts(VOID)
Definition: CpuBreakpoint.c:54
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
Definition: BaseLib.h:5019
VOID EFIAPI EnableDisableInterrupts(VOID)
UINT32 EFIAPI AsmCpuidEx(IN UINT32 Index, IN UINT32 SubIndex, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
Definition: CpuIdEx.c:43
VOID EFIAPI AsmDisableCache(VOID)
Definition: DisableCache.c:18
VOID EFIAPI AsmEnableCache(VOID)
Definition: EnableCache.c:18
VOID *EFIAPI AsmFlushCacheLine(IN VOID *LinearAddress)
UINTN EFIAPI AsmWriteDr1(UINTN Dr1)
UINT16 EFIAPI AsmReadTr(VOID)
UINT16 EFIAPI AsmReadLdtr(VOID)
UINTN EFIAPI AsmWriteDr4(UINTN Dr4)
UINTN EFIAPI AsmReadDr1(VOID)
VOID EFIAPI AsmInvd(VOID)
UINTN EFIAPI AsmReadDr0(VOID)
UINT16 EFIAPI AsmReadFs(VOID)
UINTN EFIAPI AsmWriteDr7(UINTN Dr7)
UINTN EFIAPI AsmWriteDr3(UINTN Dr3)
UINT16 EFIAPI AsmReadEs(VOID)
UINTN EFIAPI AsmReadCr3(VOID)
UINTN EFIAPI AsmReadDr2(VOID)
UINTN EFIAPI AsmWriteCr2(UINTN Cr2)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
Definition: GccInlinePriv.c:60
UINTN EFIAPI AsmWriteCr3(UINTN Cr3)
UINTN EFIAPI AsmWriteCr4(UINTN Cr4)
VOID EFIAPI AsmWbinvd(VOID)
UINTN EFIAPI AsmReadCr0(VOID)
UINTN EFIAPI AsmWriteDr2(UINTN Dr2)
UINTN EFIAPI AsmWriteDr0(UINTN Dr0)
UINT16 EFIAPI AsmReadGs(VOID)
UINTN EFIAPI AsmWriteCr0(UINTN Cr0)
UINTN EFIAPI AsmWriteDr5(UINTN Dr5)
UINTN EFIAPI AsmReadCr2(VOID)
UINT16 EFIAPI AsmReadSs(VOID)
UINT16 EFIAPI AsmReadCs(VOID)
UINT64 EFIAPI AsmWriteMsr64(IN UINT32 Index, IN UINT64 Value)
UINTN EFIAPI AsmReadDr3(VOID)
VOID EFIAPI AsmWriteLdtr(IN UINT16 Ldtr)
UINTN EFIAPI AsmReadCr4(VOID)
UINTN EFIAPI AsmReadDr6(VOID)
UINTN EFIAPI AsmWriteDr6(UINTN Dr6)
UINT64 EFIAPI AsmReadPmc(IN UINT32 Index)
UINT16 EFIAPI AsmReadDs(VOID)
UINTN EFIAPI AsmReadDr4(VOID)
UINTN EFIAPI AsmReadDr7(VOID)
UINTN EFIAPI AsmReadDr5(VOID)
#define CONST
Definition: Base.h:259
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
Definition: CpuId.c:36
UINTN EFIAPI AsmMonitor(IN UINTN RegisterEax, IN UINTN RegisterEcx, IN UINTN RegisterEdx)
Definition: Monitor.c:27
UINTN EFIAPI AsmMwait(IN UINTN RegisterEax, IN UINTN RegisterEcx)
Definition: Mwait.c:25
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_PATCH_INSTRUCTION_X86)(OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, IN UINT64 PatchValue, IN UINTN ValueSize)
UINT32(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_CPUID)(IN UINT32 Index, OUT UINT32 *Eax OPTIONAL, OUT UINT32 *Ebx OPTIONAL, OUT UINT32 *Ecx OPTIONAL, OUT UINT32 *Edx OPTIONAL)
UINTN(EFIAPI * UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN)(IN UINTN Value)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_IA32_DESCRIPTOR)(IN CONST IA32_DESCRIPTOR *Ia32Descriptor)
UNIT_TEST_HOST_BASE_LIB gUnitTestHostBaseLib
UINT64(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_MSR_64)(IN UINT32 Index, IN UINT64 Value)
BOOLEAN(EFIAPI * UNIT_TEST_HOST_BASE_LIB_READ_BOOLEAN)(VOID)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_WRITE_UINT16)(IN UINT16 Value)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_GET_THUNK_16_PROPERTIES)(OUT UINT32 *RealModeBufferSize, OUT UINT32 *ExtraStackSize)
UINTN(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_MONITOR)(IN UINTN Eax, IN UINTN Ecx, IN UINTN Edx)
UINT32(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_CPUID_EX)(IN UINT32 Index, IN UINT32 SubIndex, OUT UINT32 *Eax OPTIONAL, OUT UINT32 *Ebx OPTIONAL, OUT UINT32 *Ecx OPTIONAL, OUT UINT32 *Edx OPTIONAL)
UINT64(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_READ_PMC)(IN UINT32 Index)
UINTN(EFIAPI * UNIT_TEST_HOST_BASE_LIB_READ_UINTN)(VOID)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_PAGING_32)(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
VOID *(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_FLUSH_CACHE_LINE)(IN VOID *LinearAddress)
UINTN(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_MWAIT)(IN UINTN Eax, IN UINTN Ecx)
UINT16(EFIAPI * UNIT_TEST_HOST_BASE_LIB_READ_UINT16)(VOID)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_DISABLE_PAGING_64)(IN UINT16 Cs, IN UINT32 EntryPoint, IN UINT32 Context1 OPTIONAL, IN UINT32 Context2 OPTIONAL, IN UINT32 NewStack)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_READ_IA32_DESCRIPTOR)(OUT IA32_DESCRIPTOR *Ia32Descriptor)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_VOID)(VOID)
UINT64(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_READ_MSR_64)(IN UINT32 Index)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_ENABLE_PAGING_64)(IN UINT16 Cs, IN UINT64 EntryPoint, IN UINT64 Context1 OPTIONAL, IN UINT64 Context2 OPTIONAL, IN UINT64 NewStack)
VOID(EFIAPI * UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16)(IN OUT THUNK_CONTEXT *ThunkContext)
VOID EFIAPI AsmDisablePaging32(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
VOID EFIAPI AsmDisablePaging64(IN UINT16 Cs, IN UINT32 EntryPoint, IN UINT32 Context1 OPTIONAL, IN UINT32 Context2 OPTIONAL, IN UINT32 NewStack)
VOID EFIAPI AsmEnablePaging32(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
VOID EFIAPI AsmEnablePaging64(IN UINT16 Cs, IN UINT64 EntryPoint, IN UINT64 Context1 OPTIONAL, IN UINT64 Context2 OPTIONAL, IN UINT64 NewStack)
VOID EFIAPI PatchInstructionX86(OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, IN UINT64 PatchValue, IN UINTN ValueSize)
VOID EFIAPI AsmReadGdtr(OUT IA32_DESCRIPTOR *Gdtr)
Definition: X86ReadGdtr.c:24
VOID EFIAPI AsmReadIdtr(OUT IA32_DESCRIPTOR *Idtr)
Definition: X86ReadIdtr.c:24
VOID EFIAPI AsmGetThunk16Properties(OUT UINT32 *RealModeBufferSize, OUT UINT32 *ExtraStackSize)
Definition: X86Thunk.c:62
VOID EFIAPI AsmPrepareThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
Definition: X86Thunk.c:94
VOID EFIAPI AsmPrepareAndThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
Definition: X86Thunk.c:257
VOID EFIAPI AsmThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
Definition: X86Thunk.c:212
VOID EFIAPI AsmWriteTr(IN UINT16 Selector)
VOID EFIAPI AsmWriteGdtr(IN CONST IA32_DESCRIPTOR *Gdtr)
VOID EFIAPI AsmWriteIdtr(IN CONST IA32_DESCRIPTOR *Idtr)
VOID EFIAPI AsmLfence(VOID)