kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: kai@kunfoo.org (Kai)
To: kernelnewbies@lists.kernelnewbies.org
Subject: need advice on howto access memory from fpga and cpu
Date: Wed, 30 Oct 2013 09:58:27 +0100	[thread overview]
Message-ID: <20131030085825.GM5630@kunfoo.org> (raw)

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?"

             reply	other threads:[~2013-10-30  8:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  8:58 Kai [this message]
2013-10-30 14:26 ` need advice on howto access memory from fpga and cpu 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131030085825.GM5630@kunfoo.org \
    --to=kai@kunfoo.org \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).