From owner-freebsd-hackers Thu Aug 20 17:25:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA26546 for freebsd-hackers-outgoing; Thu, 20 Aug 1998 17:25:21 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (ppp-c0f.dialup.hilink.com.au [203.2.144.39]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA26526 for ; Thu, 20 Aug 1998 17:25:09 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id RAA01288; Thu, 20 Aug 1998 17:21:14 GMT (envelope-from mike@dingo.cdrom.com) Message-Id: <199808201721.RAA01288@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: eT cc: hackers@FreeBSD.ORG Subject: Re: attaching devices In-reply-to: Your message of "Thu, 20 Aug 1998 17:09:52 GMT." <35DC5860.1B07E107@iname.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 20 Aug 1998 17:21:13 +0000 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Greets, > > I have a few questions regarding writing a PCI device driver with I/O > address access to the PCI chip as opposed to memory mapped access: > > 1. what does the kernel do/want when it attaches the driver? This depends on the device in question. See sys/pci/* for examples for varoious different devices. > 2. which pci_* functions are relevant for I/O access to PCI chip? Once the device is mapped, none. The device is normally mapped by the BIOS at system startup, so there's no need to do that either in most cases. > 3. what does pci_attach() do? There is no such function, as far as I am able to determine. > 4. many of the examples in /usr/src/sys/pci have the xx_softc > structure. is this thee structure for accessing and controlling the PCI > chip and whatever other chips are on the device? No. "softc" or "soft configuration" is the traditional name for the per-device structure maintained by the device driver. The contents of this structure are driver-specific, although there are some fields which are fairly common (eg. DEVFS token, etc.) -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message