audk/UefiCpuPkg/PiSmmCpuDxeSmm/X64
Jian J Wang d4d87596c1 UefiCpuPkg/PiSmmCpuDxeSmm: Enable NXE if it's supported
If PcdDxeNxMemoryProtectionPolicy is set to enable protection for memory
of EfiBootServicesCode, EfiConventionalMemory, the BIOS will hang at a page
fault exception triggered by PiSmmCpuDxeSmm.

The root cause is that PiSmmCpuDxeSmm will access default SMM RAM starting
at 0x30000 which is marked as non-executable, but NX feature was not
enabled during SMM initialization. Accessing memory which has invalid
attributes set will cause page fault exception. This patch fixes it by
checking NX capability in cpuid and enable NXE in EFER MSR if it's
available.

Cc: Jiewen Yao <jiewen.yao@intel.com>
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: Eric Dong <eric.dong@intel.com>
2018-01-18 17:03:24 +08:00
..
MpFuncs.S UefiCpuPkg: Add PiSmmCpuDxeSmm module X64 files 2015-10-19 19:13:31 +00:00
MpFuncs.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module X64 files 2015-10-19 19:13:31 +00:00
MpFuncs.nasm UefiCpuPkg: Update PiSmmCpuDxeSmm pass XCODE5 tool chain 2018-01-16 23:43:08 +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 X64 files 2015-10-19 19:13:31 +00:00
SmiEntry.S UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure 2016-12-16 08:27:59 +08:00
SmiEntry.asm UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure 2016-12-16 08:27:59 +08:00
SmiEntry.nasm UefiCpuPkg: Update PiSmmCpuDxeSmm pass XCODE5 tool chain 2018-01-16 23:43:08 +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: Update PiSmmCpuDxeSmm pass XCODE5 tool chain 2018-01-16 23:43:08 +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 X64 files 2015-10-19 19:13:31 +00:00
SmmInit.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module X64 files 2015-10-19 19:13:31 +00:00
SmmInit.nasm UefiCpuPkg/PiSmmCpuDxeSmm: Enable NXE if it's supported 2018-01-18 17:03:24 +08:00
SmmProfileArch.c UefiCpuPkg/PiSmmCpuDxeSmm: Add support for PCD PcdPteMemoryEncryptionAddressOrMask 2017-03-01 12:53:03 +08:00
SmmProfileArch.h UefiCpuPkg: Add PiSmmCpuDxeSmm module X64 files 2015-10-19 19:13:31 +00:00