UefiCpuPkg/PiSmmCpuDxeSmm: Remove unnecessary function
Remove unnecessary function SetNotPresentPage(). We can directly use ConvertMemoryPageAttributes to set a range to non-present. Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
@@ -1095,10 +1095,14 @@ PiCpuSmmEntry (
|
||||
mSmmShadowStackSize
|
||||
);
|
||||
if (FeaturePcdGet (PcdCpuSmmStackGuard)) {
|
||||
SetNotPresentPage (
|
||||
ConvertMemoryPageAttributes (
|
||||
Cr3,
|
||||
mPagingMode,
|
||||
(EFI_PHYSICAL_ADDRESS)(UINTN)Stacks + mSmmStackSize + EFI_PAGES_TO_SIZE (1) + (mSmmStackSize + mSmmShadowStackSize) * Index,
|
||||
EFI_PAGES_TO_SIZE (1)
|
||||
EFI_PAGES_TO_SIZE (1),
|
||||
EFI_MEMORY_RP,
|
||||
TRUE,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user