How to define reserved memory in device tree?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to define reserved memory in device tree?

2,810 次查看
trongthinh
Contributor IV

I am using iMX8MQ evk. I found that in file fsl-imx8mq-evk-m4.dts has some declaration for reserved memory that is used for Cortex M4.

reserved-memory {
   #address-cells = <2>;
   #size-cells = <2>;
   ranges;

   m4_reserved: m4@0x80000000 {
         no-map;
         reg = <0 0x80000000 0 0x1000000>;
   };

};

What does reg = <0 0x80000000 0 0x1000000> mean?

标签 (2)
标记 (2)
0 项奖励
回复
2 回复数

2,378 次查看
b36401
NXP Employee
NXP Employee

You do not need to change original files.
You need to go to your build directory in <kernel_source>/arch/arm/boot/dts and find all the dtb sources (.dts and .dtsi).
Here you can place your new .dts file like myfile.dts and make your new .dtb with following commands:

# cd <Kernel_source>
# make myfile.dtb

So you get your dtb file in <kernel_source>/arch/arm/boot/dts/myfile.dtb file

Or you can use the dtc directly:

# cd <Kernel_source>/scripts/dtc
# dtc -I dts -O dtb -o <output_folder>/myfile.dtb ../../arch/arm/boot/dts/myfile.dts

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,378 次查看
trongthinh
Contributor IV

Thank for your hint. My question is "What does reg = <0 0x80000000 0 0x1000000> mean?"

Does it mean reserved-mem is 16MB and begins from address 0x80000000?

0 项奖励
回复