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

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

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Question regarding WDFINTERRUPT and MSI-X vector number order.

Erik_DabrowskyErik_Dabrowsky Member - All Emails Posts: 25

Hi,

Is it safe to assume that MSI-X vector numbers (MessageIDs) are assigned in the same order that interrupt objects are created?
As in: 1st interrupt object gets message id 0, 2nd object gets message id 1, 3rd gets 2, etc...?

The interrupt objects are being created in EvtDeviceAdd and not in EvtPrepareHardware if that matters.

So far, from practice that appears to be the case, but I want to make sure I'm not depending on a coincidence.

Thanks.

Comments

  • MBond2MBond2 Member Posts: 144

    I have no idea what the correct answer is, but do you need to depend on this?

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,496
    edited January 15

    How could it work any other way? If they weren't aligned, there would be no way to correlate the two lists.

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

  • Erik_DabrowskyErik_Dabrowsky Member - All Emails Posts: 25

    MBond2:
    In my case yes. The device has the ability to create one or more input queues in memory and allows you to tell it which MSI-X vector/message number to use when the queue is updated and the interrupt fires.

    In my specific case I use interrupt object 0 (msix 0) for basic register/configuration operations.
    MSIX vector 1 is associated with the 1st input queue and interrupt object 1
    MSIX vector 2 with the 2nd queue and interrupt object 2 etc etc.

  • Erik_DabrowskyErik_Dabrowsky Member - All Emails Posts: 25

    Tim,

    Thanks for the input. I figured that was probably the case, but I've learned not to make assumptions if possible.

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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA