[edk2] [PATCH 11/11] OvmfPkg/IoMmuDxe: IoMmuFreeBuffer(): clean up DEBUG message

Laszlo Ersek posted 11 patches 7 years, 3 months ago
[edk2] [PATCH 11/11] OvmfPkg/IoMmuDxe: IoMmuFreeBuffer(): clean up DEBUG message
Posted by Laszlo Ersek 7 years, 3 months ago
Log all relevant IN parameters on entry. (There are only IN parameters.)
Beautify the format string.

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>
---
 OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c
index 0ab7043498bd..bc57de5b572b 100644
--- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c
+++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c
@@ -611,6 +611,14 @@ IoMmuFreeBuffer (
   UINTN                CommonBufferPages;
   COMMON_BUFFER_HEADER *CommonBufferHeader;
 
+  DEBUG ((
+    DEBUG_VERBOSE,
+    "%a: Host=0x%p Pages=0x%Lx\n",
+    __FUNCTION__,
+    HostAddress,
+    (UINT64)Pages
+    ));
+
   CommonBufferPages = Pages + 1;
   CommonBufferHeader = (COMMON_BUFFER_HEADER *)(
                          (UINTN)HostAddress - EFI_PAGE_SIZE
@@ -630,14 +638,6 @@ IoMmuFreeBuffer (
   //
   FreePages (CommonBufferHeader->StashBuffer, Pages);
 
-  DEBUG ((
-    DEBUG_VERBOSE,
-    "%a Address 0x%Lx Pages 0x%Lx\n",
-    __FUNCTION__,
-    (UINT64)(UINTN)HostAddress,
-    (UINT64)Pages
-    ));
-
   //
   // Release the common buffer itself. Unmap() has re-encrypted it in-place, so
   // no need to zero it.
-- 
2.14.1.3.gb7cf6e02401b

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel