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

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

WDF: Multiple MSI-X interrupts

Hello,

Till now I worked with one MSI interrupt only:
``
WDF_INTERRUPT_CONFIG InterruptConfig;
WDF_INTERRUPT_CONFIG_INIT( &InterruptConfig,
PLxEvtInterruptIsr,
PLxEvtInterruptDpc );

InterruptConfig.EvtInterruptEnable = PLxEvtInterruptEnable;
InterruptConfig.EvtInterruptDisable = PLxEvtInterruptDisable;
InterruptConfig.AutomaticSerialization = TRUE;

status = WdfInterruptCreate( DevExt->Device,
&InterruptConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&DevExt->Interrupt );

``
What should I change in WdfInterruptCreate to create another interrupt connected to another MSI interrupt coming from FPGA ?

Thank you,
Zvika

Comments

  • Tim_RobertsTim_Roberts Posts: 12,622
    via Email
    On Sep 29, 2018, at 10:33 PM, zvivered wrote:
    >
    > Till now I worked with one MSI interrupt only:
    > ``
    > What should I change in WdfInterruptCreate to create another interrupt connected to another MSI interrupt coming from FPGA ?

    Have you changed your hardware to declare multiple interrupts?

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

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

  • zviveredzvivered Posts: 4

    Hi Tim,

    Yes.
    According to the resources of this FPGA in device manager, there are 4 interrupts.

    Thank you,
    Zvika

  • Tim_RobertsTim_Roberts Posts: 12,622
    via Email
    zvivered wrote:
    > According to the resources of this FPGA in device manager, there are 4 interrupts.

    And did you set MessageNumberLimit in the registry?  This is in the same
    location where you enable MSI to begin with:
        HKR,Interrupt
    Management\MessageSignaledInterruptProperties,MessageNumberLimit,,4

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

  • zviveredzvivered Posts: 4

    Hi Tim, All,

    Attached the inf I installed according to your reply.
    Still not getting interrupt.
    Should I call "WdfInterruptCreate" only once or 4 times ?

    Thank you,
    Zvika

  • zviveredzvivered Posts: 4

    Hi Tim, All,

    I have 4 resources with type = CmResourceTypeInterrupt
    I printed:
    desc->u.MessageInterrupt.Raw.MessageCount for all 4.
    The value is 0.

    Does it mean that I have an FPGA problem ?

    Thank you,
    Zvika

  • Tim_RobertsTim_Roberts Posts: 12,622
    via Email
    zvivered wrote:
    > Attached the inf I installed according to your reply.

    There was nothing attached; my guess is the new forum throws away
    attachments.  Did you check the registry to make sure the entries got in
    there?


    > Still not getting interrupt.
    >
    > Should I call "WdfInterruptCreate" only once or 4 times ?

    You should read the documentation.  It's quicker than the list.

    Your driver must call*WdfInterruptCreate*once for each interrupt
    vector that its device requires. If the device supports
    message-signaled interrupts (MSI), the driver must create an
    interrupt object for each message that the device can support.

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

  • Tim_RobertsTim_Roberts Posts: 12,622
    via Email
    zvivered wrote:
    > I have 4 resources with type = CmResourceTypeInterrupt
    > I printed:
    > desc->u.MessageInterrupt.Raw.MessageCount for all 4.
    > The value is 0.
    > Does it mean that I have an FPGA problem ?

    If you're seeing 4 interrupt resources, then it's probably connected
    correctly.

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

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!