Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: e8034b534ab51635b62dca631514bb6305850a5a
      
https://github.com/tianocore/edk2/commit/e8034b534ab51635b62dca631514bb6305850a5a
  Author: Liu, Zhiguang <[email protected]>
  Date:   2022-06-20 (Mon, 20 Jun 2022)

  Changed paths:
    M UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c

  Log Message:
  -----------
  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 <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Maurice Ma <[email protected]>
Cc: Benjamin You <[email protected]>
Cc: Sean Rhodes <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Zhiguang Liu <[email protected]>




_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to