STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
← STM32duino documentation
Loading...
Searching...
No Matches
virtio_config.h File Reference

Configuration of the OpenAMP rpmsg buffers and of the trace (log) buffer. More...

Macros

#define RPMSG_BUFFER_SIZE   (512)
 Size of buffer of each vring buffers.
 
#define RPMSG_VRING_HEADER_SIZE   (16)
 Size of header of a vqueue message.
 
#define RPMSG_VRING_PAYLOAD_SIZE   (RPMSG_BUFFER_SIZE - RPMSG_VRING_HEADER_SIZE)
 Available size of payload of a vqueue message.
 
#define VRING_NUM_BUFFS   (16)
 Number of rpmsg buffers.
 
#define RPMSG_VRING_TOTAL_PAYLOAD_SIZE   (RPMSG_VRING_PAYLOAD_SIZE * VRING_NUM_BUFFS)
 Total payload size of all the vqueue message buffers.
 

Detailed Description

Configuration of the OpenAMP rpmsg buffers and of the trace (log) buffer.

Macro Definition Documentation

◆ RPMSG_BUFFER_SIZE

#define RPMSG_BUFFER_SIZE   (512)

Size of buffer of each vring buffers.

Note
If the host processor is Linux, RPMSG_BUFFER_SIZE must be aligned with the kernel definition. Reference: https://elixir.bootlin.com/linux/v5.5.2/source/drivers/rpmsg/virtio_rpmsg_bus.c#L137

◆ VRING_NUM_BUFFS

#define VRING_NUM_BUFFS   (16)

Number of rpmsg buffers.

This means that a single call of rproc_virtio_notified(rvdev.vdev, VRING1_ID) will trigger VirtIOSerial::rxCallback() VRING_NUM_BUFFS times at maximum. A buffer handles VirtIOSerial::rxCallback() requires to be (RPMSG_VRING_PAYLOAD_SIZE * VRING_NUM_BUFFS) at minimum to prevent overflow.