Skip to content

Commit db09f1f

Browse files
authored
Merge pull request #3075 from MicrosoftDocs/lwh/uuf305884
Add link to sample code per UUF 305884
2 parents a018e5c + 79dfc1f commit db09f1f

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
---
2-
title: Obtaining Configuration Information from Other Driver Stacks
3-
description: Obtaining Configuration Information from Other Driver Stacks
2+
title: Configuration Information from Other Driver Stacks
3+
description: Configuration Information from Other Driver Stacks
44
keywords: ["I/O WDK kernel , device configuration space", "device configuration space WDK I/O", "configuration space WDK I/O", "space WDK I/O", "driver stacks WDK configuration info", "BUS_INTERFACE_STANDARD"]
5-
ms.date: 06/16/2017
5+
ms.date: 11/01/2025
66
ms.topic: concept-article
77
---
88

9-
# Obtaining Configuration Information from Other Driver Stacks
9+
# Configuration Information from Other Driver Stacks
1010

11+
At times you need to obtain information from the configuration space of a device whose driver is on a stack other than the one that your driver is on. For instance, suppose you want to set a bit in the configuration space of a PCI-to-PCI bridge and you don't have a pointer to the PDO of the bridge. Although the operating system enumerates PCI-to-PCI bridges and creates a PDO for every bridge on the system, it doesn't register device interfaces for these devices. Therefore, you can't use the device interface mechanism to access the configuration space of these bridges. For more information about device interfaces, see [Introduction to Device Interfaces](../install/overview-of-device-interface-classes.md).
1112

13+
One way for a driver to access hardware belonging to other driver stacks is to write a filter driver. To access bridge hardware, for instance, you could design a filter driver that implements the required operations on the bridge's configuration space. You must also provide an INF file that specifies the bridge hardware's possible hardware IDs. The INF file allows the PnP manager to load the filter driver onto the bridge's driver stack when it detects the device ID of the bridge.
1214

15+
Alternatively, you can install a filter programmatically using **SetupDi*Xxx*** functions in the co-installer for your device.
1316

17+
The filter driver can then access the bridge using the [**BUS_INTERFACE_STANDARD**](/windows-hardware/drivers/ddi/wdm/ns-wdm-_bus_interface_standard) interface.
1418

15-
At times you need to obtain information from the configuration space of a device whose driver is on a stack other than the one that your driver is on. For instance, suppose you want to set a bit in the configuration space of a PCI-to-PCI bridge and you do not have a pointer to the PDO of the bridge. Although the operating system enumerates PCI-to-PCI bridges and creates a PDO for every bridge on the system, it does not register device interfaces for these devices. Therefore, you cannot use the device interface mechanism to access the configuration space of these bridges. For more information about device interfaces see [Introduction to Device Interfaces](../install/overview-of-device-interface-classes.md).
16-
17-
One way for a driver to access hardware belonging to other driver stacks is to write a filter driver. To access bridge hardware, for instance, you could design a filter driver that implements the required operations on the bridge's configuration space. You must also provide an INF file that specifies the bridge hardware's possible hardware IDs, so the PnP manager can load the filter driver onto the bridge's driver stack when it detects the device ID of the bridge.
18-
19-
Alternatively, you can install a filter programmatically using **SetupDi<em>Xxx</em>** functions in the co-installer for your device.
20-
21-
The filter driver can then access the bridge using the [**BUS\_INTERFACE\_STANDARD**](/windows-hardware/drivers/ddi/wdm/ns-wdm-_bus_interface_standard) interface.
22-
23-
24-
19+
For a sample implementation that demonstrates using **BUS_INTERFACE_STANDARD** to access PCI configuration space, see the [PCIDRV driver sample](https://github.com/microsoft/Windows-driver-samples/tree/main/general/pcidrv).

0 commit comments

Comments
 (0)