]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/EbcExecute.h
Clean up the private GUID definition in module Level.
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcExecute.h
index 13eea0c9dc24876fc99504d6ba4b1bc3c3556d39..bdc70b1d436843b7f18074a7f28224de2c48a616 100644 (file)
@@ -3,8 +3,8 @@
   be of use to a disassembler for the most part. Also provides function\r
   prototypes for VM functions.\r
 \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -125,8 +125,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define OPERAND1_CHAR(op)         ('0' + OPERAND1_REGNUM (op))\r
 #define OPERAND2_CHAR(op)         ('0' + OPERAND2_REGNUM (op))\r
 \r
-#define OPERAND1_REGDATA(pvm, op) pvm->R[OPERAND1_REGNUM (op)]\r
-#define OPERAND2_REGDATA(pvm, op) pvm->R[OPERAND2_REGNUM (op)]\r
+#define OPERAND1_REGDATA(pvm, op) pvm->Gpr[OPERAND1_REGNUM (op)]\r
+#define OPERAND2_REGDATA(pvm, op) pvm->Gpr[OPERAND2_REGNUM (op)]\r
 \r
 //\r
 // Condition masks usually for byte 1 encodings of code\r
@@ -239,26 +239,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 EFI_STATUS\r
 EbcExecute (\r
   IN VM_CONTEXT *VmPtr\r
-  )\r
-;\r
+  );\r
 \r
 \r
 \r
 /**\r
   Returns the version of the EBC virtual machine.\r
-    \r
+\r
   @return The 64-bit version of EBC virtual machine.\r
 \r
 **/\r
 UINT64\r
 GetVmVersion (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Writes UINTN data to memory address.\r
-   \r
+\r
   This routine is called by the EBC data\r
   movement instructions that write to memory. Since these writes\r
   may be to the stack, which looks like (high address on top) this,\r
@@ -268,14 +266,14 @@ GetVmVersion (
   [EBC stack]\r
 \r
   we need to detect all attempts to write to the EBC entry point argument\r
-  stack area and adjust the address (which will initially point into the \r
+  stack area and adjust the address (which will initially point into the\r
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
-  @retval EFI_SUCCESS       The instruction is executed successfully.  \r
+  @retval EFI_SUCCESS       The instruction is executed successfully.\r
   @retval Other             Some error occurs when writing data to the address.\r
 \r
 **/\r
@@ -284,12 +282,11 @@ VmWriteMemN (
   IN VM_CONTEXT   *VmPtr,\r
   IN UINTN        Addr,\r
   IN UINTN        Data\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Writes 64-bit data to memory address.\r
-   \r
+\r
   This routine is called by the EBC data\r
   movement instructions that write to memory. Since these writes\r
   may be to the stack, which looks like (high address on top) this,\r
@@ -299,73 +296,24 @@ VmWriteMemN (
   [EBC stack]\r
 \r
   we need to detect all attempts to write to the EBC entry point argument\r
-  stack area and adjust the address (which will initially point into the \r
+  stack area and adjust the address (which will initially point into the\r
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
-  @retval EFI_SUCCESS       The instruction is executed successfully.  \r
+  @retval EFI_SUCCESS       The instruction is executed successfully.\r
   @retval Other             Some error occurs when writing data to the address.\r
 \r
 **/\r
 EFI_STATUS\r
 VmWriteMem64 (\r
-  IN VM_CONTEXT *VmPtr,\r
-  UINTN         Addr,\r
-  IN UINT64     Data\r
-  )\r
-;\r
-\r
-//\r
-// Define a protocol for an EBC VM test interface.\r
-//\r
-#define EFI_EBC_VM_TEST_PROTOCOL_GUID \\r
-  { \\r
-    0xAAEACCFDL, 0xF27B, 0x4C17, { 0xB6, 0x10, 0x75, 0xCA, 0x1F, 0x2D, 0xFB, 0x52 } \\r
-  }\r
-\r
-//\r
-// Define for forward reference.\r
-//\r
-typedef struct _EFI_EBC_VM_TEST_PROTOCOL EFI_EBC_VM_TEST_PROTOCOL;\r
-\r
-typedef\r
-EFI_STATUS\r
-(*EBC_VM_TEST_EXECUTE) (\r
-  IN EFI_EBC_VM_TEST_PROTOCOL         * This,\r
-  IN VM_CONTEXT                       * VmPtr,\r
-  IN OUT UINTN                        *InstructionCount\r
-  );\r
-\r
-typedef\r
-EFI_STATUS\r
-(*EBC_VM_TEST_ASM) (\r
-  IN EFI_EBC_VM_TEST_PROTOCOL         * This,\r
-  IN CHAR16                           *AsmText,\r
-  IN OUT INT8                         *Buffer,\r
-  IN OUT UINTN                        *BufferLen\r
-  );\r
-\r
-typedef\r
-EFI_STATUS\r
-(*EBC_VM_TEST_DASM) (\r
-  IN EFI_EBC_VM_TEST_PROTOCOL         * This,\r
-  IN OUT CHAR16                       *AsmText,\r
-  IN OUT INT8                         *Buffer,\r
-  IN OUT UINTN                        *Len\r
+  IN VM_CONTEXT   *VmPtr,\r
+  IN UINTN        Addr,\r
+  IN UINT64       Data\r
   );\r
 \r
-//\r
-// Prototype for the actual EBC test protocol interface\r
-//\r
-struct _EFI_EBC_VM_TEST_PROTOCOL {\r
-  EBC_VM_TEST_EXECUTE Execute;\r
-  EBC_VM_TEST_ASM     Assemble;\r
-  EBC_VM_TEST_DASM    Disassemble;\r
-};\r
-\r
 /**\r
   Given a pointer to a new VM context, execute one or more instructions. This\r
   function is only used for test purposes via the EBC VM test protocol.\r
@@ -381,11 +329,11 @@ struct _EFI_EBC_VM_TEST_PROTOCOL {
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 EbcExecuteInstructions (\r
   IN EFI_EBC_VM_TEST_PROTOCOL *This,\r
   IN VM_CONTEXT               *VmPtr,\r
   IN OUT UINTN                *InstructionCount\r
-  )\r
-;\r
+  );\r
 \r
 #endif // ifndef _EBC_EXECUTE_H_\r