MSI-X Interrupts

Hi,

I am writing driver for a PCI Express card.

I am trying to find

  1. How to register and initialize MSI-X interrupts?
  2. How to access MSI-X Capability?

I tried looking in the WDK documentation – it only talks about
registering MSI-X interrupts for a network device – mine is not a
network device.

I would greatly appreciate any kind of help and pointers in this regard.

Thanks in advance,
Vidya

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, March 27, 2008 8:50 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DDK environment variables in ‘normal’ cmd window?

Scott, this does not sound correct. Indeed, I have that same DDK
installed
in lots of places and I checked two of them - neither does this.

Perhaps you (or some gremlin trying to help you) did one of the
following:

  • Added all of those variable to the system environment?
  • You are starting a shortcut for CMD.EXE that calls setenv in the ddk?
  • Some convoluted AUTOEXEC.* exists on your system and is picked up by
    CMD.EXE?

I think your situation is rather unique to your system and caused by
local
factors.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Robins, Scott
Sent: Thursday, March 27, 2008 11:31 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DDK environment variables in ‘normal’ cmd window?

This may have been true all along, and I just noticed it.

But all of the DDK (3790.1830) build environment variables are set when
I start up a ‘normal’ command prompt as well as when I start a DDK build
environment command prompt. Even if I type “cmd” at the Run prompt. Is
this normal?

I also have 6001.18000 installed, but none of it’s environment variables
show up. As a matter of fact, I just started up a 6001.18000 command
prompt and it complained that the ddk environment was already set up.
So this must be a problem. Anyone know how I got myself into this
situation and how I can back myself out?

Thanks,
ScottR


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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

http://msdn2.microsoft.com/en-us/library/bb961249.aspx

  • Jake

“Dharmaraju, Vidyadhari” wrote in
message news:xxxxx@ntdev…
>
> Hi,
>
> I am writing driver for a PCI Express card.
>
> I am trying to find
>
> 1. How to register and initialize MSI-X interrupts?
> 2. How to access MSI-X Capability?
>
> I tried looking in the WDK documentation – it only talks about
> registering MSI-X interrupts for a network device – mine is not a
> network device.
>
> I would greatly appreciate any kind of help and pointers in this
> regard.
>
> Thanks in advance,
> Vidya
>
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David R.
> Cattley
> Sent: Thursday, March 27, 2008 8:50 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DDK environment variables in ‘normal’ cmd
> window?
>
> Scott, this does not sound correct. Indeed, I have that same DDK
> installed
> in lots of places and I checked two of them - neither does this.
>
> Perhaps you (or some gremlin trying to help you) did one of the
> following:
>
> - Added all of those variable to the system environment?
> - You are starting a shortcut for CMD.EXE that calls setenv in the
> ddk?
> - Some convoluted AUTOEXEC.* exists on your system and is picked up
> by
> CMD.EXE?
>
> I think your situation is rather unique to your system and caused by
> local
> factors.
>
> -dave
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Robins, Scott
> Sent: Thursday, March 27, 2008 11:31 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] DDK environment variables in ‘normal’ cmd window?
>
> This may have been true all along, and I just noticed it.
>
> But all of the DDK (3790.1830) build environment variables are set
> when
> I start up a ‘normal’ command prompt as well as when I start a DDK
> build
> environment command prompt. Even if I type “cmd” at the Run prompt.
> Is
> this normal?
>
> I also have 6001.18000 installed, but none of it’s environment
> variables
> show up. As a matter of fact, I just started up a 6001.18000
> command
> prompt and it complained that the ddk environment was already set
> up.
> So this must be a problem. Anyone know how I got myself into this
> situation and how I can back myself out?
>
> Thanks,
> ScottR
>
> —
> NTDEV is sponsored by OSR
>
> 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
>
>
> —
> NTDEV is sponsored by OSR
>
> 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
>

I am assuming Driver for your device is a WDM driver and not a Miniport Driver.

To enable MSI you need to do two things.

  1. Indicate support in INF in YourDevice.HW Section.

the section would be like this
[YOURDEVICE.HW]]
; MSI Support
HKR, “Interrupt Management”, 0x00000010
HKR, “Interrupt Management\MessageSignaledInterruptProperties”, 0x00000010
HKR, “Interrupt Management\MessageSignaledInterruptProperties”, MSISupported, 0x00010001, 0

  1. Driver Code which Call IoConnectInterruptEx with CONNECT_MESSAGE_BASED.
    There is a code snippet example for this at following link.
    http://www.microsoft.com/whdc/archive/MSI.mspx

For Miniport Drivers mostly the code part of calling IoConnectInterruptEx is done by corresponding port drivers and Miniport Driver just need to indicate support via INF. For example for Graphics Miniport driver the IoConnectInterruptEx is called by Dxgkrnl(Port Driver) and miniport driver just need to indicate support in its INF.

-Dhiren

In addition to above…
The INF snippet is wrote above should have MessageSignalledInterruptProperties value set to 1.

HKR, “Interrupt Management\MessageSignaledInterruptProperties”, MSISupported,
0x00010001, 1