Hi.
I'm doing an application where an external chip will use PCIe bus to store data in i.MX6's DDR memory.
What is the best way to reserve a block of RAM, so Linux can't use this space.
My application (running in the i.MX6) will read the data from this reserved memory location and to do some processing.
I'm trying to update my .dtsi file with:
memory {
reg = <0x10000000 0x40000000>;
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
dma_reserved: pciebuffer@4ff00000 {
reg = <0x4ff00000 0x100000>;
};
};
1. How do I see that this is reserved when running linux (I can only see if I add no-map).
2. If I use no-map, will this memory access be cached when the application tries to read from the DDR?
Thanks,
Niklas
Hi @niklasmolin
I am also facing the same problem as you did.
I am unable to see the reserved block of memory using the cat /proc/iomem command but the reserved memory is visible under the /proc/device-tree/reserved-memory.
It would be really helpful if you could add a screenshot of what you are seeing in the reserved-memory file so that I can be sure whether what I am seeing is correct or not.
Also if you have been able to figure out a way to display that reserved-memory using the cat /proc/iomem command then that would be really helpful as well.
Thank you so much. I have been stuck at this problem for days and I was of the opinion that for some reason the memory is not being reserved or I am making some error.
Hi Niklas
please look at linux documentation:
https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
Xilinx Wiki - Linux Reserved Memory
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor.
I followed this before but I can't tell if it takes or not.
I check with cat /proc/iomem
but it doesn't show the reserved area there (if I use no-map) then it shows a gap in
System RAM.
I can see that the reserved-memory shows up in
/proc/device-tree/reserved-memory/
So would this guarantee that the Linux OS won't put anything in that area?
Thanks,
Niklas
Hi Niklas
this may depend on used kernel, suggest to post on kernel mail list
Majordomo Lists at VGER.KERNEL.ORG
Best regards
igor