Target address and data for MSI

Hi,
We’re adding MSI support to an existing WDM driver and ran into a problem.

Where do you find the find the target address and message data for a device to trigger an MSI?

I thought it should be in the raw resource list attached to the IRP_MN_START_DEVICE IRP (i.e. the MessageInterrupt.Raw.DataPayload and MessageInterrupt.Raw.MessageTargetAddress fields mentioned in “Interrupt Architecture Enhancements in Microsoft Windows Vista”) but these fields aren’t in the structure (at least not in version 6000 or 7600316385.1 of the DDK).

Do we have to read and decode it directly from the PCI config space?

Thanks,
Tom

xxxxx@audioscience.com wrote:

We’re adding MSI support to an existing WDM driver and ran into a problem.

Where do you find the find the target address and message data for a device to trigger an MSI?

You don’t, because you don’t need that. You can’t use that information
anyway. The system will call your ISR with the context information
when the interrupt happens. The rest is implementation detail.


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

Actually, Tim, there are valid reasons to want these things. It’s true that many implementations would never need to care.

Tom, look at IO_INTERRUPT_MESSAGE_TABLE_ENTRY, which is inside the message table returned from IoConnectInterruptEx when you connect the interrupt. (This is currently described at http://msdn.microsoft.com/en-us/library/windows/hardware/ff550579(v=vs.85).aspx but these links break every time the MSDN team has a whim.) You’ll have to use CONNECT_MESSAGE_BASED.

The whitepaper you’re looking at was based on a preview of Windows Vista. And putting the message address and data values in the raw resources turned out to break an odd corner of Device Manager, so that bit was backed out before Vista shipped.

  • Jake Oshins
    (former interrupt guy)
    Windows Kernel Team

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Wednesday, October 2, 2013 2:18 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Target address and data for MSI

xxxxx@audioscience.com wrote:

We’re adding MSI support to an existing WDM driver and ran into a problem.

Where do you find the find the target address and message data for a device to trigger an MSI?

You don’t, because you don’t need that. You can’t use that information
anyway. The system will call your ISR with the context information
when the interrupt happens. The rest is implementation detail.


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


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thank you Tim and Jake.

Tim, I assumed the driver would have to communicate these to the device firmware for it to trigger an MSI. I’m probably misunderstanding the mechanism on the DSP side. I’ll check into that.

Jake, that’s what I was looking for. thanks.

  • Tom

xxxxx@audioscience.com wrote:

Tim, I assumed the driver would have to communicate these to the device firmware for it to trigger an MSI. I’m probably misunderstanding the mechanism on the DSP side. I’ll check into that.

The configuration space memory (where the MSI parameters are written) is
part of the device. The device IP can read that information directly.
It doesn’t need to be told by the driver.


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