[meta-xilinx] Linux/FreeRTOS AMP vrings

Edward Wingate edwingate8 at gmail.com
Thu Jul 2 10:49:49 PDT 2015


On Wed, Jul 1, 2015 at 4:31 PM, Edward Wingate <edwingate8 at gmail.com> wrote:
> Anybody know where to debug from here, why it seems like the vring
> descriptors are not initialized properly?  Thanks for your help.

>From what I can figure out, the vring entries in the ELF
resource_table are parsed by Linux here:
http://lxr.free-electrons.com/source/drivers/remoteproc/remoteproc_core.c?v=3.14#L248
and output these logs:
[   98.363113]  remoteproc0: vdev rsc: vring0: da 1e400000, qsz 256, align 4096
[   98.370218]  remoteproc0: vdev rsc: vring1: da 1e404000, qsz 256, align 4096
FreeRTOS's RING_TX is at 0x1e400000 and RING_RX right after, so this
looks correct.

Then later, the vrings are allocated by Linux here:
http://lxr.free-electrons.com/source/drivers/remoteproc/remoteproc_core.c?v=3.14#L192
and output these logs:
[   98.391067]  remoteproc0: vring0: va 9e9e8000 dma 1d69c000 size 3000 idr 0
[   98.404107]  remoteproc0: vring1: va 9e9ec000 dma 1cfa0000 size 3000 idr 1

And it does look 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 FreeRTOS
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.



More information about the meta-xilinx mailing list