]>
Commit | Line | Data |
---|---|---|
6f0a3cd2 PB |
1 | /** @file\r |
2 | Prototypes for the EBC Debugger hooks.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _EFI_EBC_DEBUGGER_HOOK_H_\r | |
16 | #define _EFI_EBC_DEBUGGER_HOOK_H_\r | |
17 | \r | |
3e2c7843 PB |
18 | #include <Uefi.h>\r |
19 | \r | |
20 | #include <Protocol/DebugSupport.h>\r | |
21 | #include <Protocol/EbcVmTest.h>\r | |
22 | \r | |
23 | /**\r | |
24 | The VM interpreter calls this function when an exception is detected.\r | |
25 | \r | |
26 | @param ExceptionType Specifies the processor exception detected.\r | |
27 | @param ExceptionFlags Specifies the exception context.\r | |
28 | @param VmPtr Pointer to a VM context for passing info to the\r | |
29 | EFI debugger.\r | |
30 | \r | |
31 | @retval EFI_SUCCESS This function completed successfully.\r | |
32 | \r | |
33 | **/\r | |
34 | EFI_STATUS\r | |
35 | EbcDebugSignalException (\r | |
36 | IN EFI_EXCEPTION_TYPE ExceptionType,\r | |
37 | IN EXCEPTION_FLAGS ExceptionFlags,\r | |
38 | IN VM_CONTEXT *VmPtr\r | |
39 | );\r | |
40 | \r | |
d138a2e9 DB |
41 | /**\r |
42 | \r | |
43 | The hook in InitializeEbcDriver.\r | |
44 | \r | |
45 | @param Handle - The EbcDebugProtocol handle.\r | |
46 | @param EbcDebugProtocol - The EbcDebugProtocol interface.\r | |
47 | \r | |
48 | **/\r | |
6f0a3cd2 PB |
49 | VOID\r |
50 | EbcDebuggerHookInit (\r | |
51 | IN EFI_HANDLE Handle,\r | |
52 | IN EFI_DEBUG_SUPPORT_PROTOCOL *EbcDebugProtocol\r | |
53 | );\r | |
54 | \r | |
d138a2e9 DB |
55 | /**\r |
56 | \r | |
57 | The hook in UnloadImage for EBC Interpreter.\r | |
58 | \r | |
59 | **/\r | |
6f0a3cd2 PB |
60 | VOID\r |
61 | EbcDebuggerHookUnload (\r | |
62 | VOID\r | |
63 | );\r | |
64 | \r | |
d138a2e9 DB |
65 | /**\r |
66 | \r | |
67 | The hook in EbcUnloadImage.\r | |
68 | Currently do nothing here.\r | |
69 | \r | |
70 | @param Handle The EbcImage handle.\r | |
71 | \r | |
72 | **/\r | |
6f0a3cd2 PB |
73 | VOID\r |
74 | EbcDebuggerHookEbcUnloadImage (\r | |
75 | IN EFI_HANDLE Handle\r | |
76 | );\r | |
77 | \r | |
d138a2e9 DB |
78 | \r |
79 | /**\r | |
80 | \r | |
81 | Hooks in EbcSupport.c\r | |
82 | \r | |
83 | @param VmPtr - pointer to VM context.\r | |
84 | \r | |
85 | **/\r | |
6f0a3cd2 PB |
86 | VOID\r |
87 | EbcDebuggerHookExecuteEbcImageEntryPoint (\r | |
88 | IN VM_CONTEXT *VmPtr\r | |
89 | );\r | |
90 | \r | |
d138a2e9 DB |
91 | /**\r |
92 | \r | |
93 | The hook in ExecuteEbcImageEntryPoint.\r | |
94 | \r | |
95 | @param VmPtr - pointer to VM context.\r | |
96 | \r | |
97 | **/\r | |
6f0a3cd2 PB |
98 | VOID\r |
99 | EbcDebuggerHookEbcInterpret (\r | |
100 | IN VM_CONTEXT *VmPtr\r | |
101 | );\r | |
102 | \r | |
d138a2e9 DB |
103 | \r |
104 | /**\r | |
105 | The hook in EbcExecute, before ExecuteFunction.\r | |
106 | \r | |
107 | @param VmPtr - pointer to VM context.\r | |
108 | \r | |
109 | **/\r | |
6f0a3cd2 PB |
110 | VOID\r |
111 | EbcDebuggerHookExecuteStart (\r | |
112 | IN VM_CONTEXT *VmPtr\r | |
113 | );\r | |
114 | \r | |
d138a2e9 DB |
115 | /**\r |
116 | The hook in EbcExecute, after ExecuteFunction.\r | |
117 | \r | |
118 | @param VmPtr - pointer to VM context.\r | |
119 | \r | |
120 | **/\r | |
6f0a3cd2 PB |
121 | VOID\r |
122 | EbcDebuggerHookExecuteEnd (\r | |
123 | IN VM_CONTEXT *VmPtr\r | |
124 | );\r | |
125 | \r | |
d138a2e9 DB |
126 | /**\r |
127 | The hook in ExecuteCALL, before move IP.\r | |
128 | \r | |
129 | @param VmPtr - pointer to VM context.\r | |
130 | \r | |
131 | **/\r | |
6f0a3cd2 PB |
132 | VOID\r |
133 | EbcDebuggerHookCALLStart (\r | |
134 | IN VM_CONTEXT *VmPtr\r | |
135 | );\r | |
136 | \r | |
d138a2e9 DB |
137 | /**\r |
138 | \r | |
139 | The hook in ExecuteCALL, after move IP.\r | |
140 | \r | |
141 | @param VmPtr - pointer to VM context.\r | |
142 | \r | |
143 | **/\r | |
6f0a3cd2 PB |
144 | VOID\r |
145 | EbcDebuggerHookCALLEnd (\r | |
146 | IN VM_CONTEXT *VmPtr\r | |
147 | );\r | |
148 | \r | |
d138a2e9 DB |
149 | /**\r |
150 | \r | |
151 | The hook in ExecuteCALL, before call EbcLLCALLEX.\r | |
152 | \r | |
153 | @param VmPtr - pointer to VM context.\r | |
154 | \r | |
155 | **/\r | |
6f0a3cd2 PB |
156 | VOID\r |
157 | EbcDebuggerHookCALLEXStart (\r | |
158 | IN VM_CONTEXT *VmPtr\r | |
159 | );\r | |
160 | \r | |
d138a2e9 DB |
161 | /**\r |
162 | \r | |
163 | The hook in ExecuteCALL, after call EbcLLCALLEX.\r | |
164 | \r | |
165 | @param VmPtr - pointer to VM context.\r | |
166 | \r | |
167 | **/\r | |
6f0a3cd2 PB |
168 | VOID\r |
169 | EbcDebuggerHookCALLEXEnd (\r | |
170 | IN VM_CONTEXT *VmPtr\r | |
171 | );\r | |
172 | \r | |
d138a2e9 DB |
173 | /**\r |
174 | \r | |
175 | The hook in ExecuteRET, before move IP.\r | |
176 | \r | |
177 | @param VmPtr - pointer to VM context.\r | |
178 | \r | |
179 | **/\r | |
6f0a3cd2 PB |
180 | VOID\r |
181 | EbcDebuggerHookRETStart (\r | |
182 | IN VM_CONTEXT *VmPtr\r | |
183 | );\r | |
184 | \r | |
d138a2e9 DB |
185 | /**\r |
186 | \r | |
187 | The hook in ExecuteRET, after move IP.\r | |
188 | It will record trace information.\r | |
189 | \r | |
190 | @param VmPtr - pointer to VM context.\r | |
191 | \r | |
192 | **/\r | |
6f0a3cd2 PB |
193 | VOID\r |
194 | EbcDebuggerHookRETEnd (\r | |
195 | IN VM_CONTEXT *VmPtr\r | |
196 | );\r | |
197 | \r | |
d138a2e9 DB |
198 | \r |
199 | /**\r | |
200 | \r | |
201 | The hook in ExecuteJMP, before move IP.\r | |
202 | \r | |
203 | @param VmPtr - pointer to VM context.\r | |
204 | \r | |
205 | **/\r | |
6f0a3cd2 PB |
206 | VOID\r |
207 | EbcDebuggerHookJMPStart (\r | |
208 | IN VM_CONTEXT *VmPtr\r | |
209 | );\r | |
210 | \r | |
d138a2e9 DB |
211 | /**\r |
212 | \r | |
213 | The hook in ExecuteJMP, after move IP.\r | |
214 | \r | |
215 | @param VmPtr - pointer to VM context.\r | |
216 | \r | |
217 | **/\r | |
6f0a3cd2 PB |
218 | VOID\r |
219 | EbcDebuggerHookJMPEnd (\r | |
220 | IN VM_CONTEXT *VmPtr\r | |
221 | );\r | |
222 | \r | |
d138a2e9 DB |
223 | /**\r |
224 | \r | |
225 | The hook in ExecuteJMP8, before move IP.\r | |
226 | \r | |
227 | @param VmPtr - pointer to VM context.\r | |
228 | \r | |
229 | **/\r | |
6f0a3cd2 PB |
230 | VOID\r |
231 | EbcDebuggerHookJMP8Start (\r | |
232 | IN VM_CONTEXT *VmPtr\r | |
233 | );\r | |
234 | \r | |
d138a2e9 DB |
235 | /**\r |
236 | \r | |
237 | The hook in ExecuteJMP8, after move IP..\r | |
238 | \r | |
239 | @param VmPtr - pointer to VM context.\r | |
240 | \r | |
241 | **/\r | |
6f0a3cd2 PB |
242 | VOID\r |
243 | EbcDebuggerHookJMP8End (\r | |
244 | IN VM_CONTEXT *VmPtr\r | |
245 | );\r | |
246 | \r | |
247 | #endif\r |