Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 1998 09:42:42 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        shocking@prth.pgs.com (Stephen Hocking-Senior Programmer PGS Tensor Perth)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Reading PCI card config registers et cetera
Message-ID:  <199809231542.JAA22485@panzer.plutotech.com>
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"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809231542.JAA22485>