summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2016-05-24 21:31:11 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-14 15:50:58 +0800
commit246c445477572e118e13e976dbb1d3cf13af2751 (patch)
tree905f2f9ef94bc8296f79c9e91ff7c76697932ff2 /UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
parentcd507cc1eb02f15abf4645b7c861d45b38f003f6 (diff)
downloadedk2-platforms-246c445477572e118e13e976dbb1d3cf13af2751.tar.xz
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> (cherry picked from commit 44ecbc28b69834ec1a4b1a8b99dae8839633b6b6)
Diffstat (limited to 'UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c')
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
index c3af4d48db..3528c8cc75 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
@@ -21,6 +21,22 @@ 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