This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCI6630K2L: Trouble using the PKTDMA on the TCI6630K2L with virtual addressing

Part Number: TCI6630K2L

Hi,

In relation to this thread, That was unanswered

Problem Topic is also in quotations below.

I am actually now only interested in the ARM side of the problem, as I am trying to use the Ethernet module with virtual addresses for the descriptors, but the solution to the problem would still be applicable.

"I am trying to achieve (using bare-metal programming) Infrastructure PKTDMA transfers between an ARM core and a DSP on my EVMK2L board.

I can achieve this when I have my descriptors and buffers on the ARM side stored in shared memory (and using physical addresses) and my descriptors and buffers on the DSP side stored in L2 SRAM (again using physical addresses).

I would like to store the ARM side descriptors and buffers in DDR with the application code, but my ARM application is running in an RTOS that is using the ARM MMU and virtual addressing, and if try this then the PKTDMA transfers no longer happen.

Is it possible for me to perform Infrastructure PKTDMA transfers between ARM (using virtual addressing) and DSP (using physical addressing)?

If so, how do I ensure the QMSS and PKTDMA handles the virtual addresses correctly? I did read something about the using the MPAX units inside the MSMC controller - but I don't really understand how it all works!"

  • Hello Customer,

    For your question, I am trying to get confirmation from design team and will reply you soon.

    best regards,
    David Zhou
  • Hello,

    What software are you running on ARM core? Is it from TI? For OS, it is TI RTOS kernel?

    In order to use pktdma or any dma, all the pointers need to be allocated from a contiguous allocator such as cmem. These allocators have a mechanism to convert phys2virt and virt2phys. If you are using our LLD, this is implementation of Osal_qmssPhyToVirt() and Osal_qmssPhyToVirt(). Your software needs to populate these to successfully convert between physical and virtual addresses based on the memory allocator you are using.

    best regards,
    David Zhou
  • Hi David,

    We are using bare metal drivers, entirely written by ourselves, so there is no TI code involved.

    We have a working Ethernet driver, but it does not work if the Ethernet descriptors are setup using virtual memory addresses. I assume this is because I need to program the PKTDMA and QMSS so that it can understand virtual addresses, but I don't know how to do this.

    Regards,
    Jon
  • Jon,

    You must use contiguous memory, arbitrary virtual memory will not work.

    I would suggest you take a look at TI's Processor SDK RTOS code, especially the OSAL (OS abstraction layer).
    software-dl.ti.com/.../index_FDS.html

    best regards,
    David Zhou