Date: Fri, 22 Jan 1999 12:20:09 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: "David E. Cross" <crossd@cs.rpi.edu> Cc: hackers@FreeBSD.ORG Subject: Re: device driver writing Message-ID: <Pine.BSF.4.01.9901221215390.59627-100000@herring.nlsystems.com> In-Reply-To: <199901211600.LAA28568@cs.rpi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 21 Jan 1999, David E. Cross wrote: > > I am attempting to write a very simple device driver for the serial port > (8250 only) as a KLD (this is for demonstration purposes to a class). I admit > I have never written a UNIX device drvier before, but KLD makes it look so > easy :). The problem that I am having is that I do not know how to hook > in to the interupts. I have looked at sio.c and noticde the > 'struct isa_device', that contains the information I want to set (I think), > but I do not see where or how this information is registered with the kernel. > Any pointers/sample code would be appreciated, thanks :) Unfortunately the ISA code in -current is not well suited to loadable drivers. It would probably be possible to call intr_create() to set up an interrupt but it would be ugly. Garrett has been working on the i386 isa code to move it to the new device framework in -current. When that happens, things will be a lot easier. I don't know how long it will be before this arrives in the tree though :-(. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9901221215390.59627-100000>