]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h
Add missing include for protocol header file.
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / Ipf / PlDebugSupport.h
CommitLineData
c1f23d63 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
ed7748fe 18\r
60c93673 19#include <Uefi.h>\r
ed7748fe 20\r
c1f23d63 21#include <Protocol/DebugSupport.h>\r
22#include <Protocol/LoadedImage.h>\r
ed7748fe 23\r
c1f23d63 24#include <Library/DebugLib.h>\r
25#include <Library/UefiDriverEntryPoint.h>\r
26#include <Library/BaseMemoryLib.h>\r
27#include <Library/MemoryAllocationLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/BaseLib.h>\r
30#include <Library/PcdLib.h>\r
31\r
32#define DISABLE_INTERRUPTS 0UL\r
33\r
34//\r
35// The remaining definitions comprise the protocol members.\r
36//\r
37#define EFI_ISA IsaIpf\r
38\r
39//\r
40// processor specific functions that must be public\r
41//\r
42EFI_STATUS\r
43plInitializeDebugSupportDriver (\r
44 VOID\r
45 )\r
46/*++\r
47\r
48Routine Description:\r
49 IPF specific DebugSupport driver initialization. Must be public because it's\r
50 referenced from DebugSupport.c\r
51\r
52Arguments:\r
53\r
54Returns:\r
55\r
56 EFI_SUCCESS\r
57\r
58--*/\r
59;\r
60\r
61EFI_STATUS\r
62EFIAPI\r
63plUnloadDebugSupportDriver (\r
64 IN EFI_HANDLE ImageHandle\r
65 )\r
66/*++\r
67\r
68Routine Description:\r
69 Unload handler that is called during UnloadImage() - deallocates pool memory\r
70 used by the driver. Must be public because it's referenced from DebugSuport.c\r
71\r
72Arguments:\r
73 ImageHandle - Image handle\r
74\r
75Returns:\r
76\r
77 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
78\r
79--*/\r
80;\r
81\r
82//\r
e9f9d09a 83// Assembly worker functions and data referenced from PlDebugSupport.c\r
c1f23d63 84//\r
85VOID *\r
86GetIva (\r
87 VOID\r
88 )\r
89/*++\r
90\r
91Routine Description:\r
92\r
93 C callable function to obtain the current value of IVA\r
94\r
95Arguments:\r
96\r
97 None\r
98\r
99Returns:\r
100\r
101 Current value if IVA\r
102\r
103--*/\r
104;\r
105\r
106VOID\r
107HookStub (\r
108 VOID\r
109 )\r
110/*++\r
111\r
112Routine Description:\r
113\r
114 HookStub will be copied from it's loaded location into the IVT when\r
115 an IVT entry is hooked.\r
116\r
117Arguments:\r
118\r
119 None\r
120\r
121Returns:\r
122\r
123 None\r
124\r
125--*/\r
126;\r
127\r
128VOID\r
129ChainHandler (\r
130 VOID\r
131 )\r
132/*++\r
133\r
134Routine Description:\r
135\r
136 Chains an interrupt handler\r
137\r
138Arguments:\r
139\r
140 None\r
141\r
142Returns:\r
143\r
144 None\r
145\r
146--*/\r
147;\r
148\r
149VOID\r
150UnchainHandler (\r
151 VOID\r
152 )\r
153/*++\r
154\r
155Routine Description:\r
156\r
157 Unchains an interrupt handler\r
158\r
159Arguments:\r
160\r
161 None\r
162\r
163Returns:\r
164\r
165 None\r
166\r
167--*/\r
168;\r
169\r
170UINT64\r
171ProgramInterruptFlags (\r
172 IN UINT64 NewInterruptState\r
173 )\r
174/*++\r
175\r
176Routine Description:\r
177\r
178 C callable function to enable/disable interrupts\r
179\r
180Arguments:\r
181\r
182 NewInterruptState - New Interrupt State\r
183\r
184Returns:\r
185\r
186 Previous state of psr.ic\r
187\r
188--*/\r
189;\r
190\r
191VOID\r
192InstructionCacheFlush (\r
193 IN VOID *StartAddress,\r
194 IN UINTN SizeInBytes\r
195 )\r
196/*++\r
197\r
198Routine Description:\r
199\r
200 Flushes instruction cache for specified number of bytes\r
201\r
202Arguments:\r
203\r
204 StartAddress - Cache Start Address\r
205 SizeInBytes - Cache Size\r
206\r
207Returns:\r
208\r
209 None\r
210\r
211--*/\r
212;\r
213\r
214EFI_STATUS\r
215EFIAPI\r
216GetMaximumProcessorIndex (\r
217 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
218 OUT UINTN *MaxProcessorIndex\r
219 )\r
220/*++\r
221\r
222Routine Description: This is a DebugSupport protocol member function. Hard\r
223 coded to support only 1 processor for now.\r
224\r
225Arguments:\r
226 This - The DebugSupport instance\r
227 MaxProcessorIndex - The maximuim supported processor index\r
228\r
229Returns:\r
230 Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
231\r
232--*/\r
233;\r
234\r
235EFI_STATUS\r
236EFIAPI\r
237RegisterPeriodicCallback (\r
238 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
239 IN UINTN ProcessorIndex,\r
240 IN EFI_PERIODIC_CALLBACK PeriodicCallback\r
241 )\r
242/*++\r
243\r
244Routine Description:\r
245 DebugSupport protocol member function\r
246\r
247Arguments:\r
248 This - The DebugSupport instance\r
249 ProcessorIndex - Which processor the callback applies to.\r
250 PeriodicCallback - Callback function\r
251\r
252Returns:\r
253\r
254 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
255\r
256--*/\r
257;\r
258\r
259EFI_STATUS\r
260EFIAPI\r
261RegisterExceptionCallback (\r
262 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
263 IN UINTN ProcessorIndex,\r
264 IN EFI_EXCEPTION_CALLBACK NewHandler,\r
265 IN EFI_EXCEPTION_TYPE ExceptionType\r
266 )\r
267/*++\r
268\r
269Routine Description:\r
270 DebugSupport protocol member function\r
271\r
272Arguments:\r
273 This - The DebugSupport instance\r
274 ProcessorIndex - Which processor the callback applies to.\r
275 NewCallback - Callback function\r
276 ExceptionType - Which exception to hook\r
277\r
278Returns:\r
279\r
280 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
281\r
282--*/\r
283;\r
284\r
285EFI_STATUS\r
286EFIAPI\r
287InvalidateInstructionCache (\r
288 IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
289 IN UINTN ProcessorIndex,\r
290 IN VOID *Start,\r
291 IN UINTN Length\r
292 )\r
293/*++\r
294\r
295Routine Description:\r
296 DebugSupport protocol member function. Calls assembly routine to flush cache.\r
297\r
298Arguments:\r
299 This - The DebugSupport instance\r
300 ProcessorIndex - Which processor the callback applies to.\r
301 Start - Physical base of the memory range to be invalidated\r
302 Length - mininum number of bytes in instruction cache to invalidate\r
303\r
304Returns:\r
305 EFI_SUCCESS\r
306\r
307--*/\r
308;\r
309\r
310VOID\r
311CommonHandler (\r
312 IN EFI_EXCEPTION_TYPE ExceptionType,\r
313 IN EFI_SYSTEM_CONTEXT Context\r
314 )\r
315/*++\r
316\r
317Routine Description:\r
318 C routine that is called for all registered exceptions. This is the main\r
319 exception dispatcher. Must be public because it's referenced from AsmFuncs.s.\r
320\r
321Arguments:\r
322 ExceptionType - Exception Type\r
323 Context - System Context\r
324\r
325Returns:\r
326\r
327 Nothing\r
328 \r
329--*/\r
330;\r
331\r
332#endif\r