[meta-xilinx] Linux/FreeRTOS AMP vrings

Edward Wingate edwingate8 at gmail.com
Sun Aug 30 15:45:43 PDT 2015


On Sun, Aug 30, 2015 at 10:29 AM, Wendy Liang <wendy.liang at xilinx.com> wrote:
> The change in the virtio_rpmsg_bus is due to ZynqMP. It may not be good to just upgrade the
> kernel. It would be better to figure out if the kernel put the wrong addr or the slave get it wrong.
>
> You can add some debug in virtqueue_add() in virtio_ring.c to see what addr kernel put to the
> virt_ring. And you should also add debug before the slave do the VRING_ADDR_MASK to see
> what it gets.

I did do this and that's how I was able to figure out what was
happening so far. It is the Linux kernel that is putting the
0x1f440xxx physical addresses into the vring descriptors.  FreeRTOS on
CPU1 is just reading what Linux placed there.  (CPU1 is using just
physical addresses, no virtual mapping, so no conversion needs to take
place on CPU1.  I just subtract 0x01000000 as a work-around for now.)

So even though 0x9f00000 is mapped to physical address 0x1e000000 for
32MB, when Linux wants the vring buffers at virtual address
0x9f440xxx, it is putting physical address 0x1f440xxx into the vring,
instead of the correct 0x1e440xxx.  But later, when it reads the
buffer, it is using 0x1e440xxx.

I tried to follow how Linux does the virtual-to-physical and
physical-to-virtual conversions, but I had had a hard time following
all the different layers of macros that are involved.



More information about the meta-xilinx mailing list