cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
254 Views
Registered: ‎04-29-2020

Question about DDR space not used in Linux

Hi

Developed with Avnet's Ultra96 V2 board.
I am very sorry for the basic question.

In Address Map for processor psu_cortexa53_[0-3] in system.hdf, "MEM_0" is mapped as 0x00000000-0x7fefffff.
When I actually do "cat /proc/iomem" on the Ultra96 V2 board, the result is as follows.
------------------------------------
00000000-3ecfffff : System RAM
00080000-00daffff : Kernel code
00e30000-01129fff : Kernel data
3ed00000-3ed3ffff : 3ed00000.ddr
3fd00000-7fefffff : System RAM
------------------------------------
I want to use DDR for data exchange between PS.
In this case, is it good to use "3ed00000-3ed3ffff" address space?

 

Tags (1)
0 Kudos
2 Replies
Highlighted
220 Views
Registered: ‎04-20-2017

I fear its not that easy. If you write memory from PS side you never know what Linux has on those addresses most likely crashing or corrupting your system.

The easiest way (but least performing) is to exclude some memory from your Linux in your device tree and use those hardware addresses zu exchange. Linux does not manage the memory then but you still can map it with mmap. But it can not be cached and access is roughly 10-50x slower than memory that is managed by Linux.

If you need more performance, look at udmabuf project on github. There continuous memory allocation is used to allocate hw memory from kernel that you can use in Pl and PS. Just be careful though, that you should acp port then, if you use hp port you have to manually manage caching

 

0 Kudos
Teacher
Teacher
139 Views
Registered: ‎06-16-2013

Hi @ysato 

 

If your question was how to reserve dram memory, you should describe cma parameter in dtb.

You can reserve dram memory in kernel and your design on PL can access reserved memory.

 

Best regards,

0 Kudos