Changeset 1c53d93 in mainline
- Timestamp:
- 2018-05-22T19:06:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cbcb34c
- Parents:
- 659bd24
- git-author:
- Jakub Jermar <jakub@…> (2018-05-03 18:50:49)
- git-committer:
- Jakub Jermar <jakub@…> (2018-05-22 19:06:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/virtio/virtio-pci.h
r659bd24 r1c53d93 58 58 #define VIRTIO_DEV_STATUS_FAILED 128 59 59 60 /** Common configuration structure layout according to VIRTIO v 1.*/60 /** Common configuration structure layout according to VIRTIO version 1.0 */ 61 61 typedef struct virtio_pci_common_cfg { 62 62 ioport32_t device_feature_select; … … 78 78 } virtio_pci_common_cfg_t; 79 79 80 /** The buffer continues in the next descriptor */ 81 #define VIRTQ_DESC_F_NEXT 1 82 /** Device write-only buffer */ 83 #define VIRTQ_DESC_F_WRITE 2 84 /** Buffer contains a list of buffer descriptors */ 85 #define VIRTQ_DESC_F_INDIRECT 4 86 87 /** Virtqueue Descriptor structure as per VIRTIO version 1.0 */ 88 typedef struct virtq_desc { 89 ioport64_t addr; /**< Buffer physical address */ 90 ioport32_t len; /**< Buffer length */ 91 ioport16_t flags; /**< Buffer flags */ 92 ioport16_t next; /**< Continuation descriptor */ 93 } virtq_desc_t; 94 95 #define VIRTQ_AVAIL_F_NO_INTERRUPT 1 96 97 /** Virtqueue Available Ring as per VIRTIO version 1.0 */ 98 typedef struct virtq_avail { 99 ioport16_t flags; 100 ioport16_t idx; 101 ioport16_t ring[]; 102 /* 103 * We do not define the optional used_event member here in order to be 104 * able to define ring as a variable-length array. 105 */ 106 } virtq_avail_t; 107 108 typedef struct virtq_used_elem { 109 ioport32_t id; 110 ioport32_t len; 111 } virtq_used_elem_t; 112 113 #define VIRTQ_USED_F_NO_NOTIFY 1 114 115 /** Virtqueue Used Ring as per VIRTIO version 1.0 */ 116 typedef struct virtq_used { 117 ioport16_t flags; 118 ioport16_t idx; 119 virtq_used_elem_t ring[]; 120 /* 121 * We do not define the optional avail_event member here in order to be 122 * able to define ring as a variable-length array. 123 */ 124 } virtq_used_t; 125 126 /** VIRTIO-device specific data associated with the NIC framework nic_t */ 80 127 typedef struct { 81 128 struct {
Note:
See TracChangeset
for help on using the changeset viewer.