summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2017-12-07 20:17:49 +0800
committerStar Zeng <star.zeng@intel.com>2017-12-08 14:38:52 +0800
commit50255363cbf0555e0f09adfb327189bd7a4be9da (patch)
tree637c90684f51821b0707fb557b26fb202855d201 /MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
parenta8ab14d355072241915d87de86770c0fde92cba9 (diff)
downloadedk2-50255363cbf0555e0f09adfb327189bd7a4be9da.tar.gz
edk2-50255363cbf0555e0f09adfb327189bd7a4be9da.tar.bz2
edk2-50255363cbf0555e0f09adfb327189bd7a4be9da.zip
MdeModulePkg/DxeIpl: Enable paging for Stack Guard
Stack guard feature makes use of paging mechanism to monitor if there's a stack overflow occurred during boot. This patch will check setting of PCD PcdCpuStackGuard. If it's TRUE, DxeIpl will setup page table and set the page at which the stack base locates to be NOT PRESENT. If stack is used up and memory access cross into the last page of it, #PF exception will be triggered. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com> Reviewed-by: Jiewen.yao@intel.com
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf5
1 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index a1b8748432..ba1d9c6b05 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -49,7 +49,7 @@
[Sources.X64]
X64/VirtualMemory.h
X64/VirtualMemory.c
- X64/DxeLoadFunc.c
+ X64/DxeLoadFunc.c
[Sources.IPF]
Ipf/DxeLoadFunc.c
@@ -117,6 +117,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES
[Pcd.IA32,Pcd.X64,Pcd.ARM,Pcd.AARCH64]
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack ## SOMETIMES_CONSUMES
@@ -132,7 +133,7 @@
#
# [Hob]
# MEMORY_ALLOCATION ## SOMETIMES_PRODUCES # MEMORY_ALLOCATION_MODULE for DxeCore
-# MEMORY_ALLOCATION ## SOMETIMES_PRODUCES # New Stack HoB
+# MEMORY_ALLOCATION ## SOMETIMES_PRODUCES # New Stack HoB
# MEMORY_ALLOCATION ## SOMETIMES_PRODUCES # Old Stack HOB
#
# [Hob.IPF]