PCI_SLOT_NUMBER

typedef struct _PCI_SLOT_NUMBER {

union {

struct {

ULONG DeviceNumber:5;

ULONG FunctionNumber:3;

ULONG Reserved:24;

} bits;

ULONG AsULONG;

} u;

} PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER;

PCI_SLOT_NUMBER defines the format of the Slot parameter to the Hal..BusData routines when they are called with the BusDataType value PCIConfiguration.

Members

u.bits

Specifies the particular device on a multifunction adapter at the given slot that is being configured. The DeviceNumber indicates the logical slot number for the adapter; the FunctionNumber indicates the particular device on that adapter.

u.AsULONG

Species the logical slot number of the device being configured.

Comments

Drivers of PCI devices can call HalGetBusData or HalGetBusDataByOffset more than once for the same slot number to get the configuration information for their device(s).

For example, a driver might search for devices it supports on all PCI buses in the machine first, and then call HalGetBusData(ByOffset) again to request more configuration information about devices of interest. Such a driver could code a loop that calls HalGetBusData(ByOffset) with an input Buffer of sufficient Length only to contain enough of the PCI_COMMON_CONFIG to determine the VendorID and DeviceID of each PCI device. After finding the Slot numbers for any promising PCI devices, the driver would call HalGetBusData or HalGetBusDataByOffset one or more times with additional buffer space to get the information needed to configure its device(s).

See Also

HalAssignSlotResources, HalGetBusData, HalGetBusDataByOffset, HalSetBusData, HalSetBusDataByOffset, PCI_COMMON_CONFIG