Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Sept/Oct 2019 Issue of The NT Insider available


Download PDF here: http://insider.osr.com/2019/ntinsider_2019_01.pdf

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

PCI-to-PCI interrupts missing in Windows 10

Henry_KannapellHenry_Kannapell Member Posts: 3
Hi,

We have an Express/34 device (yes, pretty ancient) and we are trying to implement a hot plug filter driver connected to pci.sys for it. This driver worked well in Windows 7 and 8, but did not work in Windows 10. It turns out that Windows 7 and 8 allocated IRQ resources for all the PCI-to-PCI bridges in the system which our filter driver connected to with IoConnectInterruptEx(). Windows 10 however has no IRQ resources allocated to the PCI-to-PCI bridges.

So, our search of the PCM_PARTIAL_RESOURCE_LIST in IRP_MN_START_DEVICE no longer finds a CmResourceTypeInterrupt.

We thought we could circumvent this by implementing a completion routine to IRP_MN_QUERY_RESOURCE_REQUIREMENTS since it is a bus filter driver, but our addition of the interrupt resource seems to be rejected by the system. I don?t know whether that is because we formatting the resource request incorrectly or whether the system is just rejecting it. We are using a CmResourceTypeInterrupt with flags set to

Either way, what is the correct way to ask for PCI Interrupt support on a PCI-to-PCI bridge in Windows 10?

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,066
    xxxxx@sonnettech.com wrote:
    > We have an Express/34 device (yes, pretty ancient) and we are trying to implement a hot plug filter driver connected to pci.sys for it. This driver worked well in Windows 7 and 8, but did not work in Windows 10. It turns out that Windows 7 and 8 allocated IRQ resources for all the PCI-to-PCI bridges in the system which our filter driver connected to with IoConnectInterruptEx(). Windows 10 however has no IRQ resources allocated to the PCI-to-PCI bridges.

    Do you see an interrupt assigned in the PCI config space for your bridge?


    > So, our search of the PCM_PARTIAL_RESOURCE_LIST in IRP_MN_START_DEVICE no longer finds a CmResourceTypeInterrupt.
    >
    > We thought we could circumvent this by implementing a completion routine to IRP_MN_QUERY_RESOURCE_REQUIREMENTS since it is a bus filter driver, but our addition of the interrupt resource seems to be rejected by the system. I don?t know whether that is because we formatting the resource request incorrectly or whether the system is just rejecting it. We are using a CmResourceTypeInterrupt with flags set to

    That's not how that request works. That request is not use to ask the
    PCI bus driver to assign you something. PCI will report what
    requirements your hardware has, based on the config space. You can
    alter that list, but that won't change the hardware.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Henry_KannapellHenry_Kannapell Member Posts: 3
    >> Do you see an interrupt assigned in the PCI config space for your bridge?

    We see an interrupt assigned in the PCI config space in Windows 7, but not in Windows 10, that is the root of the problem.

    >> That's not how that request works. That request is not use to ask the
    PCI bus driver to assign you something. PCI will report what

    I thought that IRP_MN_QUERY_RESOURCE_REQUIREMENTS was a way of requesting the system for resources, not the pci bus driver. On the way back up the stack for this IRP, we modify the request to add the interrupt field; that is after the pci bus driver has asked for resources. Per the documentation:

    >>If a bus filter driver handles this IRP, it modifies the resource requirements list created by the bus driver.

    Oddly, in Windows 10 there seems to be a stubbed interrupt resource in the IO_RESOURCE_REQUIREMENTS_LIST; we see shareDisposition == CmResourceShareShared, but it has type CmResourceTypeNull instead of CmResourceTypeInterrupt.

    Ok, so this may not be the correct way to find and attach to the interrupt resource; but what is? Windows 10 doesn't seem to have interrupts associated with the PCI-to-PCI bridges like Windows 7/8 did.
  • jenitta77jenitta77 Member Posts: 3

    Can you please let me know if this issue got solved and if so, how you solved?

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,411
    edited August 29

    Yes, I’m sure... 3 years later... some guy who posted on no topic other than this is hanging around reading the forum daily, and will answer you.

    https://i.imgur.com/oImAOoj.jpg

    I don’t know how many times I have to ask people to please do not revive old threads.. If you have a question post the question in a new thread.

    Why is that so hard?

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • jenitta77jenitta77 Member Posts: 3

    Sorry , I have already posted my question in a new thread and I could not see the new thread ..

  • Henry_KannapellHenry_Kannapell Member Posts: 3

    Hope I'm not violating protocol by answering this old thread. We never found a solution to this. Instead, we made an applet that calls CM_Reenumerate_DevNode_Ex, part of the code in devcon.c. Customers have to manually run that when they insert or remove a device.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,411

    @Henry_Kannapell: Well, yes. But in THIS case, I'm glad you did. Even if only to demonstrate that my comment implying that the OP would never hear from you to be wrong.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE