]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Include/Protocol/VirtioDevice.h
OvmfPkg/Virtio: take RingBaseShift in SetQueueAddress()
[mirror_edk2.git] / OvmfPkg / Include / Protocol / VirtioDevice.h
index 9a01932958a2901bc0e45e068dcc558ef463b3d1..afc27e54a863e2dba4038e53dc4fc2362acb564d 100644 (file)
@@ -156,7 +156,21 @@ EFI_STATUS
   @param[in] This             This instance of VIRTIO_DEVICE_PROTOCOL\r
 \r
   @param[in] Ring             The initialized VRING object to take the\r
-                              addresses from.\r
+                              addresses from. The caller is responsible for\r
+                              ensuring that on input, all Ring->NumPages pages,\r
+                              starting at Ring->Base, have been successfully\r
+                              mapped with a single call to\r
+                              This->MapSharedBuffer() for CommonBuffer bus\r
+                              master operation.\r
+\r
+  @param[in] RingBaseShift    Adding this value using UINT64 arithmetic to the\r
+                              addresses found in Ring translates them from\r
+                              system memory to bus addresses. The caller shall\r
+                              calculate RingBaseShift as\r
+                              (DeviceAddress - (UINT64)(UINTN)HostAddress),\r
+                              where DeviceAddress and HostAddress (i.e.,\r
+                              Ring->Base) were output and input parameters of\r
+                              This->MapSharedBuffer(), respectively.\r
 \r
   @retval EFI_SUCCESS         The data was written successfully.\r
   @retval EFI_UNSUPPORTED     The underlying IO device doesn't support the\r
@@ -166,7 +180,8 @@ typedef
 EFI_STATUS\r
 (EFIAPI *VIRTIO_SET_QUEUE_ADDRESS) (\r
   IN VIRTIO_DEVICE_PROTOCOL  *This,\r
-  IN VRING                   *Ring\r
+  IN VRING                   *Ring,\r
+  IN UINT64                  RingBaseShift\r
   );\r
 \r
 /**\r