> On Monday 10 September 2001 16:48, S. Ancelot wrote:
> > Hi,
> > 1. Is it possible to write a single PCI I/O driver module that can be
> > accessible from user or kernel space ?
>
> Yes, but it's not trivial to do it in a "nice" way.
>
> (The "DPI" I hacked when I used RTL for real time audio replaced the
> kernel driver "API" with calls that automatically detected the calling
> context and used Linux or RTL calls accordingly.)
>
>
> > 2. on the PCI board, I use , I would like to remap I/O pci to have
> > direct memory access from user space programs directly.
> > is it possible and how ?
>
> Nice Linux specific feature: Use "ioperm()" to gain access to the ports
> you need. Then use port instructions (or macros) right in your code, as
> if you were running in kernel space - or under DOS. :-)
Wait.. but how can one do DMA this way? Won't the whole virtual,
swappable, transient nature of user memory basically cause problems when
trying to use DMA? Or am I misunderstanding the question?
>
> Do note that this is *direct* port access! There's no driver or anything
> involved, so you have to be carefull not to run into synchronization
> problems if you share the ports with some kernel driver, or multiple
> threads or processes.
>
> (If you end up in such a scenario, I'd suggest adding some ioctl()s for
> your applications to use instead of direct port access. That's what I do
> for our old ISA card with write-only "control bit" registers that various
> "drivers" need to fiddle with; the driver shadows the registers with
> internal backup variables and an Amiga style "setbits/clearbits"
> interface.)
>
>
> //David Olofson --- Programmer, Reologica Instruments AB
>
> .- M A I A -------------------------------------------------.
> | Multimedia Application Integration Architecture |
> | A Free/Open Source Plugin API for Professional Multimedia |
> `----------------------------> http://www.linuxdj.com/maia -'
> .- David Olofson -------------------------------------------.
> | Audio Hacker - Open Source Advocate - Singer - Songwriter |
> `--------------------------------------> [EMAIL PROTECTED] -'
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
>
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/