tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] pcictl: simplify its usage

On Thu, Jun 04, 2009 at 08:01:39PM +0200, Manuel Bouyer wrote:
> On Thu, Jun 04, 2009 at 07:18:50PM +0200, Matthias Drochner wrote:
> > 
> > mouse%Rodents-Montreal.ORG@localhost said:
> > > But you need /dev/pci in order to have something to open when you
> > > don't have a bus number available.
> > 
> > I didn't follow all the thread, just want to make sure that
> > everyone is aware of the fact that the N and the M in
> > pcictl /dev/pciN <command> -b M
> > are not the same: N is a logical index chosen by autoconf
> > and M is the physical bus number.
> > This might be not a big issue with a simple PC, but on
> > a big box with multiple PCI hierarchies the same physical bus
> > number can occur multiple times.
> Yes, you're right. The API proposed by Christoph doens't work in
> that case. I think it needs to use the autoconf index in this case,
> not the physical bus number.

This is the case on a DS20 system:
cpu0 at mainbus0: ID 0 (primary), 21264-4
cpu0: Architecture extensions: 303<PAT,MVI,FIX,BWX>
tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
tsc0: 8 Dchips, 2 memory buses of 32 bytes
tsc0: arrays present: 256MB, 256MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
tsp1 at tsc0
pci1 at tsp1 bus 0

both have the same physical bus number (which is stored in sc_bus).
What's unique is the autoconf index.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index