audk/UefiPayloadPkg/UefiPayloadEntry
Liu, Zhiguang e8034b534a UefiPayloadPkg: Always split page table entry to 4K if it covers stack.
We observed page fault in the following situation:
1.PayloadEntry uses 2M entry in page table to cover DXE stack range.
2.In DXE phase, image protection code needs to mark some sub-range in
this 2M entry as readonly. So the the 2M page table entry is split to
512 4K entries, and some of the entries are marked as readonly.
(the entries covering stack still remain R/W)
3.Page fault exception happens when trying to access stack.

Always split the page table entry to 4K if it covers stack to avoid this
issue.
More discussion about this issue can be seen at below link
https://edk2.groups.io/g/devel/topic/91446026

Cc: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-06-20 04:53:17 +00:00
..
Ia32
X64 UefiPayloadPkg: Always split page table entry to 4K if it covers stack. 2022-06-20 04:53:17 +00:00
AcpiTable.c
LoadDxeCore.c
MemoryAllocation.c
PrintHob.c
UefiPayloadEntry.c
UefiPayloadEntry.h UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib. 2022-05-06 07:48:15 +00:00
UefiPayloadEntry.inf UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib. 2022-05-06 07:48:15 +00:00
UniversalPayloadEntry.c
UniversalPayloadEntry.inf UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib. 2022-05-06 07:48:15 +00:00