How to reserve portion of RAM in IMX7D and map it to userspace ?

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

How to reserve portion of RAM in IMX7D and map it to userspace ?

2,280 次查看
vijaykumar_prat
Contributor II

Hello all,

In IMX7D Sabre development board, there is 1GB ram available. How can I reserve some portion of ram((I need min 10Mb) and map it into userspace in linux ? I have seen that there is "linux,usable-memory"  property in dts to mention the memory used by linux. Using that may be I can reserve last 10mb, but how can I map and use it in userspace ? Can mmap works in this case also ?

Regards,

Vijay.

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

2,044 次查看
vijaykumar_prat
Contributor II

Thanks Igor, I reserved it using linux,usable-memory property and used mmap into userspace.

0 项奖励
回复

2,151 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Vijay

one can try dts "reserved" property

imx7d.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt 

How can I reserve a block of memory from the Linux kernel? - Unix & Linux Stack Exchange 

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

0 项奖励
回复