]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/DxeIpl: support more NX related PCDs
authorJian J Wang <jian.j.wang@intel.com>
Tue, 25 Sep 2018 08:49:19 +0000 (16:49 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Wed, 26 Sep 2018 00:55:10 +0000 (08:55 +0800)
commit5267926134d17e86672b84fd57b438f05ffa68e1
treeb4611d820e1af0c69b3caa87d4d5a910b26e991f
parentb888c57a053f41b33fcaa13da66f8de470e9a1c8
MdeModulePkg/DxeIpl: support more NX related PCDs

BZ#1116: https://bugzilla.tianocore.org/show_bug.cgi?id=1116

Currently IA32_EFER.NXE is only set against PcdSetNxForStack. This
confuses developers because following two other PCDs also need NXE
to be set, but actually not.

    PcdDxeNxMemoryProtectionPolicy
    PcdImageProtectionPolicy

This patch solves this issue by adding logic to enable IA32_EFER.NXE
if any of those PCDs have anything enabled.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h