|
#define | ___VIRTIO_H 0 |
|
#define | VIRTIO_F_NOTIFY_ON_EMPTY (1ULL << 24) |
|
#define | VIRTIO_F_ANY_LAYOUT (1ULL << 27) /* Arbitrary descriptor layouts. */ |
|
#define | VIRTIO_F_INDIRECT_DESC (1ULL << 28) /* Support for indirect descriptors */ |
|
#define | VIRTIO_F_EVENT_IDX (1ULL << 29) /* Support for avail_event and used_event fields */ |
|
#define | VIRTIO_F_UNUSED (1ULL << 30) /* test purpose */ |
|
#define | VIRTIO_F_VERSION_1 (1ULL << 32) |
|
#define | VIRTIO_F_ACCESS_PLATFORM (1ULL << 33) |
|
#define | VIRTIO_F_RING_PACKED (1ULL << 34) |
|
#define | VIRTIO_F_IN_ORDER (1ULL << 35) |
|
#define | VIRTIO_F_ORDER_PLATFORM (1ULL << 36) |
|
#define | VIRTIO_F_SR_IOV (1ULL << 37) |
|
#define | VIRTIO_F_NOTIFICATION_DATA (1ULL << 38) |
|
#define | VIRTIO_QUEUE_DESC_F_AVAIL (1 << 7) |
|
#define | VIRTIO_QUEUE_DESC_F_USED (1 << 15) |
|
#define | VIRTIO_QUEUE_DESC_F_WRITE 2 /* This marks a buffer as device write-only (otherwise device read-only). */ |
|
#define | VIRTIO_QUEUE_DESC_F_NEXT 1 /* This marks a buffer as continuing via the next field. */ |
|
#define | VIRTIO_QUEUE_DESC_F_INDIRECT 4 /* This means the buffer contains a list of buffer descriptors. */ |
|
#define | VIRTIO_QUEUE_SIZE 0x100 |
|
#define | VIRTIO_QUEUE_AVAIL_F_NO_INTERRUPT 1 |
|
#define | VIRTIO_QUEUE_USED_F_NO_NOTIFY 1 |
|
#define | VIRTIO_QUEUE_RING_EVENT_FLAGS_ENABLE 0x0 |
|
#define | VIRTIO_QUEUE_RING_EVENT_FLAGS_DISABLE 0x1 |
|
#define | VIRTIO_QUEUE_RING_EVENT_FLAGS_DESC 0x2 |
|
#define | VIRTIO_MSI_X_NO_VECTOR 0xffff |
|
#define | VIRTIO_IOPORT_DEVICE_F 0x00 |
|
#define | VIRTIO_IOPORT_DRIVER_F 0x04 |
|
#define | VIRTIO_IOPORT_VQ_ADDR 0x08 |
|
#define | VIRTIO_IOPORT_VQ_SIZE 0x0C |
|
#define | VIRTIO_IOPORT_VQ_SELECT 0x0E |
|
#define | VIRTIO_IOPORT_VQ_NOTIFY 0x10 |
|
#define | VIRTIO_IOPORT_DEVICE_STATUS 0x12 |
|
#define | VIRTIO_IOPORT_ISR_STATUS 0x13 |
|
#define | VIRTIO_IOPORT_CFG_MSIX_VECTOR 0x14 |
|
#define | VIRTIO_IOPORT_VQ_MSIX_VECTOR 0x16 |
|
|
static uint64_t | virtio_queue_get_size (virtio_dev_t *vdev) |
|
static virtio_queue_descriptor_t * | virtio_queue_get_desc (virtio_dev_t *vdev, virtio_queue_t queue) |
|
static virtio_queue_avail_t * | virtio_queue_get_avail (virtio_dev_t *vdev, virtio_queue_t queue) |
|
static virtio_queue_used_t * | virtio_queue_get_used (virtio_dev_t *vdev, virtio_queue_t queue) |
|
int8_t | virtio_create_queue (virtio_dev_t *vdev, uint16_t queue_no, uint64_t queue_item_size, boolean_t write, boolean_t iter_rw, virtio_queue_item_builder_f item_builder, interrupt_irq modern, interrupt_irq legacy) |
|
virtio_dev_t * | virtio_get_device (const pci_dev_t *pci_dev) |
|
int8_t | virtio_init_dev (virtio_dev_t *vdev, virtio_select_features_f select_features, virtio_create_queues_f create_queues) |
|
Virtio header.
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.