Subject: Re: /dev/io - what, why and how? :)
To: None <mike.long@analog.com>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: port-i386
Date: 05/22/1996 19:34:49
>>>>> "Mike" == Mike Long <mike.long@analog.com> writes:

Mike> First: AFAIK, use of /dev/io is discouraged; you should use the
Mike> functions (e.g. ioperm()) in libi386.a instead.

Yep.  See i386_set_ioperm() and i386_iopl().

Mike> /dev/io is similar to /dev/mem, except that it accesses the x86 I/O
Mike> space instead of memory.  To use /dev/io, use something like:

Bzzt!  incorrect.

If you can open /dev/io, your process is granted IOPL access to all I/O
ports.  All you need to do then is execute an inb/inw/inl or
outb/outw/outl instruction and it goes out to the bus.

read/write to/from /dev/io is meaningless and yields ENXIO.

==John