Subject: Re: How to port inportb/outportb to NetBSD ???
To: Brian Stark <bstark@uswest.net>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: port-i386
Date: 11/26/1999 13:25:06
> NetBSD currently has some support for this serial card on the i386
> platform, but it is not complete. 

Out of curiosity, what functionality is missing?

> I suspect that the code I am working could be included in a separate
> driver, or even merged into what is currently in NetBSD,

In the fullness of time, this almost certainly wants to be merged into
the existing com driver (/usr/src/sys/dev/ic/com.c).

> but I haven't come across a "how-to-write- a-device-driver" type
> document yet.

Many of the calls that the driver will need to make (for instance,
bus_space_{read,write}_1, which are, roughly speaking, portable
equivalents of inb() and outb()) are documented in section 9 man
pages, which is a start, but unfortunately, "how to write a device
driver" isn't as well documented as it could be; probably your best
bet is to read existing drivers for similar devices.

					- Bill