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:
@@ -919,17 +919,24 @@ SetPageTableAttributes (
|
||||
//
|
||||
// Don't do this if
|
||||
// - no static page table; or
|
||||
// - SMM heap guard feature enabled
|
||||
// - SMM heap guard feature enabled; or
|
||||
// BIT2: SMM page guard enabled
|
||||
// BIT3: SMM pool guard enabled
|
||||
// - SMM profile feature enabled
|
||||
//
|
||||
if (!mCpuSmmStaticPageTable ||
|
||||
(PcdGet8 (PcdHeapGuardPropertyMask) & (BIT3 | BIT2)) != 0) {
|
||||
((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT3 | BIT2)) != 0) ||
|
||||
FeaturePcdGet (PcdCpuSmmProfileEnable)) {
|
||||
//
|
||||
// Static paging and heap guard should not be enabled at the same time.
|
||||
// Static paging and heap guard could not be enabled at the same time.
|
||||
//
|
||||
ASSERT (!(mCpuSmmStaticPageTable &&
|
||||
(PcdGet8 (PcdHeapGuardPropertyMask) & (BIT3 | BIT2)) != 0));
|
||||
|
||||
//
|
||||
// Static paging and SMM profile could not be enabled at the same time.
|
||||
//
|
||||
ASSERT (!(mCpuSmmStaticPageTable && FeaturePcdGet (PcdCpuSmmProfileEnable)));
|
||||
return ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user