]>
Commit | Line | Data |
---|---|---|
c8ad2d7a LG |
1 | /** @file\r |
2 | EBC Simple Debugger protocol for debug EBC code.\r | |
3 | \r | |
4 | Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions\r | |
8 | of the BSD License which accompanies this distribution. The\r | |
9 | full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT 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 | |
31 | typedef 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 | |
44 | typedef\r | |
45 | EFI_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 | |
62 | typedef\r | |
63 | VOID\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 | |
74 | @param[in] DasmString Dump string buffer. \r | |
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 | |
81 | typedef\r | |
82 | UINT32\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 | |
104 | typedef\r | |
105 | EFI_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 | |
115 | struct _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 | |
122 | extern EFI_GUID gEfiEbcSimpleDebuggerProtocolGuid;\r | |
123 | \r | |
124 | #endif\r |