summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/EbcDxe/EbcExecute.h
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-13 08:46:12 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-13 08:46:12 +0000
commit8e3bc754c50ba72996de1bf8c29b34fa7b36e56d (patch)
tree32a9af24a39674cbb0855f045f1f941f6b182a0a /MdeModulePkg/Universal/EbcDxe/EbcExecute.h
parent335b890e409524ada3697c3de93c2d7229c3c795 (diff)
downloadedk2-platforms-8e3bc754c50ba72996de1bf8c29b34fa7b36e56d.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Universal/EbcDxe/EbcExecute.h')
-rw-r--r--MdeModulePkg/Universal/EbcDxe/EbcExecute.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.h b/MdeModulePkg/Universal/EbcDxe/EbcExecute.h
index 91aada0d55..13eea0c9dc 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.h
+++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.h
@@ -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,