From owner-freebsd-hackers Wed Nov 7 11: 0:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 78AF837B418 for ; Wed, 7 Nov 2001 11:00:30 -0800 (PST) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA72015; Wed, 7 Nov 2001 10:48:47 -0800 (PST) Date: Wed, 7 Nov 2001 10:48:46 -0800 (PST) From: Julian Elischer To: Dragon Fire Cc: freebsd-hackers@freebsd.org Subject: Re: PCI Device Drivers In-Reply-To: <008e01c16782$fc4b3080$037d6041@gandalf> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG take the example device driver from the -current /usr/share/examples/drivers It makes a skelaton loadable driver. On Wed, 7 Nov 2001, Dragon Fire wrote: > I'm writing a very simple PCI device driver that, basically, needs to > allocate PCI resources, provide 2 ioctls, then deallocate PCI resources on > shutdown. > > The documentation on writing FreeBSD device drivers is sketchy at best. Does > anybody have any good resources? Even a pointer to a simple driver would be > helpful, many of the drivers in the source tree are SCSI or RAID drivers > which are far more complicated than what I need. I've begun ripping these > apart but if there are more resources available I'd like to get my hands on > them. > > Also, I've begun to piece the driver together, but the most notable piece of > missing information is how to have the driver loaded, is kvmload the way to > go?. > > There used to be a series of files to edit to add your source into the > kernel build and add your device into the kernel config file. I'm missing > the equivalent pieces of information for a loadable driver. > > Thanks in advance, > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message