From owner-freebsd-doc Thu Aug 3 20:57:41 1995 Return-Path: doc-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id UAA14798 for doc-outgoing; Thu, 3 Aug 1995 20:57:41 -0700 Received: from hq.icb.chel.su (icb-rich-gw.icb.chel.su [193.125.10.34]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id UAA14791 for ; Thu, 3 Aug 1995 20:57:36 -0700 Received: from localhost (babkin@localhost) by hq.icb.chel.su (8.6.5/8.6.5) id JAA16955; Fri, 4 Aug 1995 09:59:18 +0600 From: "Serge A. Babkin" Message-Id: <199508040359.JAA16955@hq.icb.chel.su> Subject: Re: device driver writers guide To: erich@lodgenet.com (Eric L. Hernes) Date: Fri, 4 Aug 1995 09:59:17 +0600 (GMT+0600) Cc: terry@cs.weber.edu, doc@freebsd.org In-Reply-To: <199508031523.KAA10229@jake.lodgenet.com> from "Eric L. Hernes" at Aug 3, 95 10:23:38 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2043 Sender: doc-owner@freebsd.org Precedence: bulk > > > > I would be *very* interested in one of these existing. > > > > One of the issues in BSD is lack of documentation for internal > > system interfaces. VM would be a good place to start, as would > > vn_ for kernel level file I/O and bXXX, the block I/O interface. > > > > Yea, but lack of documentation is a problem for all unixes. > Sco, even though you can pay for a device driver class, and > they have man pages for kernel support routines, still > is about 80% of what I would have liked. (that is still > much better than FreeBSD, though) > > I'm much more familiar with the drivers and entry points, and > that type of stuff. The details VM has always been a big > mystery for me. There is a good (but old :-( ) book by Egan and Texeira "Writing a Unix device driver" (if I have remembered it right). This is a book for beginners, but it's full and its skeleton can be used for the Device driver writer's guide. I think it can be used as an example "how it should be done and what it should content" too (but obviously the contents will be more modern, like your ouline). > > My outline is as follows: > > I. Linking a driver into the kernel > > A. Standard Device Driver > B. Loadable Kernel Modules (LKM's) > > II. FreeBSD Entry Points > > A. Required Data Structures > 1. isa_device > 2. isa_driver > 3. ... > > B. Required Entry Points > 1. XXprobe() > 2. XXattach() > 3. XXopen() > 4. XXclose() > > C. Optional Entry Points > > 1. Device Switch Entry Points > > a. XXread() > b. XXwrite() > c. XXioctl() > d. XXdevtotty() > e. XXstart() > f. XXstop() > g. XXreset() > h. XXstrategy() > > D. Interrupt type Entry Points > > a. XXintr() > b. XXpoll() > > III. Kernel Support Routines Serge Babkin ! (babkin@hq.icb.chel.su) ! Headquarter of Joint Stock Commercial Bank "Chelindbank" ! Chelyabinsk, Russia