I am trying to write data to specific physical ram addresses from within the Linux OS and read that data from the FPGA. I am currently working on writing/reading to/from ram from the HPS. I am using /dev/mem along with mmap() to write and read the data from the HPS, but I ran into segmentation faults when trying to write ~80Mb or writing certain locations in memory. Depending on where the offset is; the OS crashes...I think I might be writing to another process's memory or the OS memory.
Can I find out what portions or addresses of ram are safe to write to? Also, if I make a tempfs or ramfs, is it possible to write to a physical location from by accessing them from mmap() or would I only be dealing with virtual addresses?
Is there a better method for writing to a physical address? Once written I need to pass the address to the FPGA so it can read from that location.
(Just a note, I am a noobie in this field. I have never worked with Linux before except as a user.)