* [Xenomai-help] rt_io_get_region @ 2010-10-11 18:11 Roger Carns 2010-10-11 19:18 ` Gilles Chanteperdrix 0 siblings, 1 reply; 4+ messages in thread From: Roger Carns @ 2010-10-11 18:11 UTC (permalink / raw) To: xenomai [-- Attachment #1: Type: text/plain, Size: 359 bytes --] 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. -- *Roger Carns* TSS Engineering 321-722-0082 x222 (w) rpcarns@domain.hid _www.tssleft.com <http://www.tssleft.com/>_ _We Move Projects Left. You Feel Better. [-- Attachment #2: Type: text/html, Size: 1611 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] rt_io_get_region 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> 0 siblings, 1 reply; 4+ messages in thread From: Gilles Chanteperdrix @ 2010-10-11 19:18 UTC (permalink / raw) To: Roger Carns; +Cc: xenomai 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. -- Gilles. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <4CB36627.5040602@domain.hid>]
* Re: [Xenomai-help] rt_io_get_region [not found] ` <4CB36627.5040602@domain.hid> @ 2010-10-11 19:32 ` Gilles Chanteperdrix 2010-10-11 19:36 ` Roger Carns 0 siblings, 1 reply; 4+ messages in thread From: Gilles Chanteperdrix @ 2010-10-11 19:32 UTC (permalink / raw) To: Roger Carns; +Cc: Xenomai help 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] rt_io_get_region 2010-10-11 19:32 ` Gilles Chanteperdrix @ 2010-10-11 19:36 ` Roger Carns 0 siblings, 0 replies; 4+ messages in thread From: Roger Carns @ 2010-10-11 19:36 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: Xenomai help [-- Attachment #1: Type: text/plain, Size: 1408 bytes --] On 10/11/2010 3:32 PM, Gilles Chanteperdrix wrote: > 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. > > great that was what I was going try first...thanks for your help -- *Roger Carns* TSS Engineering 321-722-0082 x222 (w) rpcarns@domain.hid _www.tssleft.com <http://www.tssleft.com/>_ _We Move Projects Left. You Feel Better. [-- Attachment #2: Type: text/html, Size: 3033 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-11 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-10-11 19:36 ` Roger Carns
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.