]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/CpuExceptionHandlerLib: alloc code memory for exception handlers
authorJian J Wang <jian.j.wang@intel.com>
Mon, 15 Jan 2018 01:45:59 +0000 (09:45 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 18 Jan 2018 09:03:23 +0000 (17:03 +0800)
commitfceafda5185af0445d83f8c819b65417b981c485
treeed16c11964f7ca7789aac437514572be61f664f0
parentf32bfe6d061420a15bac6083063d227c567e6388
UefiCpuPkg/CpuExceptionHandlerLib: alloc code memory for exception handlers

If PcdDxeNxMemoryProtectionPolicy is set to enable protection for memory
of EfiBootServicesData, EfiConventionalMemory, the BIOS will reset after
timer initialized and started.

The root cause is that the memory used to hold the exception and interrupt
handler is allocated with type of EfiBootServicesData and marked as
non-executable due to NX feature enabled. This patch fixes it by allocating
EfiBootServicesCode type of memory for those handlers instead.

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>
UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c