I currently have a OMAPL138 LCDK board and I am trying to get IPC communications working.
System setup on ARM is Linux with 3.14.18 with the patches for remote proc and rpmsg.
On the DSP side I am using CCS 6.1. BIOS 6.42.x IPC 3.36.x XDCtools version 3.30.6.67_core
Using the example MessageQ I have created a project with a custom rsc_table
#define DATA_DA 0xc3000000
#define RPMSG_VRING0_DA 0xc2000000
#define RPMSG_VRING1_DA 0xc2004000
I have also specified shared memory regions for the communication in DSP.cfg
var SR_0 = {
name: "SR_0", space: "data", access: "RWX",
base: 0xC2000000, len: 0x10000,
comment: "SR#0 Memory (64 KB)"
};
var SR0Mem = Program.cpu.memoryMap["SR_0"];
SharedRegion.setEntryMeta(0,
new SharedRegion.Entry({
name: "SR0",
base: SR0Mem.base,
len: SR0Mem.len,
ownerProcId: 0, // host
cacheEnable: false,
isValid: true
})
);
My boot command line:
bootargs=console=ttyS2,115200n8 ip=off root=/dev/ram0 rw rootfstype=ramfs
mem=32M@0xc0000000 mem=64M@0xc4000000 init=/sbin/init rproc_mem=32M@0xC2000000
Initially I was unable to load the DSP code and found this solution on the forums:
It specifies changing out "dma_alloc_coherent" for a "request_mem_region" and "ioremap_nocache"
in the handle_carveout code. I have done this and now can load the code correctly and can it on the DSP.
I am now trying to get MessageQ to communicate. I think the issue is that my VRING DA specifications are being
discarded in the remoteproc_core.c function "rproc_handle_vdev". Later in "rproc_alloc_vring" the function
"dma_alloc_coherent" is called again. *** It does not take any input from our DSP resource table and returns a
DMA address outside of our rproc_mem specification and outside of our resource table specification (see above). Later
that DMA address is returned to the remote proc as the DA.
This is the output of the parsing of the resource table
Jan 1 00:02:18 buildroot kern.debug kernel: ->rproc_parse_vring: vdev rsc: vring0: da c2000000, qsz 256, align 4096
Jan 1 00:02:18 buildroot kern.debug kernel: <-rproc_parse_vring len 256 aling 4096 rvdev c60f9400
Jan 1 00:02:18 buildroot kern.debug kernel: ->rproc_parse_vring: vdev rsc: vring1: da c2004000, qsz 256, align 4096
Jan 1 00:02:18 buildroot kern.debug kernel: <-rproc_parse_vring len 256 aling 4096 rvdev c60f9400
And here is the output of the allocation of one of those vring buffers (with dma_alloc_coherent)
Jan 1 00:02:19 buildroot kern.debug kernel: ->rproc_virtio_find_vqs nvqs 2
Jan 1 00:02:19 buildroot kern.debug kernel: vring1: va c8836000 dma c6080000 size 3000 idr 1
Jan 1 00:02:19 buildroot kern.debug kernel: <-rproc_alloc_vring
Jan 1 00:02:19 buildroot kern.debug kernel: vring1: va c8836000 qsz 256 notifyid 1
Jan 1 00:02:19 buildroot kern.debug kernel: <-rp_find_vq id 1 name [output]
I have tried to specify to Linux where physical memory is in two attempts:
1) In the resource table. This clearly does not work as the code just drops the DA.
2) On the boot command line rproc_mem=.... This does not appear to work either.
How does one tell Linux where our physical memory is?
-Doug