\r
#include <IndustryStandard/Virtio.h>\r
\r
-\r
/**\r
\r
Configure a virtio ring.\r
EFI_STATUS\r
EFIAPI\r
VirtioRingInit (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN UINT16 QueueSize,\r
- OUT VRING *Ring\r
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
+ IN UINT16 QueueSize,\r
+ OUT VRING *Ring\r
);\r
\r
-\r
/**\r
\r
Map the ring buffer so that it can be accessed equally by both guest\r
EFI_STATUS\r
EFIAPI\r
VirtioRingMap (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN VRING *Ring,\r
- OUT UINT64 *RingBaseShift,\r
- OUT VOID **Mapping\r
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
+ IN VRING *Ring,\r
+ OUT UINT64 *RingBaseShift,\r
+ OUT VOID **Mapping\r
);\r
\r
/**\r
VOID\r
EFIAPI\r
VirtioRingUninit (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN OUT VRING *Ring\r
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
+ IN OUT VRING *Ring\r
);\r
\r
-\r
//\r
// Internal use structure for tracking the submission of a multi-descriptor\r
// request.\r
//\r
typedef struct {\r
- UINT16 HeadDescIdx;\r
- UINT16 NextDescIdx;\r
+ UINT16 HeadDescIdx;\r
+ UINT16 NextDescIdx;\r
} DESC_INDICES;\r
\r
-\r
/**\r
\r
Turn off interrupt notifications from the host, and prepare for appending\r
VOID\r
EFIAPI\r
VirtioPrepare (\r
- IN OUT VRING *Ring,\r
- OUT DESC_INDICES *Indices\r
+ IN OUT VRING *Ring,\r
+ OUT DESC_INDICES *Indices\r
);\r
\r
-\r
/**\r
\r
Append a contiguous buffer for transmission / reception via the virtio ring.\r
VOID\r
EFIAPI\r
VirtioAppendDesc (\r
- IN OUT VRING *Ring,\r
- IN UINT64 BufferDeviceAddress,\r
- IN UINT32 BufferSize,\r
- IN UINT16 Flags,\r
- IN OUT DESC_INDICES *Indices\r
+ IN OUT VRING *Ring,\r
+ IN UINT64 BufferDeviceAddress,\r
+ IN UINT32 BufferSize,\r
+ IN UINT16 Flags,\r
+ IN OUT DESC_INDICES *Indices\r
);\r
\r
-\r
/**\r
\r
Notify the host about the descriptor chain just built, and wait until the\r
EFI_STATUS\r
EFIAPI\r
VirtioFlush (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN UINT16 VirtQueueId,\r
- IN OUT VRING *Ring,\r
- IN DESC_INDICES *Indices,\r
- OUT UINT32 *UsedLen OPTIONAL\r
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
+ IN UINT16 VirtQueueId,\r
+ IN OUT VRING *Ring,\r
+ IN DESC_INDICES *Indices,\r
+ OUT UINT32 *UsedLen OPTIONAL\r
);\r
\r
-\r
/**\r
\r
Report the feature bits to the VirtIo 1.0 device that the VirtIo 1.0 driver\r
EFI_STATUS\r
EFIAPI\r
Virtio10WriteFeatures (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN UINT64 Features,\r
- IN OUT UINT8 *DeviceStatus\r
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
+ IN UINT64 Features,\r
+ IN OUT UINT8 *DeviceStatus\r
);\r
\r
/**\r
OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,\r
OUT VOID **Mapping\r
);\r
+\r
#endif // _VIRTIO_LIB_H_\r