mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Core: remove SMM check for Heap Guard feature detection
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>
This commit is contained in:
parent
d106cf71ea
commit
855abe0204
|
@ -667,21 +667,11 @@ IsMemoryTypeToGuard (
|
|||
{
|
||||
UINT64 TestBit;
|
||||
UINT64 ConfigBit;
|
||||
BOOLEAN InSmm;
|
||||
|
||||
if (AllocateType == AllocateAddress) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
InSmm = FALSE;
|
||||
if (gSmmBase2 != NULL) {
|
||||
gSmmBase2->InSmm (gSmmBase2, &InSmm);
|
||||
}
|
||||
|
||||
if (InSmm) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((PcdGet8 (PcdHeapGuardPropertyMask) & PageOrPool) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue