summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/build.py
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2018-01-15 10:16:26 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-01-18 17:03:24 +0800
commitd4d87596c11d6e3f8220b6d9677797c802af3a33 (patch)
tree5f90142f10af7be15433ed20f30f6f26d3be9619 /BaseTools/Source/Python/build/build.py
parentfbe2c4b9be98a5c2b9c1f6976f51e2456467e752 (diff)
downloadedk2-d4d87596c11d6e3f8220b6d9677797c802af3a33.tar.gz
edk2-d4d87596c11d6e3f8220b6d9677797c802af3a33.tar.bz2
edk2-d4d87596c11d6e3f8220b6d9677797c802af3a33.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
0 files changed, 0 insertions, 0 deletions