diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-05-24 21:31:11 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-06-01 15:31:53 +0800 |
commit | 44ecbc28b69834ec1a4b1a8b99dae8839633b6b6 (patch) | |
tree | ebcb214bc985350457aedf5f06fbfb1b8364c3e3 /UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c | |
parent | 670f13af6051dc7b8dcdaf9e1ec8014e122f41b7 (diff) | |
download | edk2-44ecbc28b69834ec1a4b1a8b99dae8839633b6b6.tar.gz |
UefiCpuPkg/ExceptionLib: Add CommonExceptionHandlerWorker()
Add internal worker function RegisterCpuInterruptHandlerWorker().
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c')
-rw-r--r-- | UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c index 5c4ee2a1ed..3320066564 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c @@ -19,13 +19,28 @@ CONST UINTN mDoFarReturnFlag = 0;
-extern SPIN_LOCK mDisplayMessageSpinLock;
extern EFI_CPU_INTERRUPT_HANDLER *mExternalInterruptHandler;
extern RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
extern EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
EXCEPTION_HANDLER_DATA mExceptionHandlerData;
/**
+ Common exception handler.
+
+ @param ExceptionType Exception type.
+ @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+**/
+VOID
+EFIAPI
+CommonExceptionHandler (
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext
+ )
+{
+ CommonExceptionHandlerWorker (ExceptionType, SystemContext, &mExceptionHandlerData);
+}
+
+/**
Initializes all CPU exceptions entries and provides the default exception handlers.
Caller should try to get an array of interrupt and/or exception vectors that are in use and need to
@@ -96,7 +111,7 @@ InitializeCpuInterruptHandlers ( return EFI_INVALID_PARAMETER;
}
}
- InitializeSpinLock (&mDisplayMessageSpinLock);
+
ExternalInterruptHandler = AllocateZeroPool (sizeof (EFI_CPU_INTERRUPT_HANDLER) * CPU_INTERRUPT_NUM);
ASSERT (ExternalInterruptHandler != NULL);
|