> > > 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. :-)
?????????? 
Are you sure what means driver ??? A hardware can't be accessed from two
different places, example : what would happen if 2 programs write into
LPT ports at the same time !!! I agree this may work for simple
hardware, but not for intelligent hardware.

I will ask my question another way :
How to write the mmap implementation of a linux driver , to access  I/O
memory of a hardware from user/space for read access ?

> 
> 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.)
OK, but that was ISA board.

Steph

-- [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/

Reply via email to