]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Core: remove SMM check for Heap Guard feature detection
authorJian J Wang <jian.j.wang@intel.com>
Wed, 13 Jun 2018 03:05:44 +0000 (11:05 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 19 Jun 2018 05:44:56 +0000 (13:44 +0800)
CpuDxe driver is updated to be able to access DXE page table in SMM mode,
which means Heap Guard can get correct memory paging attributes in what
environment. It's not necessary to exclude SMM from detecting Heap Guard
feature support.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Core/Dxe/Mem/HeapGuard.c

index 9d765c98f6ab3b5017d47bc8694a48671ad174f7..447c56bb11833900d100fc281b333330ee248c05 100644 (file)
@@ -667,21 +667,11 @@ IsMemoryTypeToGuard (
 {\r
   UINT64 TestBit;\r
   UINT64 ConfigBit;\r
-  BOOLEAN     InSmm;\r
 \r
   if (AllocateType == AllocateAddress) {\r
     return FALSE;\r
   }\r
 \r
-  InSmm = FALSE;\r
-  if (gSmmBase2 != NULL) {\r
-    gSmmBase2->InSmm (gSmmBase2, &InSmm);\r
-  }\r
-\r
-  if (InSmm) {\r
-    return FALSE;\r
-  }\r
-\r
   if ((PcdGet8 (PcdHeapGuardPropertyMask) & PageOrPool) == 0) {\r
     return FALSE;\r
   }\r