What is the use of memory node for DDR in device tree ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What is the use of memory node for DDR in device tree ?

ソリューションへジャンプ
6,562件の閲覧回数
vijaikumar
Contributor III

Hi All,

         I see the following node in sabresd and other freescale based boards device tree.

memory {

                reg = <0x10000000 0x40000000>;

        };

What is the exact use case of this?

Even if I change or remove it my kernel works fine.

1 解決策
4,503件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

In case you want to overwirte the memory usage passed from u-boot, you can use "linux,usable-memory", such as below case, we reserve some ddr space:

12         memory {

13                 linux,usable-memory = <0x80000000 0x1ff00000>,

14                                 <0xa0000000 0x1ff00000>;

15         };

元の投稿で解決策を見る

5 返答(返信)
4,503件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

It is OK to remove it. The bootloader can pass the total RAM size to the kernel.

Regards,

Fabio Estevam

4,503件の閲覧回数
reyhanehyazdani
Contributor II

Hi Fabio,

I have a question regarding this topic.

I have some boards with same CPU but different memory size. It would be perfect if I have only one device tree for them.

Does the Barebox pass the RAM size to the kernel automatically?I removed memory node from Linux and also Barebox device tree and system is still working. I am not sure this is a correct way?  or maybe would I face a problem later?

P.S: We modified Barebox in a way that reads the memory size from GPIO just at the first step.

Regards,

Reyhaneh Yazdani

0 件の賞賛
4,503件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Reyhaneh ,

Yes, we do the same in some boards like imx6qdl-wandboard. 

You can let the bootloader detect and pass the correct amount of memory to the kernel.

Regards,

Fabio Estevam

4,503件の閲覧回数
reyhanehyazdani
Contributor II

Thanks :smileyhappy:

0 件の賞賛
4,504件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

In case you want to overwirte the memory usage passed from u-boot, you can use "linux,usable-memory", such as below case, we reserve some ddr space:

12         memory {

13                 linux,usable-memory = <0x80000000 0x1ff00000>,

14                                 <0xa0000000 0x1ff00000>;

15         };