From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: ramon costa <ramoncostacastello@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] using floating point in rtdm
Date: Thu, 19 Aug 2010 14:30:06 +0200 [thread overview]
Message-ID: <4C6D23CE.1000606@domain.hid> (raw)
In-Reply-To: <AANLkTinCCejWZQhGOQd=CZ+yq482x0z4VCB5we+1mX9H@mail.gmail.com>
ramon costa wrote:
> Hi
>
> There are some differences with RTLinuxfree which are making things
> difficult ... .
>
> One last question (offtopic ?¿)....
>
> In user space I can use outb commands (using ioperm). For example :
>
>
> #define PORT_PARALLEL 0x378
> outb(valor,PORT_PARALLEL);
>
> This can easily done for fixed addresses like the Parallel PORT. Although it
> is not nice
> it is working fine (and it very useful during the porting process )
>
>
>
> This is more difficult for PCI devices which address is not fixed. In the
> kernel space (RTDM) I could use "pci_find_device" commands to obtain the
> base device base address.
>
> Once this is done I could do something like:
>
> outw(yint,PCI_BASE_ADRESS_1711 + PCI171x_DA0);
>
> If I Know the device base address (PCI_BASE_ADRESS_1711), this commands
> would also work
> in the user space ?
Well probably. Addresses such as PCI_BASE_ADDRESS_1711 live in a
separate address space, only accessible with outb/inb, etc... Accessing
I/O mapped PCI registers is another story. One way to access them is to
use libpci (package pciutils) to obtain their physical address, then
mmap it using /dev/mem.
>
> How can I obtain the base address in the user space ?
>
> (As this is temporary, could I obtain the address in kernel space by a
> simple program and
> use it in the user space ?)
PCI_BASE_ADDRESS_1771 looks like a macro to me, so surely, it may be
used in user-space without "passing it".
The design we encourage to use is the same as for regular Linux
applications and drivers: driver code in kernel-space using the RTDM
skin, application code in user-space using the native or posix skin
(posix is most probably what you are looking for).
--
Gilles.
next prev parent reply other threads:[~2010-08-19 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 9:00 [Xenomai-help] using floating point in rtdm ramon costa
2010-08-19 9:13 ` Gilles Chanteperdrix
2010-08-19 9:27 ` ramon costa
2010-08-19 9:31 ` Gilles Chanteperdrix
2010-08-19 9:45 ` Gilles Chanteperdrix
[not found] ` <AANLkTinCCejWZQhGOQd=CZ+yq482x0z4VCB5we+1mX9H@mail.gmail.com>
2010-08-19 12:30 ` Gilles Chanteperdrix [this message]
[not found] <mailman.53.1282212027.5136.xenomai@xenomai.org>
2010-08-19 21:00 ` Bob Feretich
2010-08-19 23:39 ` Gilles Chanteperdrix
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=4C6D23CE.1000606@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=ramoncostacastello@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.