mirror of https://github.com/acidanthera/audk.git
d4d87596c1
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> |
||
---|---|---|
.. | ||
MpFuncs.S | ||
MpFuncs.asm | ||
MpFuncs.nasm | ||
PageTbl.c | ||
Semaphore.c | ||
SmiEntry.S | ||
SmiEntry.asm | ||
SmiEntry.nasm | ||
SmiException.S | ||
SmiException.asm | ||
SmiException.nasm | ||
SmmFuncsArch.c | ||
SmmInit.S | ||
SmmInit.asm | ||
SmmInit.nasm | ||
SmmProfileArch.c | ||
SmmProfileArch.h |