UefiCpuPkg PiSmmCpuDxeSmm: SMM profile and static paging mutual exclusion
SMM profile and static paging could not be enabled at the same time, this patch is to add check and comments to make sure it. Similar comments are also added for the case of static paging and heap guard for SMM. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -199,12 +199,21 @@ SetPageTableAttributes (
|
||||
BOOLEAN PageTableSplitted;
|
||||
|
||||
//
|
||||
// Don't mark page table as read-only if heap guard is enabled.
|
||||
// Don't mark page table to read-only if heap guard is enabled.
|
||||
//
|
||||
// BIT2: SMM page guard enabled
|
||||
// BIT3: SMM pool guard enabled
|
||||
//
|
||||
if ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT3 | BIT2)) != 0) {
|
||||
DEBUG ((DEBUG_INFO, "Don't mark page table to read-only as heap guard is enabled\n"));
|
||||
return ;
|
||||
}
|
||||
|
||||
//
|
||||
// Don't mark page table to read-only if SMM profile is enabled.
|
||||
//
|
||||
if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {
|
||||
DEBUG ((DEBUG_INFO, "Don't mark page table to read-only as SMM profile is enabled\n"));
|
||||
return ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user