TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmException.c
Go to the documentation of this file.
1
9#include <PiSmm.h>
10#include "CpuExceptionCommon.h"
11
12CONST UINTN mDoFarReturnFlag = 1;
13
14RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
15EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
16EXCEPTION_HANDLER_DATA mExceptionHandlerData = {
17 CPU_EXCEPTION_NUM,
18 0, // To be fixed
19 mReservedVectorsData,
20 mExternalInterruptHandlerTable
21};
22
29VOID
30EFIAPI
32 IN EFI_EXCEPTION_TYPE ExceptionType,
33 IN EFI_SYSTEM_CONTEXT SystemContext
34 )
35{
36 CommonExceptionHandlerWorker (ExceptionType, SystemContext, &mExceptionHandlerData);
37}
38
56EFIAPI
58 IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
59 )
60{
61 InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock);
62 return InitializeCpuExceptionHandlersWorker (VectorInfo, &mExceptionHandlerData);
63}
64
89EFIAPI
91 IN EFI_EXCEPTION_TYPE InterruptType,
92 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
93 )
94{
95 return RegisterCpuInterruptHandlerWorker (InterruptType, InterruptHandler, &mExceptionHandlerData);
96}
97
113EFIAPI
115 IN VOID *Buffer,
116 IN OUT UINTN *BufferSize
117 )
118{
119 return EFI_UNSUPPORTED;
120}
UINT64 UINTN
VOID(EFIAPI * EFI_CPU_INTERRUPT_HANDLER)(IN CONST EFI_EXCEPTION_TYPE InterruptType, IN CONST EFI_SYSTEM_CONTEXT SystemContext)
Definition: Cpu.h:52
EFI_STATUS RegisterCpuInterruptHandlerWorker(IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
EFI_STATUS InitializeCpuExceptionHandlersWorker(IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL, IN OUT EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
VOID CommonExceptionHandlerWorker(IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
INTN EFI_EXCEPTION_TYPE
Definition: DebugSupport.h:35
EFI_STATUS EFIAPI InitializeSeparateExceptionStacks(IN VOID *Buffer, IN OUT UINTN *BufferSize)
Definition: SmmException.c:114
EFI_STATUS EFIAPI InitializeCpuExceptionHandlers(IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL)
Definition: SmmException.c:57
EFI_STATUS EFIAPI RegisterCpuInterruptHandler(IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)
Definition: SmmException.c:90
VOID EFIAPI CommonExceptionHandler(IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
Definition: SmmException.c:31
SPIN_LOCK *EFIAPI InitializeSpinLock(OUT SPIN_LOCK *SpinLock)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29