How to find an available interrupt vector that doesn't conflict.


  1. Posts : 48
    windows 10 home
       #1

    How to find an available interrupt vector that doesn't conflict.


    I have a kernel driver that has an ISR for some hardware. I need to find an interrupt vector so that I can program the hardware to use that vector and I can tell Windows to call my ISR when the interrupts occur.
    My strategy is as follows: I use IoConnectInterrupt with various combinations of parameters until I get a successful return. The combinations I use are, in order of choices:
    • not shared, shared
    • Latched, Level Sensitive
    • vector from 50h ... FEh
    • DIRQL from 0 to 9.

    The driver gets the first success for not shared, Latched, vector 80h, DIRQL 0.
    I changed the driver to try shared first, then it got shared, Latched, vector 80h, DIRQL 0.

    The result is that after I enable the hardware for vector 80, I do get some interrupts. The ISR keeps an interrupt count which the client program can get from the driver. However, after a short period of operation, the entire system hangs -- nothing new showing on the console window, no mouse, no keyboard (not even ctrl-alt-del).
    Obviously, this particular choice of interrupt parameters is interfering with some other device on the system.

    When I change the driver so that it does not enable interrupts by the hardware, everything works fine. The client program gets no data from the driver, of course, and it keeps on trying forever.

    My question is: What method do you recommend for selecting these parameters for IoConnectInterrupt, or some other method of hooking the ISR to a vector?

    Perhaps using Hal routines?

    My method doesn't seem right, even with shared access, because some other driver might later want exclusive access to the same vector and fail to get it. So there should be a better way of arbitrating vector usage.

    Please help. Right now my project is dead in the water. Thanks.
    Last edited by mrolle; 26 Dec 2017 at 16:37.
      My Computer


  2. Posts : 48
    windows 10 home
    Thread Starter
       #2

    By the way, the last time I tried using this driver was three years ago, and it worked fine. I was on Windows 7 with a different CPU. I now have Windows 10 and an AMD Ryzen.
      My Computer


  3. Posts : 1,255
    Windows 10 Pro
       #3

    You would get better results by posting on a programmers forum, which this is not. Maybe Stack Overflow.
      My Computer


  4. Posts : 48
    windows 10 home
    Thread Starter
       #4

    LMiller7 said:
    You would get better results by posting on a programmers forum, which this is not. Maybe Stack Overflow.
    I'm surprised. I thought this forum was especially for driver developers.
    Isn't there something called "windev" or some such? I couldn't find it on the web, after a little bit of searching. I recall participating in it, so I thought TenForums was the one I was thinking of.
    Anyone know of the forum for Windows Driver programming? Thanks.
      My Computer


  5. Posts : 48
    windows 10 home
    Thread Starter
       #5

    mrolle said:
    By the way, the last time I tried using this driver was three years ago, and it worked fine. I was on Windows 7 with a different CPU. I now have Windows 10 and an AMD Ryzen.
    I recall participating on a driver developers forum years ago, and I thought this was the one I was thinking of. However, the one I was thinking of turns out to be OSR Online (http://www.osronline.com/).
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:14.
Find Us




Windows 10 Forums