]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Core/Dxe: expose SP and CRYPTO capabilities in UEFI memmap
authorMalgorzata Kukiello <jacek.kukiello@intel.com>
Thu, 24 Sep 2020 10:21:31 +0000 (18:21 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 10 Oct 2020 04:04:50 +0000 (04:04 +0000)
OSs are now capable of treating SP and CRYPTO memory as true capabilities
and therefore these should be exposed. This requires usage of a separate
ACCESS_MASK to hide all page-access permission capabilities.
Change in masking and hiding of SP and CRYPTO was introduced in
3bd5c994c879f78e8e3d5346dc3b627f199291aa

Signed-off-by: Malgorzata Kukiello <jacek.kukiello@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Oleksiy Yakovlev <oleksiyy@ami.com>
Cc: Ard Biesheuvel (ARM address) <ard.biesheuvel@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Core/Dxe/Mem/Page.c

index 2c2c9cd6c334ecaf3b143611f3793fa111699b5e..731bf08bc959436f800ee908e11bd57378a1b05f 100644 (file)
@@ -1924,16 +1924,16 @@ CoreGetMemoryMap (
   //       set attributes and change memory paging attribute accordingly.\r
   //       But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by\r
   //       value from Capabilities in GCD memory map. This might cause\r
-  //       boot problems. Clearing all paging related capabilities can\r
-  //       workaround it. Following code is supposed to be removed once\r
-  //       the usage of EFI_MEMORY_DESCRIPTOR.Attribute is clarified in\r
-  //       UEFI spec and adopted by both EDK-II Core and all supported\r
-  //       OSs.\r
+  //       boot problems. Clearing all page-access permission related\r
+  //       capabilities can workaround it. Following code is supposed to\r
+  //       be removed once the usage of EFI_MEMORY_DESCRIPTOR.Attribute\r
+  //       is clarified in UEFI spec and adopted by both EDK-II Core and\r
+  //       all supported OSs.\r
   //\r
   MemoryMapEnd = MemoryMap;\r
   MemoryMap = MemoryMapStart;\r
   while (MemoryMap < MemoryMapEnd) {\r
-    MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK;\r
+    MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ACCESS_MASK;\r
     MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size);\r
   }\r
   MergeMemoryMap (MemoryMapStart, &BufferSize, Size);\r