* [PATCH 0/3] mReservedVectors is not set
@ 2016-11-30 7:22 Jeff Fan
2016-11-30 7:22 ` [PATCH 1/3] UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext() Jeff Fan
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-30 7:22 UTC (permalink / raw)
To: edk2-devel
mReservedVectors is used by ArchSaveExceptionContext() and
ArchRestoreExceptionContext() to support HOOK_AFTER capability.
But it is not set to correct pointer. This is one regression issue when
we add PeiExcpetionHandlerLib.inf.
The fix is to add parameter ExceptionHandlerData for thoese 2 APIs and
not to use mReservedVectors.
Jeff Fan (3):
UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext()
UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext()
UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors
.../CpuExceptionHandlerLib/CpuExceptionCommon.c | 5 +-
.../CpuExceptionHandlerLib/CpuExceptionCommon.h | 23 ++++-----
.../Ia32/ArchExceptionHandler.c | 47 +++++++++++--------
.../CpuExceptionHandlerLib/PeiDxeSmmCpuException.c | 4 +-
.../X64/ArchExceptionHandler.c | 54 +++++++++++++---------
5 files changed, 76 insertions(+), 57 deletions(-)
--
2.9.3.windows.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext()
2016-11-30 7:22 [PATCH 0/3] mReservedVectors is not set Jeff Fan
@ 2016-11-30 7:22 ` Jeff Fan
2016-11-30 7:22 ` [PATCH 2/3] UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext() Jeff Fan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-30 7:22 UTC (permalink / raw)
To: edk2-devel; +Cc: Feng Tian, Jiewen Yao, Michael D Kinney
mReservedVectors is not set, we could add parameter ExceptionHandlerData for
ArchSaveExceptionContext() that could use it instead of mReservedVectors.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
.../CpuExceptionHandlerLib/CpuExceptionCommon.h | 11 ++++----
.../Ia32/ArchExceptionHandler.c | 26 +++++++++++--------
.../CpuExceptionHandlerLib/PeiDxeSmmCpuException.c | 2 +-
.../X64/ArchExceptionHandler.c | 29 +++++++++++++---------
4 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
index 9c88012..dc5d941 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
@@ -197,14 +197,15 @@ UpdateIdtTable (
/**
Save CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param[in] ExceptionType Exception type.
- @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
-
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchSaveExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
);
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
index 7a183bf..b96636b 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
@@ -1,7 +1,7 @@
/** @file
IA32 CPU Exception Handler functons.
- Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2016, 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
@@ -50,24 +50,28 @@ ArchGetIdtHandler (
/**
Save CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param ExceptionType Exception type.
- @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
-
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchSaveExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
)
{
IA32_EFLAGS32 Eflags;
+ RESERVED_VECTORS_DATA *ReservedVectors;
+
+ ReservedVectors = ExceptionHandlerData->ReservedVectors;
//
// Save Exception context in global variable
//
- mReservedVectors[ExceptionType].OldFlags = SystemContext.SystemContextIa32->Eflags;
- mReservedVectors[ExceptionType].OldCs = SystemContext.SystemContextIa32->Cs;
- mReservedVectors[ExceptionType].OldIp = SystemContext.SystemContextIa32->Eip;
- mReservedVectors[ExceptionType].ExceptionData = SystemContext.SystemContextIa32->ExceptionData;
+ ReservedVectors[ExceptionType].OldFlags = SystemContext.SystemContextIa32->Eflags;
+ ReservedVectors[ExceptionType].OldCs = SystemContext.SystemContextIa32->Cs;
+ ReservedVectors[ExceptionType].OldIp = SystemContext.SystemContextIa32->Eip;
+ ReservedVectors[ExceptionType].ExceptionData = SystemContext.SystemContextIa32->ExceptionData;
//
// Clear IF flag to avoid old IDT handler enable interrupt by IRET
//
@@ -77,7 +81,7 @@ ArchSaveExceptionContext (
//
// Modify the EIP in stack, then old IDT handler will return to the stub code
//
- SystemContext.SystemContextIa32->Eip = (UINTN) mReservedVectors[ExceptionType].HookAfterStubHeaderCode;
+ SystemContext.SystemContextIa32->Eip = (UINTN) ReservedVectors[ExceptionType].HookAfterStubHeaderCode;
}
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
index e55709c..483a417 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
@@ -55,7 +55,7 @@ CommonExceptionHandlerWorker (
// Need to execute old IDT handler before running this exception handler
//
ReservedVectors[ExceptionType].ApicId = GetApicId ();
- ArchSaveExceptionContext (ExceptionType, SystemContext);
+ ArchSaveExceptionContext (ExceptionType, SystemContext, ExceptionHandlerData);
ExceptionHandlerContext->ExceptionDataFlag = (mErrorCodeFlag & (1 << ExceptionType)) ? TRUE : FALSE;
ExceptionHandlerContext->OldIdtHandler = ReservedVectors[ExceptionType].ExceptonHandler;
return;
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
index f711c31..f84b1a8 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
@@ -1,7 +1,7 @@
/** @file
x64 CPU Exception Handler.
- Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2016, 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
@@ -51,25 +51,30 @@ ArchGetIdtHandler (
/**
Save CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param ExceptionType Exception type.
- @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchSaveExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
)
{
IA32_EFLAGS32 Eflags;
+ RESERVED_VECTORS_DATA *ReservedVectors;
+
+ ReservedVectors = ExceptionHandlerData->ReservedVectors;
//
// Save Exception context in global variable
//
- mReservedVectors[ExceptionType].OldSs = SystemContext.SystemContextX64->Ss;
- mReservedVectors[ExceptionType].OldSp = SystemContext.SystemContextX64->Rsp;
- mReservedVectors[ExceptionType].OldFlags = SystemContext.SystemContextX64->Rflags;
- mReservedVectors[ExceptionType].OldCs = SystemContext.SystemContextX64->Cs;
- mReservedVectors[ExceptionType].OldIp = SystemContext.SystemContextX64->Rip;
- mReservedVectors[ExceptionType].ExceptionData = SystemContext.SystemContextX64->ExceptionData;
+ ReservedVectors[ExceptionType].OldSs = SystemContext.SystemContextX64->Ss;
+ ReservedVectors[ExceptionType].OldSp = SystemContext.SystemContextX64->Rsp;
+ ReservedVectors[ExceptionType].OldFlags = SystemContext.SystemContextX64->Rflags;
+ ReservedVectors[ExceptionType].OldCs = SystemContext.SystemContextX64->Cs;
+ ReservedVectors[ExceptionType].OldIp = SystemContext.SystemContextX64->Rip;
+ ReservedVectors[ExceptionType].ExceptionData = SystemContext.SystemContextX64->ExceptionData;
//
// Clear IF flag to avoid old IDT handler enable interrupt by IRET
//
@@ -79,7 +84,7 @@ ArchSaveExceptionContext (
//
// Modify the EIP in stack, then old IDT handler will return to the stub code
//
- SystemContext.SystemContextX64->Rip = (UINTN) mReservedVectors[ExceptionType].HookAfterStubHeaderCode;
+ SystemContext.SystemContextX64->Rip = (UINTN) ReservedVectors[ExceptionType].HookAfterStubHeaderCode;
}
/**
--
2.9.3.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext()
2016-11-30 7:22 [PATCH 0/3] mReservedVectors is not set Jeff Fan
2016-11-30 7:22 ` [PATCH 1/3] UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext() Jeff Fan
@ 2016-11-30 7:22 ` Jeff Fan
2016-11-30 7:22 ` [PATCH 3/3] UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors Jeff Fan
2016-12-01 7:28 ` [PATCH 0/3] mReservedVectors is not set Tian, Feng
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-30 7:22 UTC (permalink / raw)
To: edk2-devel; +Cc: Feng Tian, Jiewen Yao, Michael D Kinney
mReservedVectors is not set, we could add parameter ExceptionHandlerData for
ArchRestoreExceptionContext() that could use it instead of mReservedVectors.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
.../CpuExceptionHandlerLib/CpuExceptionCommon.h | 11 +++++-----
.../Ia32/ArchExceptionHandler.c | 21 +++++++++++-------
.../CpuExceptionHandlerLib/PeiDxeSmmCpuException.c | 2 +-
.../X64/ArchExceptionHandler.c | 25 +++++++++++++---------
4 files changed, 35 insertions(+), 24 deletions(-)
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
index dc5d941..f2e4692 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
@@ -211,14 +211,15 @@ ArchSaveExceptionContext (
/**
Restore CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param[in] ExceptionType Exception type.
- @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
-
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchRestoreExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
);
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
index b96636b..7ab2438 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
@@ -87,19 +87,24 @@ ArchSaveExceptionContext (
/**
Restore CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param ExceptionType Exception type.
- @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchRestoreExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
)
{
- SystemContext.SystemContextIa32->Eflags = mReservedVectors[ExceptionType].OldFlags;
- SystemContext.SystemContextIa32->Cs = mReservedVectors[ExceptionType].OldCs;
- SystemContext.SystemContextIa32->Eip = mReservedVectors[ExceptionType].OldIp;
- SystemContext.SystemContextIa32->ExceptionData = mReservedVectors[ExceptionType].ExceptionData;
+ RESERVED_VECTORS_DATA *ReservedVectors;
+
+ ReservedVectors = ExceptionHandlerData->ReservedVectors;
+ SystemContext.SystemContextIa32->Eflags = ReservedVectors[ExceptionType].OldFlags;
+ SystemContext.SystemContextIa32->Cs = ReservedVectors[ExceptionType].OldCs;
+ SystemContext.SystemContextIa32->Eip = ReservedVectors[ExceptionType].OldIp;
+ SystemContext.SystemContextIa32->ExceptionData = ReservedVectors[ExceptionType].ExceptionData;
}
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
index 483a417..c0fc9a6 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
@@ -68,7 +68,7 @@ CommonExceptionHandlerWorker (
// Old IDT handler has been executed, then restore CPU exception content to
// run new exception handler.
//
- ArchRestoreExceptionContext (ExceptionType, SystemContext);
+ ArchRestoreExceptionContext (ExceptionType, SystemContext, ExceptionHandlerData);
//
// Rlease spin lock for ApicId
//
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
index f84b1a8..7495b14 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
@@ -90,21 +90,26 @@ ArchSaveExceptionContext (
/**
Restore CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.
- @param ExceptionType Exception type.
- @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionType Exception type.
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.
+ @param[in] ExceptionHandlerData Pointer to exception handler data.
**/
VOID
ArchRestoreExceptionContext (
- IN UINTN ExceptionType,
- IN EFI_SYSTEM_CONTEXT SystemContext
+ IN UINTN ExceptionType,
+ IN EFI_SYSTEM_CONTEXT SystemContext,
+ IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
)
{
- SystemContext.SystemContextX64->Ss = mReservedVectors[ExceptionType].OldSs;
- SystemContext.SystemContextX64->Rsp = mReservedVectors[ExceptionType].OldSp;
- SystemContext.SystemContextX64->Rflags = mReservedVectors[ExceptionType].OldFlags;
- SystemContext.SystemContextX64->Cs = mReservedVectors[ExceptionType].OldCs;
- SystemContext.SystemContextX64->Rip = mReservedVectors[ExceptionType].OldIp;
- SystemContext.SystemContextX64->ExceptionData = mReservedVectors[ExceptionType].ExceptionData;
+ RESERVED_VECTORS_DATA *ReservedVectors;
+
+ ReservedVectors = ExceptionHandlerData->ReservedVectors;
+ SystemContext.SystemContextX64->Ss = ReservedVectors[ExceptionType].OldSs;
+ SystemContext.SystemContextX64->Rsp = ReservedVectors[ExceptionType].OldSp;
+ SystemContext.SystemContextX64->Rflags = ReservedVectors[ExceptionType].OldFlags;
+ SystemContext.SystemContextX64->Cs = ReservedVectors[ExceptionType].OldCs;
+ SystemContext.SystemContextX64->Rip = ReservedVectors[ExceptionType].OldIp;
+ SystemContext.SystemContextX64->ExceptionData = ReservedVectors[ExceptionType].ExceptionData;
}
/**
--
2.9.3.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors
2016-11-30 7:22 [PATCH 0/3] mReservedVectors is not set Jeff Fan
2016-11-30 7:22 ` [PATCH 1/3] UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext() Jeff Fan
2016-11-30 7:22 ` [PATCH 2/3] UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext() Jeff Fan
@ 2016-11-30 7:22 ` Jeff Fan
2016-12-01 7:28 ` [PATCH 0/3] mReservedVectors is not set Tian, Feng
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-30 7:22 UTC (permalink / raw)
To: edk2-devel; +Cc: Feng Tian, Jiewen Yao, Michael D Kinney
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c | 5 ++---
UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h | 1 -
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c
index 5d28161..3d85b0c 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c
@@ -1,7 +1,7 @@
/** @file
CPU Exception Handler Library common functions.
- Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2016, 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
@@ -20,8 +20,7 @@
//
// 1 means an error code will be pushed, otherwise 0
//
-CONST UINT32 mErrorCodeFlag = 0x00027d00;
-RESERVED_VECTORS_DATA *mReservedVectors = NULL;
+CONST UINT32 mErrorCodeFlag = 0x00027d00;
//
// Define the maximum message length
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
index f2e4692..4639ed2 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
@@ -55,7 +55,6 @@ typedef struct {
extern CONST UINT32 mErrorCodeFlag;
extern CONST UINTN mImageAlignSize;
extern CONST UINTN mDoFarReturnFlag;
-extern RESERVED_VECTORS_DATA *mReservedVectors;
/**
Return address map of exception handler template so that C code can generate
--
2.9.3.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] mReservedVectors is not set
2016-11-30 7:22 [PATCH 0/3] mReservedVectors is not set Jeff Fan
` (2 preceding siblings ...)
2016-11-30 7:22 ` [PATCH 3/3] UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors Jeff Fan
@ 2016-12-01 7:28 ` Tian, Feng
3 siblings, 0 replies; 5+ messages in thread
From: Tian, Feng @ 2016-12-01 7:28 UTC (permalink / raw)
To: Fan, Jeff, edk2-devel@lists.01.org; +Cc: Tian, Feng
Reviewed-by: Feng Tian <feng.tian@Intel.com>
Thanks
Feng
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jeff Fan
Sent: Wednesday, November 30, 2016 3:23 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH 0/3] mReservedVectors is not set
mReservedVectors is used by ArchSaveExceptionContext() and
ArchRestoreExceptionContext() to support HOOK_AFTER capability.
But it is not set to correct pointer. This is one regression issue when we add PeiExcpetionHandlerLib.inf.
The fix is to add parameter ExceptionHandlerData for thoese 2 APIs and not to use mReservedVectors.
Jeff Fan (3):
UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext()
UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext()
UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors
.../CpuExceptionHandlerLib/CpuExceptionCommon.c | 5 +-
.../CpuExceptionHandlerLib/CpuExceptionCommon.h | 23 ++++-----
.../Ia32/ArchExceptionHandler.c | 47 +++++++++++--------
.../CpuExceptionHandlerLib/PeiDxeSmmCpuException.c | 4 +-
.../X64/ArchExceptionHandler.c | 54 +++++++++++++---------
5 files changed, 76 insertions(+), 57 deletions(-)
--
2.9.3.windows.2
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-12-01 7:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 7:22 [PATCH 0/3] mReservedVectors is not set Jeff Fan
2016-11-30 7:22 ` [PATCH 1/3] UefiCpuPkg: Add ExceptionHandlerData for ArchSaveExceptionContext() Jeff Fan
2016-11-30 7:22 ` [PATCH 2/3] UefiCpuPkg: Add ExceptionHandlerData for ArchRestoreExceptionContext() Jeff Fan
2016-11-30 7:22 ` [PATCH 3/3] UefiCpuPkg/CpuExceptionHandlerLib: remove un-used mReservedVectors Jeff Fan
2016-12-01 7:28 ` [PATCH 0/3] mReservedVectors is not set Tian, Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox