From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 22:31:24 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 971AF16A4CE for ; Tue, 2 Dec 2003 22:31:24 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E5EE43F85 for ; Tue, 2 Dec 2003 22:31:22 -0800 (PST) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARQXg-0006zc-00 for ; Wed, 03 Dec 2003 07:31:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARQXf-0006zU-00 for ; Wed, 03 Dec 2003 07:31:19 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARQXf-000408-00 for ; Wed, 03 Dec 2003 07:31:19 +0100 From: rk47 Date: Wed, 03 Dec 2003 08:36:42 +0200 Organization: nanoteq Lines: 29 Message-ID: References: <000801c3b835$8a5f3a60$1c77fea9@dpc27> <20031202150109.52c9e309.kitsune@gmx.co.uk> <200312030115.hB31FRaQ027935@fw.farid-hajji.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org User-Agent: KNode/0.7.2 Sender: news Subject: Re: FreeBSD DRIVER DEVELOPMENT X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2003 06:31:24 -0000 > As with every device driver, the recommended (or at least proved) > way is to take an existing, simple driver, and modify it to suit > your needs. The simplest driver is probably the puc (sys/dev/pci/puc.c) driver, it has a lot of the elements that a driver can have. > Kernel interfaces are documented in intro(9) and related section 9 > man pages (ls /usr/share/man/man9) Some (one that I can think of) of the kernel interfaces are not given here. The interface to the dma services (bus_dma) you can find at : http://www.openbsd.org/cgi-bin/man.cgi > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/pci.html) > You can also look at the ISA section, because of the NEWBUS architecture an ISA driver is very similar to a PCI driver in many ways, e.g. allocating bus resources, setting up interupt handlers etc. A few articles on www.daemonnews.org can also help: NEWBUS intro (helped me a lot): http://www.daemonnews.org/200007/newbus-intro.html KLD (loadable modules) : http://www.daemonnews.org/200010/blueprints.html Good Luck Riaan