]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
UefiCpuPkg PiSmmCpuDxeSmm: SMM profile and static paging mutual exclusion
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / Ia32 / PageTbl.c
index 6e1ffe7c62879677a96f905e6dcd309932802417..9300a232e4a6658ba6720c618defbd5cff7f795b 100644 (file)
@@ -199,12 +199,21 @@ SetPageTableAttributes (
   BOOLEAN               PageTableSplitted;\r
 \r
   //\r
-  // Don't mark page table as read-only if heap guard is enabled.\r
+  // Don't mark page table to read-only if heap guard is enabled.\r
   //\r
   //      BIT2: SMM page guard enabled\r
   //      BIT3: SMM pool guard enabled\r
   //\r
   if ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT3 | BIT2)) != 0) {\r
+    DEBUG ((DEBUG_INFO, "Don't mark page table to read-only as heap guard is enabled\n"));\r
+    return ;\r
+  }\r
+\r
+  //\r
+  // Don't mark page table to read-only if SMM profile is enabled.\r
+  //\r
+  if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {\r
+    DEBUG ((DEBUG_INFO, "Don't mark page table to read-only as SMM profile is enabled\n"));\r
     return ;\r
   }\r
 \r