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.


_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to