Subject: Re: I/O maps and user-level device drivers
To: Travis Hassloch <travis@evtech.com>
From: Michael Galassi <nerd@percy.rain.com>
List: tech-kern
Date: 12/08/1995 17:00:31
>I remember reading something in the Intel uprocessor book about tasks
>having a "I/O map" that could allow access to certain areas of I/O space.
>I don't remember how fine a granularity this map had (per-word?) but it
>got me thinking.

>How could one allow (in an aethetically pleasing way) the Unix kernel to
>start a particular process with (or allow it to get) a particular I/O
>privilege map or a fixed virtual-to-physical mapping (to grab memory-mapped
>I/O space)?  Would an a.out field and [e]uid-check be appropriate?

>I _think_ Linux may have some kind of mechanism to this effect, since I
>vaguely recall some kind of way that they allow procs to access video
>memory directly, but I could be wrong.  Unfortunately, I'm so far out
>of the Linux loop I wouldn't know where to start looking.

If performance is not an issue I've toyed with the idea of a
/dev/iospace directory containing one cdev per i/o port.  Permisions
could be controled via the normal UNIX filesystem mechanisms.  The
code would be trivialy simple to produce.

Of course this sort of interface with one syscall per read/write
transaction would be extremely slow and only apropriate for low
volume use.  Still, for things such as prototyping device drivers
in user space, UPS monitoring, house monitoring/controling the
performance might not be much of an issue.

-michael
-- 
Michael Galassi   nerd@percy.rain.com   http://percy.rain.com/~nerd/