Pages

Sunday, March 4, 2012

Obtain PCI hardware information in NetBSD

To get information about your installed PCI hardware on a freshly installed NetBSD machine run dmesg and grep for "at pci": 

# dmesg | grep "at pci"
pchb0 at pci0 dev 0 function 0
ppb0 at pci0 dev 1 function 0: vendor 0x1106 product 0xb112 (rev. 0x00)
vga1 at pci1 dev 0 function 0: vendor 0x1023 product 0x8500 (rev. 0x00)
pcib0 at pci0 dev 7 function 0
viaide0 at pci0 dev 7 function 1
uhci0 at pci0 dev 7 function 2: vendor 0x1106 product 0x3038 (rev. 0x1a)
uhci1 at pci0 dev 7 function 3: vendor 0x1106 product 0x3038 (rev. 0x1a)
vendor 0x1106 product 0x3057 (miscellaneous bridge, revision 0x40) at pci0 dev 7 function 4 not configured
auvia0 at pci0 dev 7 function 5: VIA Technologies VT82C686A AC'97 Audio (rev 0x50)
tlp0 at pci0 dev 15 function 0: ADMtek AN985 Ethernet, pass 1.1
isa0 at pcib0

The above output shows some basic information like the network device etc. If you are using pkgsrc then you can install the pciutils package and use lspci just like in Linux:

# cd /usr/pkgsrc/sysutils/pciutils
# make && make install
...
# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8361 [KLE133] Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8361 [KLE133] AGP Bridge
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 50)
00:0f.0 Ethernet controller: ADMtek 21x4x DEC-Tulip compatible 10/100 Ethernet (rev 11)
01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i1

No comments:

Post a Comment