]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/BootScriptExecutorDxe: remove NX attr for FfsBuffer
authorJian J Wang <jian.j.wang@intel.com>
Mon, 15 Jan 2018 02:25:40 +0000 (10:25 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 18 Jan 2018 09:03:25 +0000 (17:03 +0800)
commit6a3094c996da6f0d028fb42d09bca90dc2c7f653
tree5d8d40f2d47cb223c44c9feb6feef533cc81f272
parent94c0129d244f91fa0a7b122414872da49a35f853
MdeModulePkg/BootScriptExecutorDxe: remove NX attr for FfsBuffer

If PcdDxeNxMemoryProtectionPolicy is set to enable protection for memory
of EfiReservedMemoryType, the BIOS will hang at a page fault exception
triggered by BootScriptExecutorDxe.

The root cause is that this driver will allocate memory of
EfiReservedMemoryType and relocate itself into this new memory. Since
EfiReservedMemoryType of memory is marked non-executable, re-start this
driver after relocation will cause exception. The fix is removing the NX
attribute after memory allocation.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Star Zeng <star.zeng@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>
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h