DMA to Ramdisk area on Zynq RTEMS

Chris Johns chrisj at
Tue Sep 3 01:46:01 UTC 2019

On 3/9/19 12:29 am, Andy James wrote:
> I have created a RAM disk on Zynq RTEMS and I’d like to set up (for the time
> being) a ‘baremetal ‘ type DMA transferTo the ramdisk .
> I have set up the RAM Disk as follows, and have no problem reading or writing to
> it. How do I find the physical address in memory where the
> RAM Disk has been created?  I think I may be better off allocating a static
> memory region for this; my RAMDISK size is 384Mbytes

The way the RAM in a RAM disk is used depends on the file system the RAM has
been formatted with. A file system is an abstraction of the storage being used
and user interfaces like open, read etc do not provide a way to the physical
media by design.

On a zynq I have at hand I have a RAM disk formatted using the RFS file system.
There is a device entry called `/dev/rda` that is the low level device driver
for the RAM disk. I cannot open that device and play with the memory because the
file system and the block driver cache assumes it has full control.

In the case of the RFS a file is not held in a continuous region of RAM, it is
held in blocks based on the block size the disk is formatted with.

If you wish to store data from the PL in a RAM disk you will need to create a
pool of buffers you DMA data into and then you can have a task that wakes on a
DMA completing and writing that the data to the file.


More information about the users mailing list