ULONG
HalSetBusDataByOffset(
IN BUS_DATA_TYPE BusDataType,
IN ULONG BusNumber,
IN ULONG SlotNumber,
IN PVOID Buffer,
IN ULONG Offset,
IN ULONG Length
);
HalSetBusDataByOffset sets bus-configuration data for a device on a dynamically configurable I/O bus with a published, standard interface.
When PCIConfiguration is specified, the buffer contains some or all of
the PCI_COMMON_CONFIG information for the given SlotNumber. The
specified Offset and Length determine how much information is
supplied. Certain members of PCI_COMMON_CONFIG have read-only values, and the
caller is responsible for preserving the system-supplied values of read-only
members.
HalSetBusDataByOffset returns the number of bytes of data successfully set for the given SlotNumber. If the given BusDataType is not valid for the current platform or if the supplied information is invalid, this routine returns zero.
Callers of HalAssignSlotResources or IoAssignResources seldom call HalSetBusDataByOffset or HalSetBusData, because each of these XxAssignXxx routines sets up the configuration information for the given SlotNumber and returns the information to the caller. However, a driver can call HalSetBusDataByOffset or HalSetBusData if unusual circumstances or the nature of its device requires such a call. For example, a driver might call either of these routines to clear a bit in the PCI status register if its device signals a target abort during initialization.
When accessing the device-specific area of the PCI configuration space, HalSetBusDataByOffset guarantees the following:
If the input BusDataType is PCIConfiguration, callers of HalSetBusDataByOffset can be running at IRQL <= DISPATCH_LEVEL. Otherwise, callers of HalSetBusDataByOffset must be running at IRQL PASSIVE_LEVEL.
HalAssignSlotResources, HalGetBusData, HalGetBusDataByOffset, HalTranslateBusAddress, IoAssignResources, PCI_COMMON_CONFIG, PCI_SLOT_NUMBER