On 07/31/15 14:22, Star Zeng wrote:
> This feature is added for UEFI spec that says
> "Stack may be marked as non-executable in identity mapped page tables".
> A PCD PcdSetNxForStack is added to turn on/off this feature, and it is
> FALSE by default.
> 
> Cc: Jiewen Yao <jiewen....@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.z...@intel.com>
> ---
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf          |   3 +-
>  MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c  | 185 
> ++++++++++++++++++++++-
>  MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c   |  10 +-
>  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 160 +++++++++++++++++---
>  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h |  61 +++++++-
>  MdeModulePkg/MdeModulePkg.dec                    |  11 +-
>  MdeModulePkg/MdeModulePkg.uni                    | Bin 166792 -> 168862 bytes
>  7 files changed, 392 insertions(+), 38 deletions(-)

I tried to enable this feature in the OvmfPkg builds (all three of them).

Unfortunately, I have found that a non-executable DXE stack breaks the
EFI_MP_SERVICE_PROTOCOL.StartupAllAPs() function. (Which is provided by
"UefiCpuPkg/CpuDxe/CpuMp.c".) The virtual machine is re-set when that
function is called.

I presume the starup code for the APs resides in an area that happens to
be marked non-executable (if this feature enabled), and that causes a
fatal fault or some such when the APs get the startup IPI.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to