From owner-freebsd-hackers Wed Sep 23 08:43:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA16625 for freebsd-hackers-outgoing; Wed, 23 Sep 1998 08:43:19 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from panzer.plutotech.com (panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA16600 for ; Wed, 23 Sep 1998 08:43:05 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.1/8.8.5) id JAA22485; Wed, 23 Sep 1998 09:42:42 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199809231542.JAA22485@panzer.plutotech.com> Subject: Re: Reading PCI card config registers et cetera In-Reply-To: <199809230737.PAA07767@ariadne.tensor.pgs.com> from Stephen Hocking-Senior Programmer PGS Tensor Perth at "Sep 23, 98 03:37:52 pm" To: shocking@prth.pgs.com (Stephen Hocking-Senior Programmer PGS Tensor Perth) Date: Wed, 23 Sep 1998 09:42:42 -0600 (MDT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Stephen Hocking-Senior Programmer PGS Tensor Perth wrote... > Linux has a whole bunch of functions for reading the configuration registers > of PCI cards and stuff that are nicely standardised. After a quick look > through the various. PCI drivers I can't see anything similar for FreeBSD. Can > anyone enlighten me if we have any such beast? Do you mean from kernel drivers or from userland? For userland, it's called pciconf. For instance: # pciconf -r pci0:9:0 0x00 0x12298086 # pciconf -r pci0:9:0 0x04 0x02900017 You can write registers as well with the -w option. >From kernel drivers, you can use pci_cfgread() or pci_conf_read(). Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message