2 IPF specific debugsupport types, macros, and definitions.
4 Copyright (c) 2004 - 2006 Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _PLDEBUG_SUPPORT_H
16 #define _PLDEBUG_SUPPORT_H
19 #define DISABLE_INTERRUPTS 0UL
22 // The remaining definitions comprise the protocol members.
24 #define EFI_ISA IsaIpf
27 // processor specific functions that must be public
30 plInitializeDebugSupportDriver (
36 IPF specific DebugSupport driver initialization. Must be public because it's
37 referenced from DebugSupport.c
50 plUnloadDebugSupportDriver (
51 IN EFI_HANDLE ImageHandle
56 Unload handler that is called during UnloadImage() - deallocates pool memory
57 used by the driver. Must be public because it's referenced from DebugSuport.c
60 ImageHandle - Image handle
64 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.
70 // Assembly worker functions and data referenced from plDebugSupport.c
80 C callable function to obtain the current value of IVA
101 HookStub will be copied from it's loaded location into the IVT when
102 an IVT entry is hooked.
123 Chains an interrupt handler
144 Unchains an interrupt handler
158 ProgramInterruptFlags (
159 IN UINT64 NewInterruptState
165 C callable function to enable/disable interrupts
169 NewInterruptState - New Interrupt State
173 Previous state of psr.ic
179 InstructionCacheFlush (
180 IN VOID
*StartAddress
,
187 Flushes instruction cache for specified number of bytes
191 StartAddress - Cache Start Address
192 SizeInBytes - Cache Size
203 GetMaximumProcessorIndex (
204 IN EFI_DEBUG_SUPPORT_PROTOCOL
*This
,
205 OUT UINTN
*MaxProcessorIndex
209 Routine Description: This is a DebugSupport protocol member function. Hard
210 coded to support only 1 processor for now.
213 This - The DebugSupport instance
214 MaxProcessorIndex - The maximuim supported processor index
217 Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0
224 RegisterPeriodicCallback (
225 IN EFI_DEBUG_SUPPORT_PROTOCOL
*This
,
226 IN UINTN ProcessorIndex
,
227 IN EFI_PERIODIC_CALLBACK PeriodicCallback
232 DebugSupport protocol member function
235 This - The DebugSupport instance
236 ProcessorIndex - Which processor the callback applies to.
237 PeriodicCallback - Callback function
241 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.
248 RegisterExceptionCallback (
249 IN EFI_DEBUG_SUPPORT_PROTOCOL
*This
,
250 IN UINTN ProcessorIndex
,
251 IN EFI_EXCEPTION_CALLBACK NewHandler
,
252 IN EFI_EXCEPTION_TYPE ExceptionType
257 DebugSupport protocol member function
260 This - The DebugSupport instance
261 ProcessorIndex - Which processor the callback applies to.
262 NewCallback - Callback function
263 ExceptionType - Which exception to hook
267 EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.
274 InvalidateInstructionCache (
275 IN EFI_DEBUG_SUPPORT_PROTOCOL
*This
,
276 IN UINTN ProcessorIndex
,
283 DebugSupport protocol member function. Calls assembly routine to flush cache.
286 This - The DebugSupport instance
287 ProcessorIndex - Which processor the callback applies to.
288 Start - Physical base of the memory range to be invalidated
289 Length - mininum number of bytes in instruction cache to invalidate
299 IN EFI_EXCEPTION_TYPE ExceptionType
,
300 IN EFI_SYSTEM_CONTEXT Context
305 C routine that is called for all registered exceptions. This is the main
306 exception dispatcher. Must be public because it's referenced from AsmFuncs.s.
309 ExceptionType - Exception Type
310 Context - System Context