From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Guenter Ebermann <guenter.ebermann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] migration scenario to xenomai
Date: Sat, 07 Aug 2010 09:46:08 +0200 [thread overview]
Message-ID: <4C5D0F40.1070104@domain.hid> (raw)
In-Reply-To: <AANLkTi=yDXty82va8JGzmRA453e021EvomyYitaQTCTg@domain.hid>
Guenter Ebermann wrote:
> Hi,
>
> At the moment I am thinking about a possible migration of a automotive bus
> measuring/simulation application and some drivers from eCos to Linux/Xenomai.
> The move is primarily motivated by the huge software and device driver support
> under linux.
>
> However some device drivers which interfaces our custom devices in FPGA must be
> ported to linux or xenomai user-space or xenomai-rtdm.
>
> But I dont want to write device drivers in kernel-space, because this would
> involve some serious restructuring of our current drivers and software
> structure and a possible performance penalty because of unneeded data copying.
> It is also harder to debug a kernel-driver. In eCos there is no
> user/kernel space
> seperation and our custom device drivers access the registers based in FPGA
> directly. The interface of these drivers to the application is not via a device
> file but over direct function invocation.
>
> So I thought of moving this part of our communication stack which has hard-real
> time requirement (FlexRay, CAN, LIN) into a seperate process which only lives
> in the xenomai domain (it will communicate with low-prio linux processes via
> non-blocking fifo or such). But this raises two important questions: Can I
> access the FPGA registers directly from a xenomai task in the user space? Or
> do I have to write a minimal linux or xenomai-rtdm device driver which maps
> FPGA registers from kernel to user space?
You can access hardware registers in user-space by mmaping the memory
mapped ones with /dev/mem, or using iopl/ioperm and in[lwb]/out[lwb] for
the old x86 I/O registers.
However, if this can help for a first order port to Xenomai,
implementing an RTDM driver later is better on the long run. By limiting
the interface between the application and low-level code to a well
defined interface, it will make it possible to use different
applications with the same drivers, or use different hardware with the
same application at will, things that are often hard when the low-level
code is mixed with the application code.
And you could even get the drivers you develop merged into Xenomai, if
you are willing to publish them.
--
Gilles.
next prev parent reply other threads:[~2010-08-07 7:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 21:42 [Xenomai-help] migration scenario to xenomai Guenter Ebermann
2010-08-06 21:51 ` Thomas Lockhart
2010-08-07 9:28 ` Guenter Ebermann
2010-08-07 23:17 ` Wolfgang Denk
2010-08-07 7:46 ` Gilles Chanteperdrix [this message]
2010-08-07 10:13 ` Guenter Ebermann
2010-08-07 10:36 ` Gilles Chanteperdrix
[not found] ` <B6A5952D-4182-4D39-B28E-0D9BAE2872C4@domain.hid>
2010-08-07 11:02 ` Gilles Chanteperdrix
2010-08-07 11:36 ` Philippe Gerum
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=4C5D0F40.1070104@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=guenter.ebermann@domain.hid \
--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.