Hello,
I am using the EVM 57xx Board and I want to play around with the CMEM functions, to get the possibility to do IPC between ARM and the DSP1 to share big data like images.
After reading (http://processors.wiki.ti.com/index.php/CMEM_Overview ) even the idea to play around with CMEM is not working as described.
The following is an example of installing the cmem kernel module:
/sbin/insmod cmemk.ko pools=4x30000,2x500000 phys_start=0x0 phys_end=0x3000000
When i try to run this in my Linux shell, it will return this:
root@am57xx-evm:~# /sbin/insmod cmemk.ko pools=4x30000,2x500000 phys_start=0x0 phys_end=0x3000000
insmod: ERROR: could not load module cmemk.ko: No such file or directory
root@am57xx-evm:~#
I found out, that there was already some CMEM stuff running:
root@am57xx-evm:~# cat /proc/cmem
Block 0: Pool 0: 1 bufs size 0xc000000 (0xc000000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0xa0000000
root@am57xx-evm:~#
So to continue playing around, I have tried this:
root@am57xx-evm:~# rmmod cmemk.ko
[96428.911582] cmemk unregistered
root@am57xx-evm:~# /sbin/insmod cmemk.ko pools=4x30000,2x500000 phys_start=0x0 phys_end=0x3000000
insmod: ERROR: could not load module cmemk.ko: No such file or directory
root@am57xx-evm:~# /sbin/insmod /lib/modules/4.1.13-g8dc6617/extra/cmemk.ko pools=4x30000,2x500000 phys_start=0x0 phys_end=0x3000000
[96486.032190] CMEMK module: reference Linux version 4.1.13
[96486.038208] allocated heap buffer 0x40500000 of size 0x100000
[96486.044236] cmemk initialized
root@am57xx-evm:~# cat /proc/cmem
Block 0: Pool 0: 1 bufs size 0xc000000 (0xc000000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0xa0000000
So as you can see, it did not work like I expected. It looks like, that I cannot use new CMEM buffer. There always will be the buffer on 0xa0000000. Does it depend on the am57xx-evm-cmem.dtsi file?
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
cmem_block_mem_0: cmem_block_mem@a0000000 {
reg = <0x0 0xa0000000 0x0 0x0c000000>;
no-map;
status = "okay";
};
cmem_block_mem_1_ocmc3: cmem_block_mem@40500000 {
reg = <0x0 0x40500000 0x0 0x100000>;
no-map;
status = "okay";
};
};
Do I have to change something there?