\r
#include <IndustryStandard/Virtio.h>\r
\r
-/**\r
-\r
- Write a word into VirtIo Device Specific Region\r
-\r
- The VirtIo Device Specific Region must be an iomem region.\r
- This is an internal function for the driver-specific VIRTIO_CFG_WRITE()\r
- macros.\r
-\r
- @param[in] VirtIo Target Virtio device.\r
-\r
- @param[in] FieldOffset Destination offset.\r
-\r
- @param[in] FieldSize Destination field size, must be in { 1, 2, 4, 8 }.\r
-\r
- @param[in] Value Little endian value to write, converted to UINT64.\r
- The least significant FieldSize bytes will be used.\r
-\r
-\r
- @return Status code returned by VirtIo->WriteDevice().\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-VirtioWriteDevice (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN UINTN FieldOffset,\r
- IN UINTN FieldSize,\r
- IN UINT64 Value\r
- );\r
-\r
-\r
-/**\r
-\r
- Read a word from VirtIo Device Specific Region\r
-\r
- The VirtIo Device Specific Region must be an iomem region.\r
- This is an internal function for the driver-specific VIRTIO_CFG_READ()\r
- macros.\r
-\r
- @param[in] VirtIo Source Virtio device.\r
-\r
- @param[in] FieldOffset Source offset.\r
-\r
- @param[in] FieldSize Source field size, must be in { 1, 2, 4, 8 }.\r
-\r
- @param[in] BufferSize Number of bytes available in the target buffer. Must\r
- equal FieldSize.\r
-\r
- @param[out] Buffer Target buffer.\r
-\r
-\r
- @return Status code returned by VirtIo->ReadDevice().\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-VirtioReadDevice (\r
- IN VIRTIO_DEVICE_PROTOCOL *VirtIo,\r
- IN UINTN FieldOffset,\r
- IN UINTN FieldSize,\r
- IN UINTN BufferSize,\r
- OUT VOID *Buffer\r
- );\r
-\r
\r
/**\r
\r