|
| void | rpmsg_virtio_init_shm_pool (struct rpmsg_virtio_shm_pool *shpool, void *shb, size_t size) |
| | Initialize default shared buffers pool. More...
|
| |
| static void | rpmsg_virtio_return_buffer (struct rpmsg_virtio_device *rvdev, void *buffer, uint32_t len, uint16_t idx) |
| |
| static int | rpmsg_virtio_enqueue_buffer (struct rpmsg_virtio_device *rvdev, void *buffer, uint32_t len, uint16_t idx) |
| |
| static void * | rpmsg_virtio_get_tx_buffer (struct rpmsg_virtio_device *rvdev, uint32_t *len, uint16_t *idx) |
| |
| static void * | rpmsg_virtio_get_rx_buffer (struct rpmsg_virtio_device *rvdev, uint32_t *len, uint16_t *idx) |
| |
| static int | rpmsg_virtio_wait_remote_ready (struct rpmsg_virtio_device *rvdev) |
| |
| static bool | rpmsg_virtio_buf_held_dec_test (struct rpmsg_hdr *rp_hdr) |
| |
| static void | rpmsg_virtio_hold_rx_buffer (struct rpmsg_device *rdev, void *rxbuf) |
| |
| static bool | rpmsg_virtio_release_rx_buffer_nolock (struct rpmsg_virtio_device *rvdev, struct rpmsg_hdr *rp_hdr) |
| |
| static void | rpmsg_virtio_release_rx_buffer (struct rpmsg_device *rdev, void *rxbuf) |
| |
| static int | rpmsg_virtio_notify_wait (struct rpmsg_virtio_device *rvdev, struct virtqueue *vq) |
| |
| static void * | rpmsg_virtio_get_tx_payload_buffer (struct rpmsg_device *rdev, uint32_t *len, int wait) |
| |
| static int | rpmsg_virtio_send_offchannel_nocopy (struct rpmsg_device *rdev, uint32_t src, uint32_t dst, const void *data, int len) |
| |
| static int | rpmsg_virtio_release_tx_buffer (struct rpmsg_device *rdev, void *txbuf) |
| |
| static int | rpmsg_virtio_send_offchannel_raw (struct rpmsg_device *rdev, uint32_t src, uint32_t dst, const void *data, int len, int wait) |
| |
| static void | rpmsg_virtio_tx_callback (struct virtqueue *vq) |
| |
| static void | rpmsg_virtio_rx_callback (struct virtqueue *vq) |
| |
| static int | rpmsg_virtio_ns_callback (struct rpmsg_endpoint *ept, void *data, size_t len, uint32_t src, void *priv) |
| |
| int | rpmsg_virtio_get_tx_buffer_size (struct rpmsg_device *rdev) |
| | Get rpmsg virtio buffer size. More...
|
| |
| int | rpmsg_virtio_get_rx_buffer_size (struct rpmsg_device *rdev) |
| | Get rpmsg virtio Rx buffer size. More...
|
| |
| int | rpmsg_init_vdev (struct rpmsg_virtio_device *rvdev, struct virtio_device *vdev, rpmsg_ns_bind_cb ns_bind_cb, struct metal_io_region *shm_io, struct rpmsg_virtio_shm_pool *shpool) |
| | Initialize rpmsg virtio device. More...
|
| |
| int | rpmsg_init_vdev_with_config (struct rpmsg_virtio_device *rvdev, struct virtio_device *vdev, rpmsg_ns_bind_cb ns_bind_cb, struct metal_io_region *shm_io, struct rpmsg_virtio_shm_pool *shpool, const struct rpmsg_virtio_config *config) |
| | Initialize rpmsg virtio device with config. More...
|
| |
| void | rpmsg_deinit_vdev (struct rpmsg_virtio_device *rvdev) |
| | Deinitialize rpmsg virtio device. More...
|
| |
Initialize rpmsg virtio device.
Host side: Initialize RPMsg virtio queues and shared buffers, the address of shm can be ANY. In this case, function will get shared memory from system shared memory pools. If the vdev has the RPMsg name service feature, this API will create a name service endpoint.
Remote side: This API will not return until the driver ready is set by the host side.
- Parameters
-
| rvdev | Pointer to the rpmsg virtio device |
| vdev | Pointer to the virtio device |
| ns_bind_cb | Callback handler for name service announcement without local endpoints waiting to bind. |
| shm_io | Pointer to the share memory I/O region. |
| shpool | Pointer to shared memory pool. rpmsg_virtio_init_shm_pool has to be called first to fill this structure. |
- Returns
- Status of function execution
Initialize rpmsg virtio device with config.
Host side: Initialize RPMsg virtio queues and shared buffers, the address of shm can be ANY. In this case, function will get shared memory from system shared memory pools. If the vdev has the RPMsg name service feature, this API will create a name service endpoint. Sizes of virtio data buffers used by the initialized RPMsg instance are set to values read from the passed configuration structure.
Remote side: This API will not return until the driver ready is set by the host side. Sizes of virtio data buffers are set by the host side. Values passed in the configuration structure have no effect.
- Parameters
-
| rvdev | Pointer to the rpmsg virtio device |
| vdev | Pointer to the virtio device |
| ns_bind_cb | Callback handler for name service announcement without local endpoints waiting to bind. |
| shm_io | Pointer to the share memory I/O region. |
| shpool | Pointer to shared memory pool array. If the config->split_shpool is turn on, the array will contain two elements, the shpool of txshpool and rxshpool, Otherwise, the array has only one element, and txshpool rxshpool shares a shpool. And rpmsg_virtio_init_shm_pool has to be called first to fill each shpool in this array. |
| config | Pointer to configuration structure |
- Returns
- Status of function execution