[ipxe-devel] [PATCH 3/4] [virtio] Add virtio 1.0 PCI support
Michael S. Tsirkin
mst at redhat.com
Thu Mar 10 14:09:59 UTC 2016
On Wed, Mar 09, 2016 at 07:20:02PM +0100, Ladi Prosek wrote:
> @@ -151,6 +188,145 @@ static inline void vp_del_vq(unsigned int ioaddr, int queue_index)
> outl(0, ioaddr + VIRTIO_PCI_QUEUE_PFN);
> }
>
> +struct vring_virtqueue;
> +
> int vp_find_vq(unsigned int ioaddr, int queue_index,
> struct vring_virtqueue *vq);
> +
> +/* Virtio 1.0 I/O routines with both port I/O and memory I/O support
> + * and endianness conversions */
> +
> +static inline void vpm_iowrite8(struct virtio_pci_region *region,
> + u8 data, size_t offset)
> +{
> + if (region->flags & VIRTIO_PCI_REGION_PORT) {
> + outb(data, region->base + offset);
> + } else {
> + writeb(data, region->base + offset);
> + }
> +}
Supporting config cap might also be nice.
--
MST
More information about the ipxe-devel
mailing list