Welcome! Log In Create A New Profile


remoteproc/rpmsg configuration

Posted by ewing3 
remoteproc/rpmsg configuration
July 02, 2015 02:03PM
I'm using a dual core ARM Cortex-A9 board (Zynq 7020 SOC) and I'm trying to get Linux (running on CPU0) to communicate with CPU1 via remoteproc/rpmsg drivers. I have Linux loading an ELF to CPU1 and executing it successfully so far. There is 512 MB of DDR RAM available. Linux has the lower 480MB (0x0 - 0x1DFFFFFF) and CPU1 has the upper 32MB (0x1E000000 - 0x1FFFFFFF). The resource table in the ELF contains these two vring entries:
{ 0x1E400000, 0x1000, VRING_SIZE, 1, 0 }, // transmit ring - VRING_SIZE is 256
{ 0x1E404000, 0x1000, VRING_SIZE, 2, 0 }, // receive ring

When Linux boots, it outputs this in the log:
[   98.363113]  remoteproc0: vdev rsc: vring0: da 1e400000, qsz 256, align 4096
[   98.370218]  remoteproc0: vdev rsc: vring1: da 1e404000, qsz 256, align 4096
It looks like the entries are parsed correctly.

Then later, the vrings are allocated by Linux here:
and outputs this in the log:
[   98.391067]  remoteproc0: vring0: va 9e9e8000 dma 1d69c000 size 3000 idr 0
[   98.404107]  remoteproc0: vring1: va 9e9ec000 dma 1cfa0000 size 3000 idr 1
It looks like vring structures are initialized at virtual addresses 9e9e8000/9e9ec000, but they are mapped to physical addresses 1d69c000/1cfa0000. /proc/vmallocinfo confirms this:
0x9e9e8000-0x9e9ec000   16384 rproc_alloc_vring+0x94/0x1c8 [remoteproc] phys=1d69c000 user
0x9e9ec000-0x9e9f0000   16384 rproc_alloc_vring+0x94/0x1c8 [remoteproc] phys=1cfa0000 user
How does this get reconciled with the only addresses that CPU1 knows about (1e400000/1e404000)? It seems I need to somehow get Linux to allocate the vrings at 1e400000/1e404000 instead of where it is currently allocating at.

Thanks for your help.

Edited 1 time(s). Last edit at 07/02/2015 02:06PM by ewing3.

Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 11 plus 11?