cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Advisor
Advisor
123 Views
Registered: ‎10-10-2014

how can I allocate and share a DDR4 memory buffer between Linux running on the PS and an AXI master controller in the PL ?

I want to build a custom IP with AXI master interface that reads a LUT from DDR4 memory. The LUT is initialized and/or updated from a linux application that runs on the A53 ARM cores.

I know how to build the custom IP. In a bare metal application, I know how to allocate a buffer at a fixed address (using linker file etc).

But I'm not sure how to allocate and share a part of the DDR4 memory  (in a safe way) with my IP in the PL when I'm running linux on the A53 ARM cores ... how do you allocate a fixed, contiguous buffer in DDR4 in Linux, how does the PL know the base address, ... is this accomplished through the device tree, or ? 

Is there any example that shows how to do this?

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Reply
Highlighted
Mentor
Mentor
111 Views
Registered: ‎06-16-2013

Re: how can I allocate and share a DDR4 memory buffer between Linux running on the PS and an AXI master controller in the PL ?

Hi @ronnywebers 

 

Would you describe reserved memory in dts and use cma ?

 

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

 

Best regards,

0 Kudos