Subject: Re: Printer port access
To: Jon Lindgren <jlindgren@slk.com>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: port-i386
Date: 01/31/2001 16:39:05
Jon Lindgren <jlindgren@slk.com> writes:

> On Wed, 31 Jan 2001, Jared D. McNeill wrote:
> 
> > You will need to include machine/sysarch.h and machine/pio.h
> > 
> > On i386, first call 'i386_iopl(3);', then you can use inb(port) and
> > outb(port, data). When you're done, call 'i386_iopl(0);'. Don't forget to
> > link the binary against libi386.
> 
> Just curious, but what is the machine independant way to do this?  I've
> seen references to bus_space and such, but never really gotten the gist of
> it.

There isn't a MI way to fiddle with the parallel port like this,
though there is some Alpha support to do a similar gross hack.

I wrote a "bitbang mode" extension to the parallel port driver which
would supply this, but people keep saying I should go look at the
FreeBSD ppbus stuff instead, and I haven't gotten around to that.

        - Nathan