gem5  v20.1.0.0
Classes | Macros | Functions
virtio_ring.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  vring_desc
 
struct  vring_avail
 
struct  vring_used_elem
 
struct  vring_used
 
struct  vring
 

Macros

#define VRING_DESC_F_NEXT   1
 
#define VRING_DESC_F_WRITE   2
 
#define VRING_DESC_F_INDIRECT   4
 
#define VRING_USED_F_NO_NOTIFY   1
 
#define VRING_AVAIL_F_NO_INTERRUPT   1
 
#define VIRTIO_RING_F_INDIRECT_DESC   28
 
#define VIRTIO_RING_F_EVENT_IDX   29
 
#define vring_used_event(vr)   ((vr)->avail->ring[(vr)->num])
 
#define vring_avail_event(vr)   (*(uint16_t *)&(vr)->used->ring[(vr)->num])
 

Functions

static void vring_init (struct vring *vr, unsigned int num, void *p, unsigned long align)
 
static unsigned vring_size (unsigned int num, unsigned long align)
 
static int vring_need_event (uint16_t event_idx, uint16_t new_idx, uint16_t old)
 

Macro Definition Documentation

◆ VIRTIO_RING_F_EVENT_IDX

#define VIRTIO_RING_F_EVENT_IDX   29

Definition at line 59 of file virtio_ring.h.

◆ VIRTIO_RING_F_INDIRECT_DESC

#define VIRTIO_RING_F_INDIRECT_DESC   28

Definition at line 53 of file virtio_ring.h.

◆ vring_avail_event

#define vring_avail_event (   vr)    (*(uint16_t *)&(vr)->used->ring[(vr)->num])

Definition at line 130 of file virtio_ring.h.

◆ VRING_AVAIL_F_NO_INTERRUPT

#define VRING_AVAIL_F_NO_INTERRUPT   1

Definition at line 50 of file virtio_ring.h.

◆ VRING_DESC_F_INDIRECT

#define VRING_DESC_F_INDIRECT   4

Definition at line 41 of file virtio_ring.h.

◆ VRING_DESC_F_NEXT

#define VRING_DESC_F_NEXT   1

Definition at line 37 of file virtio_ring.h.

◆ VRING_DESC_F_WRITE

#define VRING_DESC_F_WRITE   2

Definition at line 39 of file virtio_ring.h.

◆ vring_used_event

#define vring_used_event (   vr)    ((vr)->avail->ring[(vr)->num])

Definition at line 129 of file virtio_ring.h.

◆ VRING_USED_F_NO_NOTIFY

#define VRING_USED_F_NO_NOTIFY   1

Definition at line 46 of file virtio_ring.h.

Function Documentation

◆ vring_init()

static void vring_init ( struct vring vr,
unsigned int  num,
void *  p,
unsigned long  align 
)
inlinestatic

◆ vring_need_event()

static int vring_need_event ( uint16_t  event_idx,
uint16_t  new_idx,
uint16_t  old 
)
inlinestatic

Definition at line 153 of file virtio_ring.h.

◆ vring_size()

static unsigned vring_size ( unsigned int  num,
unsigned long  align 
)
inlinestatic

Definition at line 142 of file virtio_ring.h.

References sc_dt::align().


Generated on Wed Sep 30 2020 14:02:19 for gem5 by doxygen 1.8.17