Hi Biyong
i am working on multiple endpoint RPMSG, i was able to modify the shared memory and use DDR.
but if I change/increase the "RPMSG_BUF_SIZE" multiple endpoint wont work, channel wont get created by installing the module.
insmod /lib/modules/3.14.28-1.0.0_ga+g91cf351/kernel/drivers/rpmsg/rpmsg_multiept.ko
i have attached source file for rpmsg_multiept.ko
below please find the my code of imx_rpmsg.c
+ * For now, allocate 256 buffers of 512 bytes for each side. each buffer
+ * will then have 16B for the msg header and 496B for the payload.
+ * This will require a total space of 256KB for the buffers themselves, and
+ * 3 pages for every vring (the size of the vring depends on the number of
+ * buffers it supports).
+ */
+#define RPMSG_NUM_BUFS (1024)
+#define RPMSG_BUF_SIZE (512)
+#define RPMSG_BUFS_SPACE (RPMSG_NUM_BUFS * RPMSG_BUF_SIZE)
+
+
+
.........
...........
MODULE_DEVICE_TABLE(of, imx_rpmsg_dt_ids);
+
+static int imx_rpmsg_probe(struct platform_device *pdev)
+{
+ int i, ret = 0;
+ struct device_node *np = pdev->dev.of_node;
+
+ for (i = 0; i < ARRAY_SIZE(imx_rpmsg_vprocs); i++) {
+ struct imx_rpmsg_vproc *rpdev = &imx_rpmsg_vprocs[i];
+
+ if (!strcmp(rpdev->rproc_name, "m4")) {
+ ret = of_device_is_compatible(np, "fsl,imx7d-rpmsg");
+ ret |= of_device_is_compatible(np, "fsl,imx6sx-rpmsg");
+ if (ret) {
+ /* hardcodes here now. */
+ rpdev->vring[0] = 0xBF800000;
+ rpdev->vring[1] = 0xBF880000;
+ }
+ } else {
+ break;
+ }
+
+ pr_debug("%s rpdev%d: vring0 0x%x, vring1 0x%x\n", __func__,
+ i, rpdev->vring[0], rpdev->vring[1]);
if i change RPMSG_NUM_BUFS back to (512), channel gets created.
am i doing calculation wrong.
how to calculate vring address.