kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* need advice on howto access memory from fpga and cpu
@ 2013-10-30  8:58 Kai
  2013-10-30 14:26 ` Kai
  0 siblings, 1 reply; 7+ messages in thread
From: Kai @ 2013-10-30  8:58 UTC (permalink / raw)
  To: kernelnewbies

Greetings,

I need advice about a programming project I am doing at my university.
The goal basically is to implement a framebuffer in RAM on a Zedboard
SoC (www.zedboard.org).

The problem is, that both the integrated FPGA and "the software" need to
access the framebuffer, e.g. need access to the same memory region. I am
not sure if I have to write a kernel driver for this at all, or if it's
sufficient to do some mmap'ing on /dev/mem from userspace. Also, it
would be really nice if I could reserve some memory (< 1MB), so that
Linux will not touch it, and the framebuffer will always lie@the same
address in RAM. Otherwise I would have to tell the FPGA the addresses.
I don't really need direct memory access from userspace, I just have to
get some images out of the vga port.

So my plan currently is to tell Linux somehow to not touch the first X
bytes of the RAM. Thus the memory region of the framebuffer is already
known. Then I want to implement a kernel driver that's setting up a
character device, say /dev/fb0, to receive frames from userspace.

I already read this[1] post on Stackoverflow, which is going in the
right direction, and started reading "Linux Device Drivers 3rd Edition",
but I would really like to get some comment from the more experienced
programmers, whether there's a better approach to this.

[1] http://stackoverflow.com/questions/647783/direct-memory-access-in-linux
-- 
Gr??e, Kai

"In a world without walls and fences, who needs Windows and Gates?"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-31  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  8:58 need advice on howto access memory from fpga and cpu Kai
2013-10-30 14:26 ` Kai
2013-10-30 14:45   ` srinivas bakki
2013-10-30 16:17     ` Kai
2013-10-30 16:30       ` Valdis.Kletnieks at vt.edu
2013-10-30 18:46       ` srinivas bakki
2013-10-31  9:39         ` Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).