summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h')
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
index 4639ed2d90..e66a5df864 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
@@ -1,7 +1,7 @@
/** @file
Common header file for CPU Exception Handler Library.
- Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -24,11 +24,23 @@
#include <Library/PeCoffGetEntryPointLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/SynchronizationLib.h>
+#include <Library/CpuExceptionHandlerLib.h>
#define CPU_EXCEPTION_NUM 32
#define CPU_INTERRUPT_NUM 256
#define HOOKAFTER_STUB_SIZE 16
+//
+// Exception Error Code of Page-Fault Exception
+//
+#define IA32_PF_EC_P BIT0
+#define IA32_PF_EC_WR BIT1
+#define IA32_PF_EC_US BIT2
+#define IA32_PF_EC_RSVD BIT3
+#define IA32_PF_EC_ID BIT4
+#define IA32_PF_EC_PK BIT5
+#define IA32_PF_EC_SGX BIT15
+
#include "ArchInterruptDefs.h"
#define CPU_EXCEPTION_HANDLER_LIB_HOB_GUID \
@@ -53,7 +65,6 @@ typedef struct {
} EXCEPTION_HANDLER_DATA;
extern CONST UINT32 mErrorCodeFlag;
-extern CONST UINTN mImageAlignSize;
extern CONST UINTN mDoFarReturnFlag;
/**
@@ -112,15 +123,11 @@ InternalPrintMessage (
Find and display image base address and return image base and its entry point.
@param CurrentEip Current instruction pointer.
- @param EntryPoint Return module entry point if module header is found.
- @return !0 Image base address.
- @return 0 Image header cannot be found.
**/
-UINTN
-FindModuleImageBase (
- IN UINTN CurrentEip,
- OUT UINTN *EntryPoint
+VOID
+DumpModuleImageInfo (
+ IN UINTN CurrentEip
);
/**
@@ -130,7 +137,7 @@ FindModuleImageBase (
@param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
**/
VOID
-DumpCpuContent (
+DumpImageAndCpuContent (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN EFI_SYSTEM_CONTEXT SystemContext
);