X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FPiSmmCpuDxeSmm.c;fp=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FPiSmmCpuDxeSmm.c;h=69a04dfb2311b65699ff51efffc643bd1ba4767d;hp=50614f32c364b8e8e0caa3a969997ee6ff377e9b;hb=d47b85a621add591212546b12945d7b9873fbabf;hpb=30f6148546c7092650ab4886fc6d95d5065c3188 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 50614f32c3..69a04dfb23 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1121,9 +1121,6 @@ FindSmramInfo ( *SmrrBase = (UINT32)CurrentSmramRange->CpuStart; *SmrrSize = (UINT32)CurrentSmramRange->PhysicalSize; - // - // Extend *SmrrBase/*SmrrSize to include adjacent SMRAM ranges - // do { Found = FALSE; for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) { @@ -1435,20 +1432,14 @@ PerformRemainingTasks ( SetMemMapAttributes (); // - // Do not protect memory outside SMRAM when SMM static page table is not enabled. + // For outside SMRAM, we only map SMM communication buffer or MMIO. // - if (mCpuSmmStaticPageTable) { - - // - // For outside SMRAM, we only map SMM communication buffer or MMIO. - // - SetUefiMemMapAttributes (); + SetUefiMemMapAttributes (); - // - // Set page table itself to be read-only - // - SetPageTableAttributes (); - } + // + // Set page table itself to be read-only + // + SetPageTableAttributes (); // // Configure SMM Code Access Check feature if available.