audk/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32
Star Zeng 6e601a4109 UefiCpuPkg PiSmmCpuDxeSmm: Fixed #double fault on #page fault for IA32
When StackGuard is enabled on IA32, the #double fault exception
is reported instead of #page fault.

This issue does not exist on X64, or IA32 without StackGuard.

The fix at e4435f710c was incomplete.

It is because AllocateCodePages() is used to allocate buffer for
GDT and TSS, the code pages will be set to RO in SetMemMapAttributes().
But IA32 Stack Guard need use task switch to switch stack that need
write GDT and TSS, so AllocateCodePages() could not be used.

This patch uses AllocatePages() instead of AllocateCodePages() to
allocate buffer for GDT and TSS if StackGuard is enabled on IA32.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2018-01-15 10:41:15 +08:00
..
MpFuncs.S UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
MpFuncs.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
MpFuncs.nasm UefiCpuPkg PiSmmCpuDxeSmm: Update Ia32/MpFuncs.nasm 2016-06-28 09:52:13 +08:00
PageTbl.c UefiCpuPkg PiSmmCpuDxeSmm: SMM profile and static paging mutual exclusion 2017-12-08 12:29:24 +08:00
Semaphore.c UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmiEntry.S UefiCpuPkg/PiSmmCpuDxeSmm: Add missing JMP instruction 2017-05-19 13:59:27 -07:00
SmiEntry.asm UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure 2016-12-16 08:27:59 +08:00
SmiEntry.nasm UefiCpuPkg/PiSmmCpuDxeSmm: Remove PSD layout assumptions 2016-12-01 11:07:13 -08:00
SmiException.S UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmiException.asm UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmiException.nasm UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmmFuncsArch.c UefiCpuPkg PiSmmCpuDxeSmm: Fixed #double fault on #page fault for IA32 2018-01-15 10:41:15 +08:00
SmmInit.S UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmmInit.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmmInit.nasm UefiCpuPkg/PiSmmCpuDxeSmm: remove superfluous ENDs from NASM source 2016-07-18 19:23:01 +02:00
SmmProfileArch.c UefiCpuPkg/PiSmmCpuDxeSmm: Add paging protection. 2016-11-17 16:30:07 +08:00
SmmProfileArch.h UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00