#include <metal/io.h>
#include <metal/list.h>
#include <openamp/virtio.h>
#include <metal/cache.h>
Go to the source code of this file.
|
| struct virtio_device * | rproc_virtio_create_vdev (unsigned int role, unsigned int notifyid, void *rsc, struct metal_io_region *rsc_io, void *priv, rpvdev_notify_func notify, virtio_dev_reset_cb rst_cb) |
| | Create rproc virtio vdev. More...
|
| |
| void | rproc_virtio_remove_vdev (struct virtio_device *vdev) |
| | Remove rproc virtio vdev. More...
|
| |
| int | rproc_virtio_init_vring (struct virtio_device *vdev, unsigned int index, unsigned int notifyid, void *va, struct metal_io_region *io, unsigned int num_descs, unsigned int align) |
| | Initialize rproc virtio vring. More...
|
| |
| int | rproc_virtio_notified (struct virtio_device *vdev, uint32_t notifyid) |
| | remoteproc virtio is got notified More...
|
| |
| void | rproc_virtio_wait_remote_ready (struct virtio_device *vdev) |
| | Blocking function, waiting for the remote core is ready to start communications. More...
|
| |
◆ RPROC_MAX_VRING_DESC
| #define RPROC_MAX_VRING_DESC USHRT_MAX |
◆ RSC_TABLE_FLUSH
| #define RSC_TABLE_FLUSH |
( |
|
x, |
|
|
|
s |
|
) |
| do { } while (0) |
◆ RSC_TABLE_INVALIDATE
| #define RSC_TABLE_INVALIDATE |
( |
|
x, |
|
|
|
s |
|
) |
| do { } while (0) |
◆ rpvdev_notify_func
| typedef int(* rpvdev_notify_func) (void *priv, uint32_t id) |
◆ rproc_virtio_create_vdev()
Create rproc virtio vdev.
- Parameters
-
| role | VIRTIO_DEV_DRIVER or VIRTIO_DEV_DEVICE |
| notifyid | Virtio device notification id |
| rsc | Pointer to the virtio device resource |
| rsc_io | Pointer to the virtio device resource I/O region |
| priv | Pointer to the private data |
| notify | vdev and virtqueue notification function |
| rst_cb | Reset virtio device callback |
- Returns
- pointer to the created virtio device for success, NULL for failure.
◆ rproc_virtio_init_vring()
| int rproc_virtio_init_vring |
( |
struct virtio_device * |
vdev, |
|
|
unsigned int |
index, |
|
|
unsigned int |
notifyid, |
|
|
void * |
va, |
|
|
struct metal_io_region * |
io, |
|
|
unsigned int |
num_descs, |
|
|
unsigned int |
align |
|
) |
| |
Initialize rproc virtio vring.
- Parameters
-
| vdev | Pointer to the virtio device |
| index | vring index in the virtio device |
| notifyid | remoteproc vring notification id |
| va | vring virtual address |
| io | Pointer to vring I/O region |
| num_descs | Number of descriptors |
| align | vring alignment |
- Returns
- 0 for success, negative value for failure.
◆ rproc_virtio_notified()
| int rproc_virtio_notified |
( |
struct virtio_device * |
vdev, |
|
|
uint32_t |
notifyid |
|
) |
| |
remoteproc virtio is got notified
- Parameters
-
| vdev | Pointer to the virtio device |
| notifyid | Notify id |
- Returns
- 0 for successful, negative value for failure
◆ rproc_virtio_remove_vdev()
Remove rproc virtio vdev.
- Parameters
-
| vdev | Pointer to the virtio device |
◆ rproc_virtio_wait_remote_ready()
| void rproc_virtio_wait_remote_ready |
( |
struct virtio_device * |
vdev | ) |
|
Blocking function, waiting for the remote core is ready to start communications.
- Parameters
-
| vdev | Pointer to the virtio device |