]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h
Clean up the private GUID definition in module Level.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / EbcSimpleDebugger.h
diff --git a/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h b/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h
new file mode 100644 (file)
index 0000000..1db01e3
--- /dev/null
@@ -0,0 +1,124 @@
+/** @file\r
+  EBC Simple Debugger protocol for debug EBC code.\r
+\r
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions\r
+of the BSD License which accompanies this distribution.  The\r
+full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r
+#define _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r
+\r
+#include <Protocol\DebugSupport.h>\r
+#include <Protocol\EbcVmTest.h>\r
+\r
+#define EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID \\r
+  { \\r
+    0x2a72d11e, 0x7376, 0x40f6, { 0x9c, 0x68, 0x23, 0xfa, 0x2f, 0xe3, 0x63, 0xf1 } \\r
+  }\r
+\r
+//\r
+// Defines for a simple EBC debugger interface\r
+//\r
+typedef struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL;\r
+\r
+/**\r
+  Trig Exception on EBC VM.\r
+\r
+  @param[in] This           A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
+  @param[in] VmPtr          A pointer to a VM context.\r
+  @param[in] ExceptionType  Exception to be trigged.\r
+\r
+  @retval EFI_UNSUPPORTED       No support for it.\r
+  @retval EFI_SUCCESS           Exception is trigged.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EBC_DEBUGGER_SIGNAL_EXCEPTION) (\r
+  IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL           *This,\r
+  IN VM_CONTEXT                                 *VmPtr,\r
+  IN EFI_EXCEPTION_TYPE                         ExceptionType\r
+  );\r
+\r
+/**\r
+  Given a pointer to a new VM context, debug one or more instructions.\r
+\r
+  @param[in] This           A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
+  @param[in] VmPtr          A pointer to a VM context.\r
+\r
+  @retval EFI_UNSUPPORTED       No support for it.\r
+  @retval EFI_SUCCESS           Debug one or more instructions.\r
+\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *EBC_DEBUGGER_DEBUG) (\r
+  IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL           *This,\r
+  IN VM_CONTEXT                                 *VmPtr\r
+  );\r
+\r
+/**\r
+  Given a pointer to a new VM context, dump one or more instructions.\r
+\r
+  @param[in] This           A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
+  @param[in] VmPtr          A pointer to a VM context.\r
+  @param[in] DasmString     Dump string buffer. \r
+  @param[in] DasmStringSize Dump string size.\r
+\r
+  @retval EFI_UNSUPPORTED       No support for it.\r
+  @retval EFI_SUCCESS           Dump one or more instructions.\r
+\r
+**/\r
+typedef\r
+UINT32\r
+(EFIAPI *EBC_DEBUGGER_DASM) (\r
+  IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL           *This,\r
+  IN VM_CONTEXT                                 *VmPtr,\r
+  IN UINT16                                     *DasmString OPTIONAL,\r
+  IN UINT32                                     DasmStringSize\r
+  );\r
+\r
+/**\r
+  This interface allows you to configure the EBC debug support\r
+  driver. For example, turn on or off saving and printing of\r
+  delta VM even if called. Or to even disable the entire interface,\r
+  in which case all functions become no-ops.\r
+\r
+  @param[in] This           A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
+  @param[in] ConfigId       ID to be configured.\r
+  @param[in] ConfigValue    Value to be set.\r
+\r
+  @retval EFI_UNSUPPORTED       No support for it.\r
+  @retval EFI_SUCCESS           Configure EBC debug.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EBC_DEBUGGER_CONFIGURE) (\r
+  IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL           *This,\r
+  IN UINT32                                     ConfigId,\r
+  IN UINTN                                      ConfigValue\r
+  );\r
+\r
+//\r
+// Prototype for the actual EBC debug support protocol interface\r
+//\r
+struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL {\r
+  EBC_DEBUGGER_DEBUG            Debugger;\r
+  EBC_DEBUGGER_SIGNAL_EXCEPTION SignalException;\r
+  EBC_DEBUGGER_DASM             Dasm;\r
+  EBC_DEBUGGER_CONFIGURE        Configure;\r
+};\r
+\r
+extern EFI_GUID gEfiEbcSimpleDebuggerProtocolGuid;\r
+\r
+#endif\r