IMX8MP Remote core share memory driver

Good day.
I’m trying to implement inter-core data exchange using a DDR buffer for a large amount of data. I am using a Verdin devkit on IMX8MP. Kernel version 5.15. I have already implemented communication via RPMSG using “/dev/rpmsg_ctrl0”.

Now I want to allocate memory in DDR from CMA space and send the address to the CortexM via the RPMSG message. To do this, I deal with an NXP example for “Low Power Audio Application - AN12195SW”. I took the “rmtcore_shm” driver code from the patches and compiled it in the kernel environment via devshell.

Then I installed the module on the system “rmtcore-shm.ko”

root@verdin-imx8mp-14762892:~# insmod ./rmtcore-shm.ko
[ 235.945223] RMTCORE module started!
root@verdin-imx8mp-14762892:~#

But the new device “/dev/rmtcore_shm” did not appear in the system. And when I try to open it I get an error:

rmtcore_shm_fd = open(RMTCORE_SHM_DEV, O_RDWR);
*******************
"Unable to open device /dev/rmtcore_shm"
*******************

I may need to make changes to the device files. Right now my overlay for RPMSG looks like this:

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/imx8mp-clock.h>

/ {
	compatible = "toradex,verdin-imx8mp";

	rmtcore_shm {
		compatible = "fsl,rmtcore-shm";
		status = "ok";
	};
};

&{/} {
	imx8mp-cm7 {
		compatible = "fsl,imx8mp-cm7";
		clocks = <&clk IMX8MP_CLK_M7_DIV>;
		mbox-names = "tx", "rx", "rxdb";
		mboxes = <&mu 0 1
			  &mu 1 1
			  &mu 3 1>;
		memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>, <&m7_reserved>;
		rsc-da = <0x55000000>;
		syscon = <&src>;
		fsl,startup-delay-ms = <500>;
	};
};

&i2c3 {
	status = "disabled";
};

&pwm4 {
	status = "disabled";
};

&resmem {
	#address-cells = <2>;
	#size-cells = <2>;

	m7_reserved: m7@0x80000000 {
		no-map;
		reg = <0 0x80000000 0 0x1000000>;
	};

	vdev0vring0: vdev0vring0@55000000 {
		no-map;
		reg = <0 0x55000000 0 0x8000>;
	};

	vdev0vring1: vdev0vring1@55008000 {
		no-map;
		reg = <0 0x55008000 0 0x8000>;
	};

	vdevbuffer: vdevbuffer@55400000 {
		compatible = "shared-dma-pool";
		no-map;
		reg = <0 0x55400000 0 0x100000>;
	};

	rsc_table: rsc_table@550ff000 {
		no-map;
		reg = <0 0x550ff000 0 0x1000>;
	};
};

&sai3 {
	status = "disabled";
};

&sdma3 {
	status = "disabled";
};

&mu {
	status = "okay";
};

&uart4 {
	status = "disabled";
};

Can you please tell me what changes need to be made so that /dev/rmtcore_shm appears in the system and I can get access to memory allocation in DDR? If someone has already come across this solution and an example.

Thanks in advance for any help.

Hi @Stan88,

For the Cortex-M, we do not test all examples from NXP, usually, we only test basic functionally. Unfortunately, we don’t have any examples to help you in this case. I would recommend you ask https://community.nxp.com/ directly for more information about how it works.

Best Regards,
Hiago.