]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/BaseMemEncryptSevLib: promote DEBUG_WARN levels to DEBUG_ERROR
authorLaszlo Ersek <lersek@redhat.com>
Wed, 30 Aug 2017 11:31:30 +0000 (13:31 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 1 Sep 2017 12:20:33 +0000 (14:20 +0200)
In SetMemoryEncDec(), we have four locations where we (a) log a message on
the DEBUG_WARN level that says "ERROR", (b) return the status code
RETURN_NO_MAPPING right after.

These messages clearly describe actual errors (bad PML4, PDPE, PDE, PTE).
Promote their debug levels to DEBUG_ERROR, and remove the word "ERROR"
from the messages.

Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c

index 58c793dae6bf6a08c3d5323b31db610f2b3f518d..c37d799bc1f4741d52d989c69fbe807468c8ce1b 100644 (file)
@@ -287,8 +287,8 @@ SetMemoryEncDec (
     PageMapLevel4Entry += PML4_OFFSET(PhysicalAddress);\r
     if (!PageMapLevel4Entry->Bits.Present) {\r
       DEBUG ((\r
-        DEBUG_WARN,\r
-        "%a:%a: ERROR bad PML4 for Physical=0x%Lx\n",\r
+        DEBUG_ERROR,\r
+        "%a:%a: bad PML4 for Physical=0x%Lx\n",\r
         gEfiCallerBaseName,\r
         __FUNCTION__,\r
         PhysicalAddress\r
@@ -300,8 +300,8 @@ SetMemoryEncDec (
     PageDirectory1GEntry += PDP_OFFSET(PhysicalAddress);\r
     if (!PageDirectory1GEntry->Bits.Present) {\r
       DEBUG ((\r
-        DEBUG_WARN,\r
-        "%a:%a: ERROR bad PDPE for Physical=0x%Lx\n",\r
+        DEBUG_ERROR,\r
+        "%a:%a: bad PDPE for Physical=0x%Lx\n",\r
         gEfiCallerBaseName,\r
         __FUNCTION__,\r
         PhysicalAddress\r
@@ -351,8 +351,8 @@ SetMemoryEncDec (
       PageDirectory2MEntry += PDE_OFFSET(PhysicalAddress);\r
       if (!PageDirectory2MEntry->Bits.Present) {\r
         DEBUG ((\r
-          DEBUG_WARN,\r
-          "%a:%a: ERROR bad PDE for Physical=0x%Lx\n",\r
+          DEBUG_ERROR,\r
+          "%a:%a: bad PDE for Physical=0x%Lx\n",\r
           gEfiCallerBaseName,\r
           __FUNCTION__,\r
           PhysicalAddress\r
@@ -391,8 +391,8 @@ SetMemoryEncDec (
         PageTableEntry += PTE_OFFSET(PhysicalAddress);\r
         if (!PageTableEntry->Bits.Present) {\r
           DEBUG ((\r
-            DEBUG_WARN,\r
-            "%a:%a: ERROR bad PTE for Physical=0x%Lx\n",\r
+            DEBUG_ERROR,\r
+            "%a:%a: bad PTE for Physical=0x%Lx\n",\r
             gEfiCallerBaseName,\r
             __FUNCTION__,\r
             PhysicalAddress\r