PRU Remoteproc Carveout Access from Userspace

72 views
Skip to first unread message

Bill M

unread,
Mar 31, 2019, 6:44:27 PM3/31/19
to BeagleBoard
Greetings All,

TLDR; what is the best way to access PRU remoteproc carveouts from userspace?

I have a (working) project for reading an 8-bit parallel interface camera that I originally wrote using UIOPRUSS. I decided to take the plunge and work through the remoteproc documentation to see if I could move to that. I didn't want to use rpmsg, because I doubted it could handle the data velocity (320 x 240 x 24bit color x 15 frames per second = 3,456,000, roughly 3MB a second). I discovered carveouts in the resource table headers, and thought this was excellent since it was much like how I was already doing it with UIOPRUSS. It works and simplifies the code greatly, but I have to use debugfs to get the carveout location to mmap to, which seems less than ideal. What is the best way to expose the carveout to userspace? Any suggestions appreciated.

Thanks!

kaigeis...@googlemail.com

unread,
Jul 9, 2019, 8:10:24 PM7/9/19
to BeagleBoard
Hi Bill,

I just did something very similar. If you have a working communication channel between PRU and user space anyway (probably RPMsg), you could read the location from the PRU code using:

myvar = resourceTable.shared_mem.pa;

and communicate that address to user space using RPMsg.

If you're anyway writing a Linux kernel driver, you could also extract the address from the remoteproc driver and expose it, for example, through sysfs, but I don't have a working solution for that.

Cheers,
Kai

Bill M

unread,
Jul 10, 2019, 6:40:43 PM7/10/19
to BeagleBoard
Hallo Kai,

Thanks for the suggestion. I considered doing something like that, and am still weighing my options. I have competing interests of wanting to make this usable for anyone who might be able to, wanting to keep it as simple as possible for myself, wanting to do things the most 'correct' way, and also wanting to explore and learn more, since I don't have a lot of experience with Linux in general or kernel programming in particular. I will probably continue to post here as my exploration proceeds. I hope I don't pollute people's inbox too much!

Vielen dank,
Bill
Reply all
Reply to author
Forward
0 new messages