]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/IntelVTdDxe/BmDma.c
IntelSiliconPkg/Vtd: Support CSM usage.
[mirror_edk2.git] / IntelSiliconPkg / IntelVTdDxe / BmDma.c
index 5dcee003cfc3035b01d667c40f13c2d03fc1d476..7a5f3619a47d6c3e5403c44b4d58286a75bdcc82 100644 (file)
@@ -77,14 +77,14 @@ IoMmuMap (
   EFI_PHYSICAL_ADDRESS                              DmaMemoryTop;\r
   BOOLEAN                                           NeedRemap;\r
 \r
-  DEBUG ((DEBUG_VERBOSE, "IoMmuMap: ==> 0x%08x - 0x%08x (%x)\n", HostAddress, NumberOfBytes, Operation));\r
-\r
-  if (HostAddress == NULL || NumberOfBytes == NULL || DeviceAddress == NULL ||\r
+  if (NumberOfBytes == NULL || DeviceAddress == NULL ||\r
       Mapping == NULL) {\r
     DEBUG ((DEBUG_ERROR, "IoMmuMap: %r\n", EFI_INVALID_PARAMETER));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  DEBUG ((DEBUG_VERBOSE, "IoMmuMap: ==> 0x%08x - 0x%08x (%x)\n", HostAddress, *NumberOfBytes, Operation));\r
+\r
   //\r
   // Make sure that Operation is valid\r
   //\r
@@ -135,7 +135,7 @@ IoMmuMap (
     if (NeedRemap) {\r
       //\r
       // Common Buffer operations can not be remapped.  If the common buffer\r
-      // if above 4GB, then it is not possible to generate a mapping, so return\r
+      // is above 4GB, then it is not possible to generate a mapping, so return\r
       // an error.\r
       //\r
       DEBUG ((DEBUG_ERROR, "IoMmuMap: %r\n", EFI_UNSUPPORTED));\r