]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/IoMmuDxe: convert UINTN arguments to UINT64 for the %Lx fmt spec
authorLaszlo Ersek <lersek@redhat.com>
Wed, 2 Aug 2017 09:42:14 +0000 (11:42 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 4 Aug 2017 23:31:52 +0000 (01:31 +0200)
The portable way to print UINTN values is to use the %Lx format specifier,
and to convert the values to UINT64. The second step is currently missing,
add it.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
OvmfPkg/IoMmuDxe/AmdSevIoMmu.c

index dfad2cbb569d1180c700465dea7c9d298e728bef..954062442782a589f38b0630e6bb56a284ea19a6 100644 (file)
@@ -203,8 +203,8 @@ IoMmuMap (
     __FUNCTION__,\r
     MapInfo->PlainTextAddress,\r
     MapInfo->CryptedAddress,\r
-    MapInfo->NumberOfPages,\r
-    MapInfo->NumberOfBytes\r
+    (UINT64)MapInfo->NumberOfPages,\r
+    (UINT64)MapInfo->NumberOfBytes\r
     ));\r
 \r
   return EFI_SUCCESS;\r
@@ -267,8 +267,8 @@ IoMmuUnmap (
     __FUNCTION__,\r
     MapInfo->PlainTextAddress,\r
     MapInfo->CryptedAddress,\r
-    MapInfo->NumberOfPages,\r
-    MapInfo->NumberOfBytes\r
+    (UINT64)MapInfo->NumberOfPages,\r
+    (UINT64)MapInfo->NumberOfBytes\r
     ));\r
   //\r
   // Restore the memory encryption mask\r
@@ -376,7 +376,7 @@ IoMmuAllocateBuffer (
     "%a Address 0x%Lx Pages 0x%Lx\n",\r
     __FUNCTION__,\r
     PhysicalAddress,\r
-    Pages\r
+    (UINT64)Pages\r
     ));\r
   return Status;\r
 }\r
@@ -419,8 +419,8 @@ IoMmuFreeBuffer (
     DEBUG_VERBOSE,\r
     "%a Address 0x%Lx Pages 0x%Lx\n",\r
     __FUNCTION__,\r
-    (UINTN)HostAddress,\r
-    Pages\r
+    (UINT64)(UINTN)HostAddress,\r
+    (UINT64)Pages\r
     ));\r
   return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages);\r
 }\r