]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / EbcSimpleDebugger.h
CommitLineData
c8ad2d7a
LG
1/** @file\r
2 EBC Simple Debugger protocol for debug EBC code.\r
3\r
d1102dba 4Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
c8ad2d7a
LG
5\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions\r
8of the BSD License which accompanies this distribution. The\r
9full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
11\r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r
18#define _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r
19\r
89a90ae6
LG
20#include <Protocol/DebugSupport.h>\r
21#include <Protocol/EbcVmTest.h>\r
c8ad2d7a
LG
22\r
23#define EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID \\r
24 { \\r
25 0x2a72d11e, 0x7376, 0x40f6, { 0x9c, 0x68, 0x23, 0xfa, 0x2f, 0xe3, 0x63, 0xf1 } \\r
26 }\r
27\r
28//\r
29// Defines for a simple EBC debugger interface\r
30//\r
31typedef struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL;\r
32\r
33/**\r
34 Trig Exception on EBC VM.\r
35\r
36 @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
37 @param[in] VmPtr A pointer to a VM context.\r
38 @param[in] ExceptionType Exception to be trigged.\r
39\r
40 @retval EFI_UNSUPPORTED No support for it.\r
41 @retval EFI_SUCCESS Exception is trigged.\r
42\r
43**/\r
44typedef\r
45EFI_STATUS\r
46(EFIAPI *EBC_DEBUGGER_SIGNAL_EXCEPTION) (\r
47 IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r
48 IN VM_CONTEXT *VmPtr,\r
49 IN EFI_EXCEPTION_TYPE ExceptionType\r
50 );\r
51\r
52/**\r
53 Given a pointer to a new VM context, debug one or more instructions.\r
54\r
55 @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
56 @param[in] VmPtr A pointer to a VM context.\r
57\r
58 @retval EFI_UNSUPPORTED No support for it.\r
59 @retval EFI_SUCCESS Debug one or more instructions.\r
60\r
61**/\r
62typedef\r
63VOID\r
64(EFIAPI *EBC_DEBUGGER_DEBUG) (\r
65 IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r
66 IN VM_CONTEXT *VmPtr\r
67 );\r
68\r
69/**\r
70 Given a pointer to a new VM context, dump one or more instructions.\r
71\r
72 @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
73 @param[in] VmPtr A pointer to a VM context.\r
d1102dba 74 @param[in] DasmString Dump string buffer.\r
c8ad2d7a
LG
75 @param[in] DasmStringSize Dump string size.\r
76\r
77 @retval EFI_UNSUPPORTED No support for it.\r
78 @retval EFI_SUCCESS Dump one or more instructions.\r
79\r
80**/\r
81typedef\r
82UINT32\r
83(EFIAPI *EBC_DEBUGGER_DASM) (\r
84 IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r
85 IN VM_CONTEXT *VmPtr,\r
86 IN UINT16 *DasmString OPTIONAL,\r
87 IN UINT32 DasmStringSize\r
88 );\r
89\r
90/**\r
91 This interface allows you to configure the EBC debug support\r
92 driver. For example, turn on or off saving and printing of\r
93 delta VM even if called. Or to even disable the entire interface,\r
94 in which case all functions become no-ops.\r
95\r
96 @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r
97 @param[in] ConfigId ID to be configured.\r
98 @param[in] ConfigValue Value to be set.\r
99\r
100 @retval EFI_UNSUPPORTED No support for it.\r
101 @retval EFI_SUCCESS Configure EBC debug.\r
102\r
103**/\r
104typedef\r
105EFI_STATUS\r
106(EFIAPI *EBC_DEBUGGER_CONFIGURE) (\r
107 IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r
108 IN UINT32 ConfigId,\r
109 IN UINTN ConfigValue\r
110 );\r
111\r
112//\r
113// Prototype for the actual EBC debug support protocol interface\r
114//\r
115struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL {\r
116 EBC_DEBUGGER_DEBUG Debugger;\r
117 EBC_DEBUGGER_SIGNAL_EXCEPTION SignalException;\r
118 EBC_DEBUGGER_DASM Dasm;\r
119 EBC_DEBUGGER_CONFIGURE Configure;\r
120};\r
121\r
122extern EFI_GUID gEfiEbcSimpleDebuggerProtocolGuid;\r
123\r
124#endif\r