Subject: Re: I/O-mapped I/O on PC clone NetBSD-1.0#6
To: None <pavel@MAILBOX.SLAC.Stanford.EDU>
From: Mike Long <mike.long@analog.com>
List: netbsd-help
Date: 07/10/1995 17:07:55
>Date: Mon, 10 Jul 1995 08:55:20 -0700 (PDT)
>From: Tom Pavel <pavel@MAILBOX.SLAC.Stanford.EDU>
>
>
>>>>>> On Thu, 6 Jul 1995, Mike Long <mike.long@analog.com> writes:
>
>> 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.

>Does anyone have any working code to serve as an example?  I tried
>this, but I keep getting bus errors on the inb()/outb() calls.  [I was
>trying to play with my Sony CDU31.  BTW, has anyone worked on porting
>the FreeBSD or Linux Sony CD drivers?]

I just took another look at /sys/arch/i386/i386/mem.c, so now I have
this question:  Did you open /dev/io read-write or read-only?  From
what I see in the source, you have to open /dev/io for writing in
order for it to do its thing.
-- 
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));