From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Hardware I/O from Userspace
Date: Thu, 17 Oct 2013 20:39:08 +0200 [thread overview]
Message-ID: <52602ECC.7060800@xenomai.org> (raw)
In-Reply-To: <CAEk6gTC7=6NJVJJTATHApcf8G13bX=68ZOAR4XdEmhiAgf3ZoQ@mail.gmail.com>
On 10/17/2013 04:57 PM, Drasko DRASKOVIC wrote:
> Hi Gilles,
>
> On Wed, Oct 16, 2013 at 7:14 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> On 10/16/2013 06:06 PM, Drasko DRASKOVIC wrote:
>>> Hi all,
>>> I would like to access to various peripheral and CPU regs of my FPGA
>>> from userspace.
>>>
>>> Is mmap of /dev/mem best way to it, or I should do it from kernelspace
>>> via kernel module?
>>
>> Hi,
>>
>> The RTDM kernel module is the recommended way, among other things, it may
>> be used to prevent several applications to access the registers at the
>> same time.
>
> I will most probably have only one application who access these regs.
>
> Is not putting this application into the user-space safer - if it
> breaks it will not block system?
> Did i misunderstand something, or RTDM kernel module is like standard
> kernel module - if it has a bug it can break the whole kernel.
Yes, but having to separate application from driver is a future proof
pattern: the same driver can be used with different applications, and
changing hardware does not break the application, you only have to write
a driver for the new hardware.
--
Gilles.
next prev parent reply other threads:[~2013-10-17 18:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 16:06 [Xenomai] Hardware I/O from Userspace Drasko DRASKOVIC
2013-10-16 17:14 ` Gilles Chanteperdrix
2013-10-17 14:57 ` Drasko DRASKOVIC
2013-10-17 15:00 ` Lennart Sorensen
2013-10-17 15:08 ` Drasko DRASKOVIC
2013-10-17 15:05 ` Drasko DRASKOVIC
2013-10-17 18:39 ` Gilles Chanteperdrix [this message]
2013-10-18 16:30 ` Drasko DRASKOVIC
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=52602ECC.7060800@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=drasko.draskovic@gmail.com \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.