9#ifndef __UNIT_TEST_HOST_BASE_LIB_H__
10#define __UNIT_TEST_HOST_BASE_LIB_H__
88 OUT IA32_DESCRIPTOR *Ia32Descriptor
99 IN CONST IA32_DESCRIPTOR *Ia32Descriptor
304 IN VOID *LinearAddress
365 IN UINT64 EntryPoint,
405 IN UINT32 EntryPoint,
435 OUT UINT32 *RealModeBufferSize,
436 OUT UINT32 *ExtraStackSize
449 IN OUT THUNK_CONTEXT *ThunkContext
489 OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
490 IN UINT64 PatchValue,
BOOLEAN EFIAPI GetInterruptState(VOID)
VOID EFIAPI EnableInterrupts(VOID)
VOID EFIAPI DisableInterrupts(VOID)
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
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)
VOID EFIAPI AsmDisableCache(VOID)
VOID EFIAPI AsmEnableCache(VOID)
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)
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)
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
UINTN EFIAPI AsmMonitor(IN UINTN RegisterEax, IN UINTN RegisterEcx, IN UINTN RegisterEdx)
UINTN EFIAPI AsmMwait(IN UINTN RegisterEax, IN UINTN RegisterEcx)
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)
VOID EFIAPI AsmReadIdtr(OUT IA32_DESCRIPTOR *Idtr)
VOID EFIAPI AsmGetThunk16Properties(OUT UINT32 *RealModeBufferSize, OUT UINT32 *ExtraStackSize)
VOID EFIAPI AsmPrepareThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
VOID EFIAPI AsmPrepareAndThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
VOID EFIAPI AsmThunk16(IN OUT THUNK_CONTEXT *ThunkContext)
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)