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

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category.

MSI ISR

Tim_RobertsTim_Roberts Posts: 12,619
While trying to answer a question, I just noticed something strange in
the documentation for the ISR for message-signaled interrupts at

https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nc-wdm-kmessage_service_routine

The system can call an /InterruptMessageService/ routine even when
the routine's interrupt has not occurred. For example, if a
message-signaled interrupt is shared, /InterruptMessageService/ can
be called for interrupts belonging to other devices. The routine
must check whether the value for the /ServiceContext/ parameter
matches the value passed to *IoConnectInterruptEx*. If the value
does match, /InterruptMessageService/ handles the interrupt and
returns *TRUE*. Otherwise, /InterruptMessageService/does not handle
the interrupt and returns *FALSE*.

They cannot mean what they wrote here.  How can I possibly check whether
the value for ServiceContext matches what I passed to
IoConnectInterruptEx?  If I could establish my context independently, I
wouldn't need the ServiceContext parameter at all.  What do you suppose
they were trying to say?

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

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

Comments

  • Pavel_APavel_A Posts: 2,643
    Very strange indeed. MSIs can be shared now? On which kind of platform?

    -- pa
  • anton_bassovanton_bassov Posts: 4,794
    > How can I possibly check whether the value for ServiceContext matches what
    > I passed to IoConnectInterruptEx??

    Actually, I am more "impressed" my MSI sharing part......

    Concerning the above question, you can always save a pointer that you have passed to IoConnectInterruptEx() in some global variable (or array in case of multiple calls to IoConnectInterruptEx() for different instances of your device) so that you can identify your targets. No matter how stupid and awkward the above mentioned approach is, it is going to sort out the issue you are asking about. However, the idiocy of MSI sharing suggestion is so profound that it just leaves me sort of speechless....


    Anton Bassov
  • Alex_GrigAlex_Grig Posts: 3,238
    I think that's a copy-paste error
  • It's GOT to be a doc bug.

    Peter
    OSR
    @OSRDrivers

    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!