]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c
MdeModulePkg: disable properties table generation but retain the code
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Misc / MemoryAttributesTable.c
index ebdeb35079a2b5ec9688196a53c7cbfc08178e15..4a2b4a82a6e2d9e4b9506adc61e94d54ee8fc46f 100644 (file)
@@ -18,7 +18,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Guid/EventGroup.h>\r
 \r
 #include <Guid/MemoryAttributesTable.h>\r
-#include <Guid/PropertiesTable.h>\r
 \r
 #include "DxeMain.h"\r
 \r
@@ -64,7 +63,7 @@ CoreGetMemoryMapWithSeparatedImageSection (
   OUT UINT32                    *DescriptorVersion\r
   );\r
 \r
-extern EFI_PROPERTIES_TABLE  mPropertiesTable;\r
+BOOLEAN                      mMemoryAttributesTableEnable = TRUE;\r
 EFI_MEMORY_ATTRIBUTES_TABLE  *mMemoryAttributesTable = NULL;\r
 BOOLEAN                      mMemoryAttributesTableReadyToBoot = FALSE;\r
 \r
@@ -96,8 +95,8 @@ InstallMemoryAttributesTable (
     return;\r
   }\r
 \r
-  if ((mPropertiesTable.MemoryProtectionAttribute & EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) {\r
-    DEBUG ((EFI_D_VERBOSE, "MemoryProtectionAttribute NON_EXECUTABLE_PE_DATA is not set, "));\r
+  if (!mMemoryAttributesTableEnable) {\r
+    DEBUG ((DEBUG_VERBOSE, "Cannot install Memory Attributes Table "));\r
     DEBUG ((EFI_D_VERBOSE, "because Runtime Driver Section Alignment is not %dK.\n", RUNTIME_PAGE_ALLOCATION_GRANULARITY >> 10));\r
     return ;\r
   }\r