]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/DebugSupport/Dxe/ipf/plDebugSupport.h
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
[mirror_edk2.git] / EdkModulePkg / Universal / DebugSupport / Dxe / ipf / plDebugSupport.h
CommitLineData
5fd59c65 1/**@file\r
2 IPF specific debugsupport types, macros, and definitions.\r
3 \r
4Copyright (c) 2004 - 2006 Intel Corporation \r
5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
15#ifndef _PLDEBUG_SUPPORT_H\r
16#define _PLDEBUG_SUPPORT_H\r
17\r
18\r
19#define DISABLE_INTERRUPTS 0UL\r
20\r
21//\r
22// The remaining definitions comprise the protocol members.\r
23//\r
24#define EFI_ISA IsaIpf\r
25\r
26//\r
27// processor specific functions that must be public\r
28//\r
29EFI_STATUS\r
30plInitializeDebugSupportDriver (\r
31 VOID\r
32 )\r
33/*++\r
34\r
35Routine Description:\r
36 IPF specific DebugSupport driver initialization. Must be public because it's\r
37 referenced from DebugSupport.c\r
38\r
39Arguments:\r
40\r
41Returns:\r
42\r
43 EFI_SUCCESS\r
44\r
45--*/\r
46;\r
47\r
48EFI_STATUS\r
49EFIAPI\r
50plUnloadDebugSupportDriver (\r
51 IN EFI_HANDLE ImageHandle\r
52 )\r
53/*++\r
54\r
55Routine Description:\r
56 Unload handler that is called during UnloadImage() - deallocates pool memory\r
57 used by the driver. Must be public because it's referenced from DebugSuport.c\r
58\r
59Arguments:\r
60 ImageHandle - Image handle\r
61\r
62Returns:\r
63\r
64 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
65\r
66--*/\r
67;\r
68\r
69//\r
70// Assembly worker functions and data referenced from plDebugSupport.c\r
71//\r
72VOID *\r
73GetIva (\r
74 VOID\r
75 )\r
76/*++\r
77\r
78Routine Description:\r
79\r
80 C callable function to obtain the current value of IVA\r
81\r
82Arguments:\r
83\r
84 None\r
85\r
86Returns:\r
87\r
88 Current value if IVA\r
89\r
90--*/\r
91;\r
92\r
93VOID\r
94HookStub (\r
95 VOID\r
96 )\r
97/*++\r
98\r
99Routine Description:\r
100\r
101 HookStub will be copied from it's loaded location into the IVT when\r
102 an IVT entry is hooked.\r
103\r
104Arguments:\r
105\r
106 None\r
107\r
108Returns:\r
109\r
110 None\r
111\r
112--*/\r
113;\r
114\r
115VOID\r
116ChainHandler (\r
117 VOID\r
118 )\r
119/*++\r
120\r
121Routine Description:\r
122\r
123 Chains an interrupt handler\r
124\r
125Arguments:\r
126\r
127 None\r
128\r
129Returns:\r
130\r
131 None\r
132\r
133--*/\r
134;\r
135\r
136VOID\r
137UnchainHandler (\r
138 VOID\r
139 )\r
140/*++\r
141\r
142Routine Description:\r
143\r
144 Unchains an interrupt handler\r
145\r
146Arguments:\r
147\r
148 None\r
149\r
150Returns:\r
151\r
152 None\r
153\r
154--*/\r
155;\r
156\r
157UINT64\r
158ProgramInterruptFlags (\r
159 IN UINT64 NewInterruptState\r
160 )\r
161/*++\r
162\r
163Routine Description:\r
164\r
165 C callable function to enable/disable interrupts\r
166\r
167Arguments:\r
168\r
169 NewInterruptState - New Interrupt State\r
170\r
171Returns:\r
172\r
173 Previous state of psr.ic\r
174\r
175--*/\r
176;\r
177\r
178VOID\r
179InstructionCacheFlush (\r
180 IN VOID *StartAddress,\r
181 IN UINTN SizeInBytes\r
182 )\r
183/*++\r
184\r
185Routine Description:\r
186\r
187 Flushes instruction cache for specified number of bytes\r
188\r
189Arguments:\r
190\r
191 StartAddress - Cache Start Address\r
192 SizeInBytes - Cache Size\r
193\r
194Returns:\r
195\r
196 None\r
197\r
198--*/\r
199;\r
200\r
201EFI_STATUS\r
202EFIAPI\r
203GetMaximumProcessorIndex (\r
204 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
205 OUT UINTN *MaxProcessorIndex\r
206 )\r
207/*++\r
208\r
209Routine Description: This is a DebugSupport protocol member function. Hard\r
210 coded to support only 1 processor for now.\r
211\r
212Arguments:\r
213 This - The DebugSupport instance\r
214 MaxProcessorIndex - The maximuim supported processor index\r
215\r
216Returns:\r
217 Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
218\r
219--*/\r
220;\r
221\r
222EFI_STATUS\r
223EFIAPI\r
224RegisterPeriodicCallback (\r
225 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
226 IN UINTN ProcessorIndex,\r
227 IN EFI_PERIODIC_CALLBACK PeriodicCallback\r
228 )\r
229/*++\r
230\r
231Routine Description:\r
232 DebugSupport protocol member function\r
233\r
234Arguments:\r
235 This - The DebugSupport instance\r
236 ProcessorIndex - Which processor the callback applies to.\r
237 PeriodicCallback - Callback function\r
238\r
239Returns:\r
240\r
241 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
242\r
243--*/\r
244;\r
245\r
246EFI_STATUS\r
247EFIAPI\r
248RegisterExceptionCallback (\r
249 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
250 IN UINTN ProcessorIndex,\r
251 IN EFI_EXCEPTION_CALLBACK NewHandler,\r
252 IN EFI_EXCEPTION_TYPE ExceptionType\r
253 )\r
254/*++\r
255\r
256Routine Description:\r
257 DebugSupport protocol member function\r
258\r
259Arguments:\r
260 This - The DebugSupport instance\r
261 ProcessorIndex - Which processor the callback applies to.\r
262 NewCallback - Callback function\r
263 ExceptionType - Which exception to hook\r
264\r
265Returns:\r
266\r
267 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
268\r
269--*/\r
270;\r
271\r
272EFI_STATUS\r
273EFIAPI\r
274InvalidateInstructionCache (\r
275 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
276 IN UINTN ProcessorIndex,\r
277 IN VOID *Start,\r
278 IN UINTN Length\r
279 )\r
280/*++\r
281\r
282Routine Description:\r
283 DebugSupport protocol member function. Calls assembly routine to flush cache.\r
284\r
285Arguments:\r
286 This - The DebugSupport instance\r
287 ProcessorIndex - Which processor the callback applies to.\r
288 Start - Physical base of the memory range to be invalidated\r
289 Length - mininum number of bytes in instruction cache to invalidate\r
290\r
291Returns:\r
292 EFI_SUCCESS\r
293\r
294--*/\r
295;\r
296\r
1cc8ee78 297VOID\r
298CommonHandler (\r
299 IN EFI_EXCEPTION_TYPE ExceptionType,\r
300 IN EFI_SYSTEM_CONTEXT Context\r
301 )\r
302/*++\r
303\r
304Routine Description:\r
305 C routine that is called for all registered exceptions. This is the main\r
306 exception dispatcher. Must be public because it's referenced from AsmFuncs.s.\r
307\r
308Arguments:\r
309 ExceptionType - Exception Type\r
310 Context - System Context\r
311\r
312Returns:\r
313\r
314 Nothing\r
315 \r
316--*/\r
317;\r
318\r
5fd59c65 319#endif\r