X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvirtio-pci.h;h=e1d972dc53275bddfd4966c0295ed91682f9ac06;hb=refs%2Fheads%2Fcoreboot;hp=6932036ab148b01c10a2640b33abdf36968400c3;hpb=89acfa3fb404bd81eac23bd5a3fb92d4eec50648;p=seabios.git diff --git a/src/virtio-pci.h b/src/virtio-pci.h index 6932036..e1d972d 100644 --- a/src/virtio-pci.h +++ b/src/virtio-pci.h @@ -1,6 +1,8 @@ #ifndef _VIRTIO_PCI_H #define _VIRTIO_PCI_H +#include "ioport.h" // inl + /* A 32-bit r/o bitmask of the features supported by the host */ #define VIRTIO_PCI_HOST_FEATURES 0 @@ -69,6 +71,10 @@ static inline void vp_set_status(unsigned int ioaddr, u8 status) outb(status, ioaddr + VIRTIO_PCI_STATUS); } +static inline u8 vp_get_isr(unsigned int ioaddr) +{ + return inb(ioaddr + VIRTIO_PCI_ISR); +} static inline void vp_reset(unsigned int ioaddr) { @@ -92,6 +98,8 @@ static inline void vp_del_vq(unsigned int ioaddr, int queue_index) outl(0, ioaddr + VIRTIO_PCI_QUEUE_PFN); } +struct vring_virtqueue; +u16 vp_init_simple(u16 bdf); int vp_find_vq(unsigned int ioaddr, int queue_index, - struct vring_virtqueue *vq); + struct vring_virtqueue **p_vq); #endif /* _VIRTIO_PCI_H_ */