/** @file
EBC VM Test protocol for test purposes.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _EBC_VM_TEST_PROTOCOL_H_
#define _EBC_VM_TEST_PROTOCOL_H_
//
// Define a protocol for an EBC VM test interface.
//
#define EFI_EBC_VM_TEST_PROTOCOL_GUID \
{ \
0xAAEACCFD, 0xF27B, 0x4C17, { 0xB6, 0x10, 0x75, 0xCA, 0x1F, 0x2D, 0xFB, 0x52 } \
}
//
// Define for forward reference.
//
///
/// instruction pointer for the VM
///
typedef struct {
///< Flags register:
///< 0 Set to 1 if the result of the last compare was true
///< 1 Set to 1 if stepping
} VM_CONTEXT;
/**
Given a pointer to a new VM context, execute one or more instructions. This
function is only used for test purposes.
@param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
@param[in] VmPtr A pointer to a VM context.
@param[in, out] InstructionCount A 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.
@retval EFI_UNSUPPORTED At least one of the opcodes is not supported.
@retval EFI_SUCCESS All of the instructions are executed successfully.
**/
typedef
);
/**
Convert AsmText to the instruction. This function is only used for test purposes.
@param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
@param[in] AsmText A pointer to EBC ASM text code.
@param[out] Buffer Buffer to store the instruction.
@param[out] BufferLen Size of buffer that is requried to store data.
@retval EFI_UNSUPPORTED This functionality is unsupported.
@retval EFI_SUCCESS Successfully convert AsmText to the instruction.
**/
typedef
);
/**
Dump the executed instruction. This function is only used for test purposes.
@param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
@param[out] AsmText Contain the disasm text.
@param[out] Buffer Buffer to store the instruction.
@param[out] BufferLen Size of buffer that is requried to store data.
@retval EFI_UNSUPPORTED This functionality is unsupported.
@retval EFI_SUCCESS Successfully dump the executed instruction.
**/
typedef
);
//
// Prototype for the actual EBC test protocol interface
//
struct _EFI_EBC_VM_TEST_PROTOCOL {
};
extern EFI_GUID gEfiEbcVmTestProtocolGuid;
#endif