#ifndef __VIRTIO_DEVICE_H__\r
#define __VIRTIO_DEVICE_H__\r
\r
+#include <IndustryStandard/Virtio.h>\r
+\r
// VirtIo Specification Revision: Major[31:24].Minor[23:16].Revision[15:0\r
#define VIRTIO_SPEC_REVISION(major,minor,revision) \\r
((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | ((revision) & 0xFFFF))\r
);\r
\r
/**\r
- Read the queue address field from the Virtio Header.\r
-\r
- QueueAddress is the address of the virtqueue divided by 4096.\r
-\r
- @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL\r
-\r
- @param[out] QueueAddress The 32-bit queue address field.\r
-\r
- @retval EFI_SUCCESS The data was read successfully.\r
- @retval EFI_UNSUPPORTED The underlying IO device doesn't support the\r
- provided address offset and read size.\r
- @retval EFI_INVALID_PARAMETER QueueAddress is NULL\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *VIRTIO_GET_QUEUE_ADDRESS) (\r
- IN VIRTIO_DEVICE_PROTOCOL *This,\r
- OUT UINT32 *QueueAddress\r
- );\r
-\r
-/**\r
- Write the queue address field in the Virtio Header.\r
-\r
- The parameter Address must be the base address of the virtqueue divided\r
- by 4096.\r
+ Write the queue address field(s) in the Virtio Header.\r
\r
@param[in] This This instance of VIRTIO_DEVICE_PROTOCOL\r
\r
- @param[in] Address The 32-bit Queue Address field\r
+ @param[in] Ring The initialized VRING object to take the\r
+ addresses from.\r
\r
@retval EFI_SUCCESS The data was written successfully.\r
@retval EFI_UNSUPPORTED The underlying IO device doesn't support the\r
EFI_STATUS\r
(EFIAPI *VIRTIO_SET_QUEUE_ADDRESS) (\r
IN VIRTIO_DEVICE_PROTOCOL *This,\r
- IN UINT32 Address\r
+ IN VRING *Ring\r
);\r
\r
/**\r
VIRTIO_GET_DEVICE_FEATURES GetDeviceFeatures;\r
VIRTIO_SET_GUEST_FEATURES SetGuestFeatures;\r
\r
- VIRTIO_GET_QUEUE_ADDRESS GetQueueAddress;\r
VIRTIO_SET_QUEUE_ADDRESS SetQueueAddress;\r
\r
VIRTIO_SET_QUEUE_SEL SetQueueSel;\r