I’m not talking about the PCI device number, but the slot number, returned
when you call IoGetDeviceProperty() with DevicePropertyUINumber. From the
DDK docs:
“This number is typically a user-perceived slot number,
such as a number printed next to the slot on the board,
or some other number that makes locating the physical
device easier for the user.”
So, one would like to believe that the number returned actually matches the
number printed next to the slot in the system.
Note that calling IoGetDeviceProperty() with DevicePropertyAddress will give
you the PCI bus/device/function number data (interestly, the docs only say
that the encoding of the data in the returned ULONG is bus specific, but
provides no pointers of where to find out how it’s encoded for a specific
bus, such as PCI).
These slot number assignments are provided to the OS by the BIOS and is
totally independent of the PCI device number. For instance, in the test
system I mentioned, I have a network card located in the first slot in the
motherboard, labelled on the board as slot #1. If I go into device manager
(Win2k3 Server) and look at the properties on the device, it shows it’s
location as:
PCI Slot 3 (PCI bus 2, device 0, function 0)
Notice that the PCI Slot number is not the same as the PCI device number.
Note that in this system, all of the on-board devices are located on PCI bus
0, the video adapter is on the AGP bus (PCI bus 1), and all of the physical
PCI slots are on PCI bus 2.
As I mentioned before, the slot number is off by 2 (3 vs. 1) from the actual
slot numbers printed on the motherboard. This must be a bug in the BIOS
code that reports the slot assignments for this particular motherboard. I
know that when I’ve had other boards in the system, they also reported a
slot number that was off by 2.
Most annoying to have such a feature, only to have the data be WRONG.
Jay Talbott
Principal Consulting Engineer
SysPro Consulting, LLC
3519 E. South Fork Drive
Suite 201
Phoenix, AZ 85044
(480) 704-8045
xxxxx@sysproconsulting.com
http://www.sysproconsulting.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Friday, October 24, 2003 9:23 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: determine the card number
I don’t think it is a bios bug so much as the pci
chipset/motherboard have
embedded devices occupying a couple of ‘slots’ while the
engineer designing
the motherboard layout just labels the physical slots
starting from 0 or 1.
=====================
Mark Roddy
> -----Original Message-----
> From: Jay Talbott [mailto:xxxxx@sysproconsulting.com]
> Sent: Friday, October 24, 2003 11:34 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: determine the card number
>
>
> If only the number returned actually matched the number silk
> screened on the motherboard…
>
> I have test system where those numbers are off by 1 (or maybe
> they are off by 2, I don’t remember anymore) from the numbers
> printed on the motherboard.
>
> I presume this is a BIOS bug on this particular system, but
> if my test system can have such a bug, so could the BIOS on
> any system out there. Thus, it makes me question the
> usefulness of telling a client that putting a board into the
> slot labelled ‘3’ on the motherboard will mean that Windows
> will report it as being in slot number 3.
>
> - Jay
>
> Jay Talbott
> Principal Consulting Engineer
> SysPro Consulting, LLC
> 3519 E. South Fork Drive
> Suite 201
> Phoenix, AZ 85044
> (480) 704-8045
> xxxxx@sysproconsulting.com
> http://www.sysproconsulting.com
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Loren Wilton
> > Sent: Thursday, October 23, 2003 4:44 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Re: determine the card number
> >
> >
> > > Thanks Don, the
> > IoGetDeviceProperty(…DevicePropertyUINumber…) is a very
> > > useful for me! I tried it out and the returned value
> > actually corresponds
> > > to the PCI slot number. That means as long as the PC has
> power, this
> > > number will not change for the same card and is a warranty
> > that created
> >
> > This number comes from the ACPI BIOS, and should never change
> > for a slot on
> > a given machine (except possibly wiht a BIOS upgrade). It
> > isn’t dependent
> > on which board is in the slot, it is simply a property of
the slot.
> >
> > Loren
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@sysproconsulting.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@sysproconsulting.com
To unsubscribe send a blank email to xxxxx@lists.osr.com