]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
Revert "UefiCpuPkg/PiSmmCpu: Allow SMM access-out when static paging is OFF"
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.c
index 50614f32c364b8e8e0caa3a969997ee6ff377e9b..69a04dfb2311b65699ff51efffc643bd1ba4767d 100644 (file)
@@ -1121,9 +1121,6 @@ FindSmramInfo (
   *SmrrBase = (UINT32)CurrentSmramRange->CpuStart;\r
   *SmrrSize = (UINT32)CurrentSmramRange->PhysicalSize;\r
 \r
-  //\r
-  // Extend *SmrrBase/*SmrrSize to include adjacent SMRAM ranges\r
-  //\r
   do {\r
     Found = FALSE;\r
     for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {\r
@@ -1435,20 +1432,14 @@ PerformRemainingTasks (
     SetMemMapAttributes ();\r
 \r
     //\r
-    // Do not protect memory outside SMRAM when SMM static page table is not enabled.\r
+    // For outside SMRAM, we only map SMM communication buffer or MMIO.\r
     //\r
-    if (mCpuSmmStaticPageTable) {\r
-\r
-      //\r
-      // For outside SMRAM, we only map SMM communication buffer or MMIO.\r
-      //\r
-      SetUefiMemMapAttributes ();\r
+    SetUefiMemMapAttributes ();\r
 \r
-      //\r
-      // Set page table itself to be read-only\r
-      //\r
-      SetPageTableAttributes ();\r
-    }\r
+    //\r
+    // Set page table itself to be read-only\r
+    //\r
+    SetPageTableAttributes ();\r
 \r
     //\r
     // Configure SMM Code Access Check feature if available.\r