Date: Thu, 20 Aug 1998 17:21:13 +0000 From: Mike Smith <mike@smith.net.au> To: eT <edebruin@iname.com> Cc: hackers@FreeBSD.ORG Subject: Re: attaching devices Message-ID: <199808201721.RAA01288@dingo.cdrom.com> In-Reply-To: Your message of "Thu, 20 Aug 1998 17:09:52 GMT." <35DC5860.1B07E107@iname.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808201721.RAA01288>