Add doxygen style comments for functions in EBC module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5194 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -227,6 +227,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define OPCODE_MOVIN 0x38
|
||||
#define OPCODE_MOVREL 0x39
|
||||
|
||||
/**
|
||||
Execute an EBC image from an entry point or from a published protocol.
|
||||
|
||||
@param VmPtr A pointer to a VM context.
|
||||
|
||||
@retval EFI_UNSUPPORTED At least one of the opcodes is not supported.
|
||||
@retval EFI_SUCCESS All of the instructions are executed successfully.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcExecute (
|
||||
IN VM_CONTEXT *VmPtr
|
||||
@@ -235,12 +244,41 @@ EbcExecute (
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Returns the version of the EBC virtual machine.
|
||||
|
||||
@return The 64-bit version of EBC virtual machine.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
GetVmVersion (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Writes UINTN data to memory address.
|
||||
|
||||
This routine is called by the EBC data
|
||||
movement instructions that write to memory. Since these writes
|
||||
may be to the stack, which looks like (high address on top) this,
|
||||
|
||||
[EBC entry point arguments]
|
||||
[VM stack]
|
||||
[EBC stack]
|
||||
|
||||
we need to detect all attempts to write to the EBC entry point argument
|
||||
stack area and adjust the address (which will initially point into the
|
||||
VM stack) to point into the EBC entry point arguments.
|
||||
|
||||
@param VmPtr A pointer to a VM context.
|
||||
@param Addr Adddress to write to.
|
||||
@param Data Value to write to Addr.
|
||||
|
||||
@retval EFI_SUCCESS The instruction is executed successfully.
|
||||
@retval Other Some error occurs when writing data to the address.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
VmWriteMemN (
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
@@ -249,6 +287,29 @@ VmWriteMemN (
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Writes 64-bit data to memory address.
|
||||
|
||||
This routine is called by the EBC data
|
||||
movement instructions that write to memory. Since these writes
|
||||
may be to the stack, which looks like (high address on top) this,
|
||||
|
||||
[EBC entry point arguments]
|
||||
[VM stack]
|
||||
[EBC stack]
|
||||
|
||||
we need to detect all attempts to write to the EBC entry point argument
|
||||
stack area and adjust the address (which will initially point into the
|
||||
VM stack) to point into the EBC entry point arguments.
|
||||
|
||||
@param VmPtr A pointer to a VM context.
|
||||
@param Addr Adddress to write to.
|
||||
@param Data Value to write to Addr.
|
||||
|
||||
@retval EFI_SUCCESS The instruction is executed successfully.
|
||||
@retval Other Some error occurs when writing data to the address.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
VmWriteMem64 (
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
@@ -305,6 +366,20 @@ struct _EFI_EBC_VM_TEST_PROTOCOL {
|
||||
EBC_VM_TEST_DASM Disassemble;
|
||||
};
|
||||
|
||||
/**
|
||||
Given a pointer to a new VM context, execute one or more instructions. This
|
||||
function is only used for test purposes via the EBC VM test protocol.
|
||||
|
||||
@param This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
|
||||
@param VmPtr A pointer to a VM context.
|
||||
@param 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.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcExecuteInstructions (
|
||||
IN EFI_EBC_VM_TEST_PROTOCOL *This,
|
||||
|
Reference in New Issue
Block a user