]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/BaseMemEncryptSevLib: clean up debug logging of PhysicalAddress
authorLaszlo Ersek <lersek@redhat.com>
Wed, 30 Aug 2017 11:22:58 +0000 (13:22 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 1 Sep 2017 12:20:30 +0000 (14:20 +0200)
In the SetMemoryEncDec() function, the way we currently report
PhysicalAddress is not uniform:

- mostly we say "for %lx",

- in one spot we say "at %lx" (even though the 2MB page being split does
  not live *at* PhysicalAddress, instead it maps PhysicalAddress),

- in another spot we don't log PhysicalAddress at all (when splitting a
  1GB page).

Unify this, using the format string "for Physical=0x%Lx".

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 5e8c9b4c439b50b668a2400e7ca6a173f1a9d676..58c793dae6bf6a08c3d5323b31db610f2b3f518d 100644 (file)
@@ -288,7 +288,7 @@ SetMemoryEncDec (
     if (!PageMapLevel4Entry->Bits.Present) {\r
       DEBUG ((\r
         DEBUG_WARN,\r
-        "%a:%a: ERROR bad PML4 for %lx\n",\r
+        "%a:%a: ERROR bad PML4 for Physical=0x%Lx\n",\r
         gEfiCallerBaseName,\r
         __FUNCTION__,\r
         PhysicalAddress\r
@@ -301,7 +301,7 @@ SetMemoryEncDec (
     if (!PageDirectory1GEntry->Bits.Present) {\r
       DEBUG ((\r
         DEBUG_WARN,\r
-        "%a:%a: ERROR bad PDPE for %lx\n",\r
+        "%a:%a: ERROR bad PDPE for Physical=0x%Lx\n",\r
         gEfiCallerBaseName,\r
         __FUNCTION__,\r
         PhysicalAddress\r
@@ -321,7 +321,7 @@ SetMemoryEncDec (
         SetOrClearCBit(&PageDirectory1GEntry->Uint64, Mode);\r
         DEBUG ((\r
           DEBUG_VERBOSE,\r
-          "%a:%a: Updated 1GB entry for %lx\n",\r
+          "%a:%a: Updated 1GB entry for Physical=0x%Lx\n",\r
           gEfiCallerBaseName,\r
           __FUNCTION__,\r
           PhysicalAddress\r
@@ -334,9 +334,10 @@ SetMemoryEncDec (
         //\r
         DEBUG ((\r
           DEBUG_VERBOSE,\r
-          "%a:%a: Spliting 1GB page\n",\r
+          "%a:%a: Spliting 1GB page for Physical=0x%Lx\n",\r
           gEfiCallerBaseName,\r
-          __FUNCTION__\r
+          __FUNCTION__,\r
+          PhysicalAddress\r
           ));\r
         Split1GPageTo2M(((UINT64)PageDirectory1GEntry->Bits.PageTableBaseAddress)<<30, (UINT64*) PageDirectory1GEntry, 0, 0);\r
         continue;\r
@@ -351,7 +352,7 @@ SetMemoryEncDec (
       if (!PageDirectory2MEntry->Bits.Present) {\r
         DEBUG ((\r
           DEBUG_WARN,\r
-          "%a:%a: ERROR bad PDE for %lx\n",\r
+          "%a:%a: ERROR bad PDE for Physical=0x%Lx\n",\r
           gEfiCallerBaseName,\r
           __FUNCTION__,\r
           PhysicalAddress\r
@@ -376,7 +377,7 @@ SetMemoryEncDec (
           //\r
           DEBUG ((\r
             DEBUG_VERBOSE,\r
-            "%a:%a: Spliting 2MB page at %lx\n",\r
+            "%a:%a: Spliting 2MB page for Physical=0x%Lx\n",\r
             gEfiCallerBaseName,\r
             __FUNCTION__,\r
             PhysicalAddress\r
@@ -391,7 +392,7 @@ SetMemoryEncDec (
         if (!PageTableEntry->Bits.Present) {\r
           DEBUG ((\r
             DEBUG_WARN,\r
-            "%a:%a: ERROR bad PTE for %lx\n",\r
+            "%a:%a: ERROR bad PTE for Physical=0x%Lx\n",\r
             gEfiCallerBaseName,\r
             __FUNCTION__,\r
             PhysicalAddress\r