Changeset cbcb34c in mainline for uspace/lib/virtio/virtio-pci.h


Ignore:
Timestamp:
2018-05-22T19:06:50Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
341df5f
Parents:
1c53d93
git-author:
Jakub Jermar <jakub@…> (2018-05-05 14:43:51)
git-committer:
Jakub Jermar <jakub@…> (2018-05-22 19:06:50)
Message:

Configure the virtqueues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/virtio/virtio-pci.h

    r1c53d93 rcbcb34c  
    124124} virtq_used_t;
    125125
     126typedef struct {
     127        void *virt;
     128        uintptr_t phys;
     129        size_t size;
     130
     131        /**
     132         * Size of the queue which determines the number of descriptors and
     133         * DMA buffers.
     134         */
     135        size_t queue_size;
     136
     137        /** Virtual address of queue size virtq descriptors */
     138        virtq_desc_t *desc;
     139        /** Virtual address of the available ring */
     140        virtq_avail_t *avail;
     141        /** Virtual address of the used ring */
     142        virtq_used_t *used;
     143
     144        /**
     145         * Queue-size-sized array of virtual addresses of the atcual DMA
     146         * buffers.
     147         */
     148        void **buffers;
     149} virtq_t;
     150
    126151/** VIRTIO-device specific data associated with the NIC framework nic_t */
    127152typedef struct {
     
    145170        /** Device-specific configuration */
    146171        void *device_cfg;
     172
     173        /** Virtqueues */
     174        virtq_t *queues;
    147175} virtio_dev_t;
     176
     177extern errno_t virtio_virtq_setup(virtio_dev_t *, uint16_t, uint16_t, size_t,
     178    uint16_t);
     179extern void virtio_virtq_teardown(virtio_dev_t *, uint16_t);
    148180
    149181extern errno_t virtio_pci_dev_initialize(ddf_dev_t *, virtio_dev_t *);
Note: See TracChangeset for help on using the changeset viewer.