AnsweredAssumed Answered

iMX6 Solo Lite, Linux kernel and CMA

Question asked by louisconvert on Mar 28, 2014
Latest reply on Mar 30, 2014 by louisconvert
Branched to a new discussion

Hello,

 

We are facing a problem with Linux Kernel configuration on iMX6 Solo Lite.

We are trying to bring up a custom board with an iMX6 Solo Lite, 128 MB of DDR3, Ethernet, USB... with Linux Kernel 3.10.9

 

The problem we are facing currently is the following :

 

On Freescale iMX6 Solo Lite evaluation board, we are able to have everything working on Linux with the same kernel 3.10.9. However, on our custom board, we can't configure the CMA to work.

2 cases append :

 

  • Either the CONFIG_CMA_SIZE_MB is set at a value >= 128 MB, then the CMA can't success initialisation of the zone (there is not enough RAM), and the kernel is booting without support of DMA/CMA dependent devices (for example Ethernet interface).

 

  • Either the CONFIG_CMA_SIZE_MB is set to a reasonable value (we tried different values from 2 MB to 64 MB) OR the CMA is not activated (which should be possible), then the kernel is not starting anymore. Symptoms are :
    • On the console, we can't see any activity once the kernel is starting (even with early printk option set)
    • With the trace, we can see the kernel is looping in different memory initialisation functions.

 

What we don't understand is :

  • What are the links between CONFIG_CMA_SIZE_MB and the early kernel memory initialisation functions ? It seems only the source file dma-contiguous.c is referring to this parameter, and what we see with the trace seems that no functions from this file is called when the kernel is not starting.
  • Why does the kernel don't start when we don't set CONFIG_CMA ? Looking at the documentation, CONFIG_CMA is optional and not setting it should not introduce any problem.

 

We don't know how to debug this problem. Using the debugger, we have difficulties to follow the code, as the code is compiled with optimisation, and it seems not possible to desactivate optimisation on the kernel.

We have tried similar configuration with the iMX6 Solo Lite evaluation board from Freescale, with same result : desactivating CONFIG_CMA or putting a value lower than 128MB as CONFIG_CMA_SIZE_MB makes the kernel not booting.

 

What is the solution ? We don't need more than 128 MB of DDR3 and we don't want to pay more DD3 than needed on this board. Then we must find a solution to make the kernel boot with DMA activated and "only" 128 MB of DDR3.

 

Any help will be REALLY appreciated !

 

Thanks a lot !

Outcomes