PCIe Interrupt resource missing in Windows 10 filter driver RRS feed

  • Question

  • Hi ,

    I have coded a PCI bus filter driver for a PCI to PCI bridge device . 

    When I loop through the resources alloted to my device in the EvtDevicePrepareHardware function, I can see 

    that the interrupt resource is NULL.

    Do Windows 10 system allot interrupt resource to PCI to PCI bridge ?


    Rexlin S.

    Friday, August 30, 2019 9:32 AM

All replies

  • What is the point of it? Why a bridge would need an interrupt resource?

    -- pa

    Friday, August 30, 2019 8:09 PM
  • The hardware is a custom built one and it has some specific requirement of interrupt generation.

    Do Windows 10 system allot interrupt resource to PCI to PCI bridge ?

    If not by default , is it possible to convey the interrupt resource requirement to the PnP manager and get it allocated ?

    Thank you very much !

    Rexlin S

    Wednesday, September 11, 2019 12:23 PM
  • The PnP manager doesn't know, or care, that a bus filter is in a DevStack. The hardware resources needed by the device are filled in by the bus driver (PCI, in this case) in the QUERY_RESOURCE_REQUIREMENTS IRP. The bus driver queries the device for its resource needs when it receives that IRP and returns them to the bus driver. The arbiter then finds a set of non-overlapping resources on that bus that meet the device's requirements and sends those resources to the DevStack in the START_DEVICE IRP. If your device isn't getting an interrupt resource in the START_DEVICE IRP, then you should catch the QUERY_RESOURCE_REQUIREMENTS IRP on the way up the DevStack and see what the bus driver thinks the device is requesting.


    Azius Developer Training Windows device driver, internals, security, & forensics training and consulting. Blog at

    Wednesday, September 11, 2019 6:17 PM
  • Does your PCI configuration space say that you need an interrupt?  PCI bridges are allowed to have interrupts.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Thursday, September 12, 2019 4:01 AM
  • Thanks Brian.

    With your clear guidance , I read some documents and I could find this .

    If a bus filter driver handles this IRP (QUERY_RESOURCE_REQUIREMENTS IRP), it modifies the resource requirements list created by the bus driver. A bus filter driver modifies the list on the IRP's way back up the devicestack. A bus filter driver must preserve the order of resources in the resource requirements list and must not alter resource tags that it does not handle. If a bus filter driver changes the size of the resource requirements list, the driver must allocate a new structure from paged memory and free the previous structure. If a bus filter driver adds a new resource requirement to the list and the resource is assigned to the device, the driver must filter the new resource out of the IRP_MN_START_DEVICE IRP so it is not passed to the bus driver.

    The above are from wdm document. I am trying to find wdf equivalents.

    Is there any wdf sample code available for the above process ?

    Thursday, September 12, 2019 6:55 AM
  • Tim,

    My device's configuration space is programmed to support MSI.

    Either the bus driver is not reporting it or the system is not allocating it .


    Rexlin S

    Thursday, September 12, 2019 6:56 AM
  • Bus filters are not supported in WDF, and until the last five years or so, they weren't even mentioned in WDM. I have gotten it to work, but it was very difficult and I had the advantage of studying the Windows sources for 20 years. If this is your first bus filter then you should use WDM. There are many aspects of bus filters that are not documented (such as proper removal processing), and trying to get it to work in WDF without understanding all the requirements will be a huge distraction (you won't know if an error is because of the lack of support in WDF for bus filters or because you're just doing something wrong). You will really need to study all the documentation on the PnP manager and all the PnP IRPs (pay particular attention to the bus driver docs), because without a very good understanding of that you will not be able to get your driver to function properly. 


    Azius Developer Training Windows device driver, internals, security, & forensics training and consulting. Blog at

    Thursday, September 12, 2019 8:36 AM
  • Isn't the registry stuff needed to get a MSI interrupt allocated?

    For a normal function driver, this would be added by the INF file. 

    -- pa

    Thursday, September 12, 2019 10:56 AM
  • Thank s Brian.

    The filter driver is working as of now , but as I am not able to setup interrupt handlers as I do not get interrupt resource , I am doing some kind of polling .

    I dont understand if pci bus driver is filtering out resource requirement or if windows is not providing interrupt resource . 

    I am trying to add a EvtDeviceFilterAddResourceRequirements function  (this I believe would get invoked )and display the resource requirement list , to understand what resource list the bus driver has returned. 

    Thursday, September 12, 2019 5:50 PM
  • The registry setting is needed to enable MSI. I have done that .

    Thursday, September 12, 2019 6:12 PM