[meta-xilinx] Linux/FreeRTOS AMP vrings

Edward Wingate edwingate8 at gmail.com
Thu Aug 27 16:57:18 PDT 2015


On Thu, Aug 27, 2015 at 3:46 PM, Wendy Liang <wendy.liang at xilinx.com> wrote:
>
> Linux is the rpmsg master, it will allocate the buffers for tx/rx, CPU1 should use the buffers allocated from Linux.

Agreed.  For me, Linux is allocating buffers at physical addresses
0x1f440xxx.  That's the only information CPU1 has about the vring
buffers, so it can't do anything but use the given buffers. But then
Linux, who gave CPU1 those addresses in the first place, wants to read
from 0x1e440xxx instead when kicked.

> " VRING_ADDR_MASK" is supposed to convert virtual <-> physical addr before send/receive.
> Addr in the vring0 needs to be physical address understood by the other side.

These two statements seem contradictory. If addr in vring0 needs to be
physical address understood by CPU1, then why is virtual to physical
conversion needed?  But regardless, how would you go about determining
exactly what conversion needs to take place?

> From what you described, it looks like the assumption doesn't work in your case.

Yes, I'd really like to get to bottom of why this doesn't work in my
case.  Linux is obviously writing a physical, not virtual, address to
the vring descriptors.  But it's not the address it will be reading
from.

> You can update the virtual <-> physical conversion method.

I went ahead and subtracted 0x01000000 from the (already physical)
vring buffer address allocated by Linux and Linux is now able to
receive data from CPU1.

But I'm really thrown for a loop why Linux gives one address to write,
but reads from another.

> The ug978 is an example of AMP 2 years ago, you can try to OpenAMP: https://github.com/OpenAMP/open-amp

For better or for worse, I am using Yocto workflow and don't see a
simple transition to using OpenAMP from Yocto.  I can't switch to
Petalinux or Mentor toolchain as documented in OpenAMP.  But I glanced
through the documents and other than different/more examples, don't
see what OpenAMP provides that's different from what I'm trying to do
now.  OpenAMP is also just using remoteproc and rpmsg in pretty much
the same manner.

>
> Best Regards,
> Wendy
>

Thank you, Wendy, for your response.



More information about the meta-xilinx mailing list