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=723fd5042ff47f6ae36ccda21721338852e7ddeb;hp=69a04dfb2311b65699ff51efffc643bd1ba4767d;hb=79186ddcddcabe48eceb58efd296252e3d53b003;hpb=09f7c82b4c64956f58205dee7b661ab6c3253825 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 69a04dfb23..723fd5042f 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1431,15 +1431,17 @@ PerformRemainingTasks ( // SetMemMapAttributes (); - // - // For outside SMRAM, we only map SMM communication buffer or MMIO. - // - SetUefiMemMapAttributes (); + if (IsRestrictedMemoryAccess ()) { + // + // For outside SMRAM, we only map SMM communication buffer or MMIO. + // + 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.