Subject: Re: WD8013 died (SMC howto fix)
To: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
From: Phil Knaack <flipk@ncremp.ag.iastate.edu>
List: port-i386
Date: 03/17/1996 12:20:00
>Re: using inb() and outb(), from user-land, there are two things to know:

>	(2) to enable access to the i386 I/O ports, you need to use
>	    the i386_iopl() function, which is documented (rather
>	    sparsely) by the i386_iopl(2) manual page.

	I use a little toy that a lot of linux people play with once in a
while. It is a set of LED's that are plugged into the outputs on the parallel
port. You can then write a set of userland programs that play with these
lights and do little blinky things.

	All you had to do to outb() to the lpt port is 

		(1) #include <machine/pio.h>
		(2) open("/dev/io", O_RDWR)   (have to be root of course)
		(3) outb(0x3bc, VALUE)

	I never had to mess with i386_iopl.

	(Of course the fact that I now do it with a few cheesy kernel
modifications is moot [one blinky for ep0 activity, one for com2 (ppp) 
activity, one for paging in, one for paging out, etc..])

Cheers,
Phil

crw-r-----  1 root  kmem    2,  14 Apr  7  1995 /dev/io

--
Phillip F Knaack               flipk@iastate.edu
Database Programmer, NCREMP    Student Development Group
ISU Extension                  Project Vincent, Iowa State University