From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Roger Carns <rpcarns@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] rt_io_get_region
Date: Mon, 11 Oct 2010 21:32:40 +0200 [thread overview]
Message-ID: <4CB36658.5000200@domain.hid> (raw)
In-Reply-To: <4CB36627.5040602@domain.hid>
Roger Carns wrote:
>
> On 10/11/2010 3:18 PM, Gilles Chanteperdrix wrote:
>> Roger Carns wrote:
>>> Does rt_io_get_region function be called from user space and does
>>> it return a user space address and if so how is it return? Also
>>> is there doc out there someplace on usage of this function.
>> rt_io_get_region is a user-space mapping of
>> request_mem_regio/request_io_region. As such, yes, it may be called
>> from user-space. And no, it does not return address. What it
>> returns is a cookie that may be passed to rt_io_put_region to free
>> the used memory.
>>
>> In order to map an MMIO region in user-space you should use
>> /dev/mem or use ioperm and inl/outl directly if you want to access
>> an I/O port. What rt_io_get_region does is to allow you to this
>> cleanly with regard to the rest of the system.
>>
> So, I open the /dev/mem and use the fd returned on the mmap call. But
> how do I associate the region defined in the rt_io_get_region with
> that fd?
The offset passed to mmap is the physical address which you want to map.
Please do not forget to CC the maling list.
--
Gilles.
next prev parent reply other threads:[~2010-10-11 19:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 18:11 [Xenomai-help] rt_io_get_region Roger Carns
2010-10-11 19:18 ` Gilles Chanteperdrix
[not found] ` <4CB36627.5040602@domain.hid>
2010-10-11 19:32 ` Gilles Chanteperdrix [this message]
2010-10-11 19:36 ` Roger Carns
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=4CB36658.5000200@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=rpcarns@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.