From f24a2794e1b527e45efbbcad1c272f176f3d9df0 Mon Sep 17 00:00:00 2001 From: Aaron Young Date: Wed, 27 Oct 2021 16:05:43 -0700 Subject: [virtio] Update driver to use DMA API Signed-off-by: Aaron Young --- src/include/ipxe/virtio-ring.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/include/ipxe/virtio-ring.h') diff --git a/src/include/ipxe/virtio-ring.h b/src/include/ipxe/virtio-ring.h index 852769f29..d082139e9 100644 --- a/src/include/ipxe/virtio-ring.h +++ b/src/include/ipxe/virtio-ring.h @@ -2,6 +2,7 @@ # define _VIRTIO_RING_H_ #include +#include /* Status byte for guest to report progress, and synchronize features. */ /* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */ @@ -74,17 +75,21 @@ struct vring { struct vring_virtqueue { unsigned char *queue; + size_t queue_size; + struct dma_mapping map; + struct dma_device *dma; struct vring vring; u16 free_head; u16 last_used_idx; void **vdata; + struct virtio_net_hdr_modern *empty_header; /* PCI */ int queue_index; struct virtio_pci_region notification; }; struct vring_list { - char *addr; + physaddr_t addr; unsigned int length; }; -- cgit v1.2.3-55-g7522