26CopyExceptionHandlers (
27 IN PHYSICAL_ADDRESS BaseAddress
32RegisterExceptionHandler (
38ExceptionHandlersStart (
53extern UINTN gMaxExceptionNumber;
56extern PHYSICAL_ADDRESS gExceptionVectorAlignmentMask;
57extern UINTN gDebuggerNoHandlerValue;
65#if defined (ARM_RELOCATE_VECTORS)
89InitializeCpuExceptionHandlers (
99 if (gArmRelocateVectorTable) {
100 VectorBase =
PcdGet64 (PcdCpuVectorBaseAddress);
101 Status = CopyExceptionHandlers (VectorBase);
112 ASSERT (((
UINTN)ExceptionHandlersStart & gExceptionVectorAlignmentMask) == 0);
116 VectorBase = (
UINTN)ExceptionHandlersStart;
124 ArchVectorConfig (VectorBase);
126 ArmWriteVBar (VectorBase);
150CopyExceptionHandlers (
151 IN PHYSICAL_ADDRESS BaseAddress
154 RETURN_STATUS Status;
160 ASSERT ((BaseAddress & gExceptionVectorAlignmentMask) == 0);
165 Length = (
UINTN)ExceptionHandlersEnd - (
UINTN)ExceptionHandlersStart;
167 VectorBase = (UINT32 *)(
UINTN)BaseAddress;
175 CopyMem ((VOID *)VectorBase, (VOID *)ExceptionHandlersStart, Length);
180 for (Index = 0; Index <= gMaxExceptionNumber; Index++) {
182 (gDebuggerExceptionHandlers[Index] == 0) || (gDebuggerExceptionHandlers[Index] == (VOID *)gDebuggerNoHandlerValue))
184 Status = RegisterExceptionHandler (Index,
NULL);
188 VectorBase[Index] = (UINT32)(
UINTN)gDebuggerExceptionHandlers[Index];
224RegisterCpuInterruptHandler (
229 if (ExceptionType > gMaxExceptionNumber) {
233 if ((ExceptionHandler !=
NULL) && (gExceptionHandlers[ExceptionType] !=
NULL)) {
237 gExceptionHandlers[ExceptionType] = ExceptionHandler;
261RegisterExceptionHandler (
266 return RegisterCpuInterruptHandler (ExceptionType, InterruptHandler);
271CommonCExceptionHandler (
276 if (ExceptionType <= gMaxExceptionNumber) {
277 if (gExceptionHandlers[ExceptionType]) {
278 gExceptionHandlers[ExceptionType](ExceptionType, SystemContext);
282 DEBUG ((DEBUG_ERROR,
"Unknown exception type %d\n", ExceptionType));
305InitializeSeparateExceptionStacks (
VOID *EFIAPI InvalidateInstructionCacheRange(IN VOID *Address, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID(EFIAPI * EFI_CPU_INTERRUPT_HANDLER)(IN CONST EFI_EXCEPTION_TYPE InterruptType, IN CONST EFI_SYSTEM_CONTEXT SystemContext)
VOID DefaultExceptionHandler(IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
#define RETURN_ERROR(StatusCode)
#define RETURN_UNSUPPORTED
#define RETURN_ALREADY_STARTED
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
VOID(EFIAPI * EFI_EXCEPTION_CALLBACK)(IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
#define PcdGet64(TokenName)
#define FeaturePcdGet(TokenName)