cancel
Showing results for 
Search instead for 
Did you mean: 

logicanalyser A7-M4 example. DMA memory allocation

ALibe
Associate

Hi

I am working on the A7-M4 big data exchange example included in the next branch:

https://github.com/STMicroelectronics/meta-st-stm32mpu-app-logicanalyser

There is a  la_reserved node that is included in the

reserved-memory node of the stm32mp157c-demo-logic-analyser-mx.dts

la_reserved: buffer@db000000 {

  compatible = "shared-dma-pool";

  reg = ;

  no-map;

 };

https://github.com/STMicroelectronics/meta-st-stm32mpu-app-logicanalyser/blob/thud/mx/STM32MP157C-DK2/demo-logic-analyser/DeviceTree/demo-logic-analyser/kernel/stm32mp157c-demo-logic-analyser-mx.dts

It looks that this memory is used for the m4_dma2 device tree node.

&m4_dma2 {

 memory-region = ;

 status = "okay";

}

It looks that it is to reserve specific dma external memory addresses for the m4, but If i am not wrong the A7 is mapping external dma memory inside the rpmsg_sdb_mmap() function using dma_alloc_writecombine(), so this DMA memory should be allocated from the CMA, then the physical address obtained are sent to the M4 using the function below

/* Send information to remote proc */

 rpmsg_sdb_send_buf_info(_rpmsg_sdb, _buffer);

So, why is the la_reserved node used?

You can see the functions above (rpmsg_sdb_mmap() ,dma_alloc_writecombine() and rpmsg_sdb_send_buf_info()) inside the stm32_rpmsg_db Linux driver.

Thanks

Alberto

1 ACCEPTED SOLUTION

Accepted Solutions
ALibe
Associate

Hi. ST has already confirmed to me la_reserved node is not needed and can be deleted from device tree.

View solution in original post

2 REPLIES 2
ALibe
Associate

Hi. ST has already confirmed to me la_reserved node is not needed and can be deleted from device tree.

Cchen.2
Associate

hi , ALibe

do you try use dma exchange data for A7 to M4

logicanalyser just M4 ---> dma ---> ddr ---> A7

Now i want to try A7 ---> ddr --->dma --->m4