AnsweredAssumed Answered

IMX6D, Linux kernel memory setup

Question asked by Egor Rumjantsev on Aug 22, 2019
Latest reply on Aug 29, 2019 by Egor Rumjantsev


We develop custom board based on IMX6D + 2 LPDDR2 chips. Design based on Sabre board.

I bring up U-Boot from Freescale's Yocto BSP and looks like memory chips is working fine.

Next step was porting kernel to our board. But in that step i stuck on memory init during booting kernel.

I wrote my version of Device Tree files for our board and described memory as:


 memory {
                linux,usable-memory = <0x80000000 0x20000000>,
                                              <0x10000000 0x20000000>;


But looks like kernel see only 1 chip ( base 0x80000000 - mem controller 0 ) and skip second chip (0x10000000 - mem controller 1).

 The problem is the following:

During boot process i can see

Ignoring memory block 0x10000000 - 0x30000000 message, so second chip with address 0x10000000 is skipped. I started to debug init process to see how to fix this problem.

So looks like 0x10000000 is less than 0x80000000 and kernel thinks that the lowest address of memory 0x80000000, so it ignore second memory chip:

early_init_dt_add_memory_arch(): PHYS_OFFSET: 0x80000000
early_init_dt_add_memory_arch(): PHYS_OFFSET: 0x80000000


previously i could set lower address in memory using defines, but now in kernel version 4.1.52 from Freescale's repo looks like this value is dynamic and runtime calculated.

Could some one advise how correctly describe memory chips. May be i have to set some of setting in U-Boot in ATAG's array?