mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/CpuExceptionHandlerLib: fix incorrect init of exception stack
This issue is introduced at following commit, which tried to add stack
switch support on behalf of Stack Guard feature.
0ff5aa9cae
The field KnownGoodStackTop in CPU_EXCEPTION_INIT_DATA is initialized to
the start address of array mNewStack. This is wrong. It must be the end
of mNewStack. This patch fixes this mistake.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
de707b0866
commit
d429d00f97
|
@ -270,7 +270,7 @@ InitializeCpuExceptionHandlersEx (
|
|||
AsmReadGdtr (&Gdtr);
|
||||
|
||||
EssData.X64.Revision = CPU_EXCEPTION_INIT_DATA_REV;
|
||||
EssData.X64.KnownGoodStackTop = (UINTN)mNewStack;
|
||||
EssData.X64.KnownGoodStackTop = (UINTN)mNewStack + sizeof (mNewStack);
|
||||
EssData.X64.KnownGoodStackSize = CPU_KNOWN_GOOD_STACK_SIZE;
|
||||
EssData.X64.StackSwitchExceptions = CPU_STACK_SWITCH_EXCEPTION_LIST;
|
||||
EssData.X64.StackSwitchExceptionNumber = CPU_STACK_SWITCH_EXCEPTION_NUMBER;
|
||||
|
|
Loading…
Reference in New Issue