Enabling multiple MSI interrupts

Hi,
During my EvtPrepareHardware() function, I examine the
CM_PARTIAL_RESOURCE_DESCRIPTOR list for interrupt resources.

CmResourceTypeInterrupt resource has CM_RESOURCE_INTERRUPT_MESSAGE flag set
which seems correct, however the
interruptDescTranslated->u.MessageInterrupt.Raw.MessageCount
element always indicates 0. Shouldn’t this be at least 1 for my driver to even receive MSI
interrupts at all?

Is this an indication that I have misconfigured my driver or device PCI-config
space, and WDF has done automatic fallback to Legacy interrupt mapping somehow?
How could I determine if this was the case?

I downloaded a trial version of the PCIScope tool to more easily inspect my PCI
config space registers, after my driver is loaded and the device is created. In
PCIconfig location 0x52 (Message Control for MSI) is value 0x0089. For bit
interpretation, it says that my MMC field (Multiple Message Capable) is 4, but
my MMEN field (Multiple Message ENable) is 0 .

Please let me know how I can properly configure multiple MSI interrupts for my device.

Thank You.

Best Regards,
Ravi Shankar JV.

How many messages does your device attempt to use?

To confirm: We’re talking about MSI, *not* MSI-X, correct?

Peter
OSR
@OSRDrivers

xxxxx@hotmail.com wrote:

Is this an indication that I have misconfigured my driver or device PCI-config
space, and WDF has done automatic fallback to Legacy interrupt mapping somehow?
How could I determine if this was the case?

Do you have the magic registry entries in your INF to enable MSI?


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

Hi Tim and Peter,
Please find my answers below.

I did enable MSI in my INX file.

HKR, Interrupt Management, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, 0x00010001, 1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, 0x00010001, 8
HKR, Interrupt Management\Affinity Policy, DevicePriority, 0x00010001, 3

4 messages.

I am referring to MSI and not MSI-X.

Why does your registry setting say 8, if your device only wants 4?

Change your registry setting so that it is correct and see what happens.

Peter
OSR
@OSRDrivers