]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
UefiCpuPkg/ExceptionLib: Update RegisterCpuInterruptHandlerWorker()
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / SmmException.c
index c3f4425e0979c9b99bc743468e57bd634168bbb2..c3af4d48db05c3ab2616bd5b477edf6f226a1e9a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   CPU exception handler library implemenation for SMM modules.\r
 \r
-  Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -17,6 +17,9 @@
 \r
 CONST UINTN   mDoFarReturnFlag   = 1; \r
 \r
+extern RESERVED_VECTORS_DATA       mReservedVectorsData[CPU_EXCEPTION_NUM];\r
+extern EFI_CPU_INTERRUPT_HANDLER   mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];\r
+EXCEPTION_HANDLER_DATA      mExceptionHandlerData;\r
 /**\r
   Initializes all CPU exceptions entries and provides the default exception handlers.\r
   \r
@@ -39,7 +42,10 @@ InitializeCpuExceptionHandlers (
   IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
   )\r
 {\r
-  return InitializeCpuExceptionHandlersWorker (VectorInfo);\r
+  mExceptionHandlerData.ReservedVectors          = mReservedVectorsData;\r
+  mExceptionHandlerData.ExternalInterruptHandler = mExternalInterruptHandlerTable;\r
+  InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock);\r
+  return InitializeCpuExceptionHandlersWorker (VectorInfo, &mExceptionHandlerData);\r
 }\r
 \r
 /**\r
@@ -89,7 +95,7 @@ InitializeCpuInterruptHandlers (
                                 previously installed.\r
   @retval EFI_UNSUPPORTED       The interrupt specified by InterruptType is not supported,\r
                                 or this function is not supported.\r
-*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterCpuInterruptHandler (\r
@@ -97,5 +103,5 @@ RegisterCpuInterruptHandler (
   IN EFI_CPU_INTERRUPT_HANDLER     InterruptHandler\r
   )\r
 {\r
-  return RegisterCpuInterruptHandlerWorker (InterruptType, InterruptHandler);\r
+  return RegisterCpuInterruptHandlerWorker (InterruptType, InterruptHandler, &mExceptionHandlerData);\r
 }
\ No newline at end of file