Subject: Re: I/O-mapped I/O on PC clone NetBSD-1.0#6
To: None <kcousins@awadi.com.AU>
From: Mike Long <mike.long@analog.com>
List: netbsd-help
Date: 07/06/1995 10:29:34
>Date: Thu, 6 Jul 1995 18:28:09 +1000
>From: kcousins@awadi.com.AU (Kevin Cousins)

>I have a small prototype board that reads I/O port 0x360 on a PC
>clone.  I'd like to be able to control this with a simple user process
>---the clone has NetBSD-1.0 on it.  What is the simplest way to write
>data to an I/O port like that without having to resort to a kernel
>hack?

Any process that opens /dev/io can write to any I/O port.  After your
program opens /dev/io, you can use the inb(), &c., functions in
/usr/include/machine/pio.h.

(NB: I have not actually tried this.)
-- 
Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA                assert(*this!=opinionof(Analog));