sparc64/50789: PCI Bus number reported by /dev/pci is wrong.

Andrew Milton akm at theinternet.com.au
Thu Apr 10 11:30:19 PDT 2003


>Number:         50789
>Category:       sparc64
>Synopsis:       PCI Bus number reported by /dev/pci is wrong.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-sparc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 10 11:30:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Milton
>Release:        FreeBSD 5.0-CURRENT sparc64
>Organization:
>Environment:
System: FreeBSD orchid.theinternet.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Thu Apr 10 17:36:22 EST 2003 akm at orchid.theinternet.com.au:/usr/obj/usr/src/sys/orchid sparc64
cpu0: Sun Microsystems UltraSparc-IIi Processor (269.80 MHz CPU)
Model: SUNW,Ultra-5_10
nexus0: <OpenFirmware Nexus device>
pcib0: <U2P UPA-PCI bridge> on nexus0
pcib0: Sabre, impl 0, version 0, ign 0x7c0
DVMA map: 0xc0000000 to 0xc1ffffff
PCI-PCI bridge at 0/1/1: setting bus #s to 0/1/1
pcib0: ofw_pci_init: descending to subordinate PCI bus
device 1/1/0: latency timer 0 -> 82
pcib0: ofw_pci_init: no interrupt mapping found for 1/1/0 (preset 0)
device 1/1/1: latency timer 0 -> 82
pcib0: ofw_pci_init: mapping intr for 1/1/1 to 33 (preset was 0)
device 1/2/0: latency timer 0 -> 66
pcib0: ofw_pci_init: mapping intr for 1/2/0 to 15 (preset was 15)
device 1/3/0: latency timer 0 -> 16
pcib0: ofw_pci_init: mapping intr for 1/3/0 to 32 (preset was 14)
PCI-PCI bridge at 0/1/0: setting bus #s to 0/2/2
pcib0: ofw_pci_init: descending to subordinate PCI bus
pci0: <PCI bus> on pcib0
pcib1: <APB PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pcib2: <APB PCI-PCI bridge> at device 1.1 on pci0
pci2: <PCI bus> on pcib2
ebus0: revision 0x01
ebus0: <PCI-EBus2 bridge> mem 0xf1000000-0xf17fffff,0xf0000000-0xf0ffffff at device 1.0 on pci2
ebus0: <auxio> addr 0x140072f000-0x140072f003,0x140072c000-0x140072c003,0x140072a000-0x140072a003,0x1400728000-0x1400728003,0x1400726000-0x1400726003 (no driver attached)
ebus0: <power> addr 0x1400724000-0x1400724003 irq 37 (no driver attached)
ebus0: <SUNW,pll> addr 0x1400504000-0x1400504002 (no driver attached)
sab0: <Siemens SAB 82532 v3.2> addr 0x1400400000-0x140040007f irq 43 on ebus0
sabtty0: <ttya> on sab0
sabtty0: console 9600,8,n,1,-
sabtty1: <ttyb> on sab0
ebus0: <su> addr 0x14003083f8-0x14003083ff irq 41 (no driver attached)
ebus0: <su> addr 0x14003062f8-0x14003062ff irq 42 (no driver attached)
ebus0: <ecpp> addr 0x1400700000-0x140070000f,0x140030015c-0x140030015d,0x14003043bc-0x14003043cb irq 34 (no driver attached)
ebus0: <fdthree> addr 0x1400720000-0x1400720003,0x1400706000-0x140070600f,0x14003023f0-0x14003023f7 irq 39 (no driver attached)
eeprom0: <EBus EEPROM/clock> addr 0x1400000000-0x1400001fff on ebus0
eeprom0: model mk48t59
eeprom0: hostid 808e84c0
ebus0: <flashprom> addr 0x1000000000-0x10000fffff (no driver attached)
ebus0: <SUNW,CS4231> addr 0x1400722000-0x1400722003,0x1400704000-0x140070400f,0x1400702000-0x140070200f,0x1400200000-0x14002000ff irq 36,35 (no driver attached)
hme0: <Sun HME 10/100 Ethernet> mem 0xe0000000-0xe0007fff irq 33 at device 1.1 on pci2
miibus0: <MII bus> on hme0
nsphy0: <DP83840 10/100 media interface> on miibus0
nsphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci2: <display, VGA> at device 2.0 (no driver attached)
atapci0: <CMD 646 WDMA2 controller> port 0xc00020-0xc0002f,0xc00018-0xc0001b,0xc00010-0xc00017,0xc00008-0xc0000b,0xc00000-0xc00007 irq 32 at device 3.0 on pci2
ata2: at 0xc00000 on atapci0
ata3: at 0xc00010 on atapci0

>Description:
	The PCI bus reported by pciconf and /dev/pci + ioctls is incorrect,
	the correct PCI Bus is repported for devices in dmesg output.
	This likely affects other architectures with > 1 PCI bus, but, I don't
	have access to any to confirm.

>How-To-Repeat:
This is fairly simple to detect, I have an onboard video card on
pcibus #2, dmesg shows;

pci2: <display, VGA> at device 2.0 (no driver attached)

pciconf -lv:
none0 at pci1:2:0: class=0x030000 card=0x00000000 chip=0x47541002 rev=0x9a hdr=0x00
    vendor   = 'ATI Technologies'
    device   = 'Mach 64 GT Rage 3D II Graphics Accelerator'
    class    = display
    subclass = VGA

If I tried to read register 0 I should get the chip back (0x47541002)

pciconf -r pci1:2:0 0
ffffffff 

If I use pci bus 2 as reported by dmesg;

pciconf -r pci2:2:0 0
47541002 

>Fix:
Unknown.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-sparc64 mailing list