]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
UefiCpuPkg/ExceptionLib: Update InitializeCpuExceptionHandlersWorker
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / CpuExceptionCommon.h
index efe77eb09f76f829d5bb69e1ea1387ea2dfc48a9..812469babe7ce95d1c0a26cd6788f04abdd5412e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common header file for CPU Exception Handler Library.\r
 \r
-  Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 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
@@ -40,6 +40,13 @@ typedef struct {
   UINTN HookAfterStubHeaderStart;\r
 } EXCEPTION_HANDLER_TEMPLATE_MAP;\r
 \r
+typedef struct {\r
+  UINTN                       IdtEntryCount;\r
+  SPIN_LOCK                   DisplayMessageSpinLock;\r
+  RESERVED_VECTORS_DATA       *ReservedVectors;\r
+  EFI_CPU_INTERRUPT_HANDLER   *ExternalInterruptHandler;\r
+} EXCEPTION_HANDLER_DATA;\r
+\r
 extern CONST UINT32                mErrorCodeFlag;\r
 extern CONST UINTN                 mImageAlignSize;\r
 extern CONST UINTN                 mDoFarReturnFlag;\r
@@ -127,7 +134,8 @@ DumpCpuContent (
 /**\r
   Internal worker function to initialize exception handler.\r
 \r
-  @param[in]  VectorInfo    Pointer to reserved vector list.\r
+  @param[in]      VectorInfo            Pointer to reserved vector list.\r
+  @param[in, out] ExceptionHandlerData  Pointer to exception handler data.\r
   \r
   @retval EFI_SUCCESS           CPU Exception Entries have been successfully initialized \r
                                 with default exception handlers.\r
@@ -137,7 +145,8 @@ DumpCpuContent (
 **/\r
 EFI_STATUS\r
 InitializeCpuExceptionHandlersWorker (\r
-  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
+  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL,\r
+  IN OUT EXCEPTION_HANDLER_DATA    *ExceptionHandlerData\r
   );\r
 \r
 /**\r
@@ -237,5 +246,17 @@ ReadAndVerifyVectorInfo (
   IN  UINTN                         VectorCount\r
   );\r
 \r
+/**\r
+  Get ASCII format string exception name by exception type.\r
+\r
+  @param ExceptionType  Exception type.\r
+\r
+  @return  ASCII format string exception name.\r
+**/\r
+CONST CHAR8 *\r
+GetExceptionNameStr (\r
+  IN EFI_EXCEPTION_TYPE          ExceptionType\r
+  );\r
+\r
 #endif\r
 \r