MdeModulePkg[all]  0.98
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EbcVmTest.h File Reference

Data Structures

struct  VM_CONTEXT
 
struct  _EFI_EBC_VM_TEST_PROTOCOL
 

Macros

#define EFI_EBC_VM_TEST_PROTOCOL_GUID
 
#define VM_MAJOR_VERSION   1
 
#define VM_MINOR_VERSION   0
 
#define STOPFLAG_APP_DONE   0x0001
 
#define STOPFLAG_BREAKPOINT   0x0002
 
#define STOPFLAG_INVALID_BREAK   0x0004
 
#define STOPFLAG_BREAK_ON_CALLEX   0x0008
 
#define VMFLAGS_CC   0x0001
 
#define VMFLAGS_STEP   0x0002
 
#define VMFLAGS_ALL_VALID   (VMFLAGS_CC | VMFLAGS_STEP)
 
#define VMFLAG_SET(pVM, Flag)   (pVM->Flags |= (Flag))
 
#define VMFLAG_ISSET(pVM, Flag)   ((pVM->Flags & (Flag)) ? 1 : 0)
 
#define VMFLAG_CLEAR(pVM, Flag)   (pVM->Flags &= ~(Flag))
 
#define GETOPERANDS(pVM)   (UINT8) (*(UINT8 *) (pVM->Ip + 1))
 
#define GETOPCODE(pVM)   (UINT8) (*(UINT8 *) pVM->Ip)
 
#define OPERAND1_REGDATA(pVM, Op)   pVM->Gpr[OPERAND1_REGNUM (Op)]
 
#define OPERAND2_REGDATA(pVM, Op)   pVM->Gpr[OPERAND2_REGNUM (Op)]
 
#define EXCEPTION_FLAG_FATAL   0x80000000
 
#define EXCEPTION_FLAG_ERROR   0x40000000
 
#define EXCEPTION_FLAG_WARNING   0x20000000
 
#define EXCEPTION_FLAG_NONE   0x00000000
 

Typedefs

typedef struct
_EFI_EBC_VM_TEST_PROTOCOL 
EFI_EBC_VM_TEST_PROTOCOL
 
typedef UINT8 * VMIP
 
typedef INT64 VM_REGISTER
 
typedef UINT32 EXCEPTION_FLAGS
 
typedef IN VM_CONTEXTVmPtr
 
typedef IN VM_CONTEXT IN OUT
UINTN
InstructionCount
 
typedef IN CHAR16 * AsmText
 
typedef IN CHAR16 IN OUT INT8 * Buffer
 
typedef IN CHAR16 IN OUT INT8
IN OUT UINTN
BufferLen
 
typedef IN OUT CHAR16 IN OUT
INT8 IN OUT UINTN
Len
 

Functions

typedef EFI_STATUS (EFIAPI *EBC_VM_TEST_EXECUTE)(IN EFI_EBC_VM_TEST_PROTOCOL *This
 

Variables

EFI_GUID gEfiEbcVmTestProtocolGuid
 

Detailed Description

EBC VM Test protocol for test purposes.

Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Macro Definition Documentation

#define EFI_EBC_VM_TEST_PROTOCOL_GUID
Value:
{ \
0xAAEACCFD, 0xF27B, 0x4C17, { 0xB6, 0x10, 0x75, 0xCA, 0x1F, 0x2D, 0xFB, 0x52 } \
}
#define EXCEPTION_FLAG_ERROR   0x40000000
#define EXCEPTION_FLAG_FATAL   0x80000000
#define EXCEPTION_FLAG_NONE   0x00000000
#define EXCEPTION_FLAG_WARNING   0x20000000
#define GETOPCODE (   pVM)    (UINT8) (*(UINT8 *) pVM->Ip)
#define GETOPERANDS (   pVM)    (UINT8) (*(UINT8 *) (pVM->Ip + 1))
#define OPERAND1_REGDATA (   pVM,
  Op 
)    pVM->Gpr[OPERAND1_REGNUM (Op)]
#define OPERAND2_REGDATA (   pVM,
  Op 
)    pVM->Gpr[OPERAND2_REGNUM (Op)]
#define STOPFLAG_APP_DONE   0x0001
#define STOPFLAG_BREAK_ON_CALLEX   0x0008
#define STOPFLAG_BREAKPOINT   0x0002
#define STOPFLAG_INVALID_BREAK   0x0004
#define VM_MAJOR_VERSION   1
#define VM_MINOR_VERSION   0
#define VMFLAG_CLEAR (   pVM,
  Flag 
)    (pVM->Flags &= ~(Flag))
#define VMFLAG_ISSET (   pVM,
  Flag 
)    ((pVM->Flags & (Flag)) ? 1 : 0)
#define VMFLAG_SET (   pVM,
  Flag 
)    (pVM->Flags |= (Flag))
#define VMFLAGS_ALL_VALID   (VMFLAGS_CC | VMFLAGS_STEP)
#define VMFLAGS_CC   0x0001
#define VMFLAGS_STEP   0x0002

Typedef Documentation

typedef IN OUT CHAR16 * AsmText
typedef IN OUT CHAR16 IN OUT INT8* Buffer
typedef IN CHAR16 IN OUT INT8 IN OUT UINTN* BufferLen
typedef IN VM_CONTEXT IN OUT UINTN* InstructionCount
typedef IN OUT CHAR16 IN OUT INT8 IN OUT UINTN* Len
typedef INT64 VM_REGISTER
typedef UINT8* VMIP

instruction pointer for the VM

typedef IN VM_CONTEXT* VmPtr

Function Documentation

typedef EFI_STATUS ( EFIAPI *  EBC_VM_TEST_DASM)

Given a pointer to a new VM context, execute one or more instructions. This function is only used for test purposes.

Parameters
[in]ThisA pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
[in]VmPtrA pointer to a VM context.
[in,out]InstructionCountA pointer to a UINTN value holding the number of instructions to execute. If it holds value of 0, then the instruction to be executed is 1.
Return values
EFI_UNSUPPORTEDAt least one of the opcodes is not supported.
EFI_SUCCESSAll of the instructions are executed successfully.

Convert AsmText to the instruction. This function is only used for test purposes.

Parameters
[in]ThisA pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
[in]AsmTextA pointer to EBC ASM text code.
[out]BufferBuffer to store the instruction.
[out]BufferLenSize of buffer that is required to store data.
Return values
EFI_UNSUPPORTEDThis functionality is unsupported.
EFI_SUCCESSSuccessfully convert AsmText to the instruction.

Dump the executed instruction. This function is only used for test purposes.

Parameters
[in]ThisA pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
[out]AsmTextContain the disasm text.
[out]BufferBuffer to store the instruction.
[out]BufferLenSize of buffer that is required to store data.
Return values
EFI_UNSUPPORTEDThis functionality is unsupported.
EFI_SUCCESSSuccessfully dump the executed instruction.

Variable Documentation

EFI_GUID gEfiEbcVmTestProtocolGuid