UefiCpuPkg PiSmmCpuDxeSmm: Remove redundant code to set IDT range to RO
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / SmmCpuMemoryManagement.c
index 16664f3..2a4a298 100644 (file)
@@ -803,11 +803,10 @@ PatchGdtIdtMap (
 \r
   BaseAddress = gcSmiIdtr.Base;\r
   Size = ALIGN_VALUE(gcSmiIdtr.Limit + 1, SIZE_4KB);\r
-  SmmSetMemoryAttributes (\r
-    BaseAddress,\r
-    Size,\r
-    EFI_MEMORY_RO\r
-    );\r
+  //\r
+  // The range should have been set to RO\r
+  // if it is allocated with EfiRuntimeServicesCode.\r
+  //\r
   SmmSetMemoryAttributes (\r
     BaseAddress,\r
     Size,\r