]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.h
MdeModulePkg/EbcDxe: Add comments for functions
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebuggerHook.h
CommitLineData
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
34EFI_STATUS\r
35EbcDebugSignalException (\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
49VOID\r
50EbcDebuggerHookInit (\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
57The hook in UnloadImage for EBC Interpreter.\r
58\r
59**/\r
6f0a3cd2
PB
60VOID\r
61EbcDebuggerHookUnload (\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
73VOID\r
74EbcDebuggerHookEbcUnloadImage (\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
86VOID\r
87EbcDebuggerHookExecuteEbcImageEntryPoint (\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
98VOID\r
99EbcDebuggerHookEbcInterpret (\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
110VOID\r
111EbcDebuggerHookExecuteStart (\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
121VOID\r
122EbcDebuggerHookExecuteEnd (\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
132VOID\r
133EbcDebuggerHookCALLStart (\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
144VOID\r
145EbcDebuggerHookCALLEnd (\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
156VOID\r
157EbcDebuggerHookCALLEXStart (\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
168VOID\r
169EbcDebuggerHookCALLEXEnd (\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
180VOID\r
181EbcDebuggerHookRETStart (\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
193VOID\r
194EbcDebuggerHookRETEnd (\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
206VOID\r
207EbcDebuggerHookJMPStart (\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
218VOID\r
219EbcDebuggerHookJMPEnd (\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
230VOID\r
231EbcDebuggerHookJMP8Start (\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
242VOID\r
243EbcDebuggerHookJMP8End (\r
244 IN VM_CONTEXT *VmPtr\r
245 );\r
246\r
247#endif\r