]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
authorLaszlo Ersek <lersek@redhat.com>
Mon, 4 Dec 2017 19:21:56 +0000 (20:21 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 5 Dec 2017 17:58:06 +0000 (18:58 +0100)
In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection
policy", 2017-02-24), we added two informative messages with the
InitializeDxeNxMemoryProtectionPolicy() function:

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
> active memory regions

and

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
> inactive memory regions

The messages don't report errors or warnings, thus downgrade their log
masks from DEBUG_ERROR to DEBUG_INFO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c

index 21a52d0af55a6d94814d7859e168082054fc3ba1..a74cfc137a228a0d4705195088fbc1d6df8bd4db 100644 (file)
@@ -831,8 +831,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   } while (Status == EFI_BUFFER_TOO_SMALL);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory regions\n",\r
-    __FUNCTION__));\r
+  DEBUG ((\r
+    DEBUG_INFO,\r
+    "%a: applying strict permissions to active memory regions\n",\r
+    __FUNCTION__\r
+    ));\r
 \r
   MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);\r
 \r
@@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   // accessible, but have not been added to the UEFI memory map (yet).\r
   //\r
   if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) != 0) {\r
-    DEBUG((DEBUG_ERROR,\r
+    DEBUG ((\r
+      DEBUG_INFO,\r
       "%a: applying strict permissions to inactive memory regions\n",\r
-      __FUNCTION__));\r
+      __FUNCTION__\r
+      ));\r
 \r
     CoreAcquireGcdMemoryLock ();\r
 \r