Skip to content

Commit d43f672

Browse files
committed
legacy_apps: zynqmp_r5: introduce rpmsg vdev config space
vdev config space can be used for various rpmsg virtio configurations such as rpmsg tx and rx single buf size. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
1 parent 98cee13 commit d43f672

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

examples/legacy_apps/machine/xlnx/zynqmp_r5/rsc_table.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,23 @@ struct remote_resource_table __resource resources = {
5858

5959
/* Virtio device entry */
6060
.rpmsg_vdev = {
61-
RSC_VDEV, VIRTIO_ID_RPMSG_, 31, RPMSG_VDEV_DFEATURES, 0, 0, 0,
61+
RSC_VDEV, VIRTIO_ID_RPMSG_, 31, RPMSG_VDEV_DFEATURES, 0,
62+
/* vdev config space len */
63+
sizeof(struct rpmsg_virtio_config), 0,
6264
NUM_VRINGS, {0, 0},
6365
},
6466

6567
/* Vring rsc entry - part of vdev rsc entry */
6668
{RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0},
6769
{RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0},
68-
70+
/* vdev config space */
71+
.vdev_config = {
72+
.version = 1,
73+
.size = (uint16_t)sizeof(struct rpmsg_virtio_config)
74+
.h2r_buf_size = 256, /* host to remote, i.e. tx for host */
75+
.r2h_buf_size = 128, /* remote to host, i.e. rx for host */
76+
.split_shpool = false
77+
},
6978
/* trace buffer for logs, accessible via debugfs */
7079
.rsc_trace = {
7180
.type = RSC_TRACE,

examples/legacy_apps/machine/xlnx/zynqmp_r5/rsc_table.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ struct remote_resource_table {
3434
struct fw_rsc_vdev rpmsg_vdev;
3535
struct fw_rsc_vdev_vring rpmsg_vring0;
3636
struct fw_rsc_vdev_vring rpmsg_vring1;
37+
struct rpmsg_virtio_config vdev_config;
3738
struct fw_rsc_trace rsc_trace;
3839
}__attribute__((packed, aligned(0x100)));
3940

0 commit comments

Comments
 (0)