Hi
I have question regarding KInterrupt Object. I am using MSIX in my PCIe device driver.
After IoConnectInterruptEx() returns, the MessageCount returned is 1. what
is the relationship between the field “InterruptObject” returned from the
IO_INTERRUPT_MESSAGE_INFO_ENTRY data struct and the Interrupt[in] parameter passed into my InterruptMessageService routine. They are both the type of “struct _KINTERRUPT *”.Should they be same?
Thanks,
Ying
xxxxx@yahoo.ca wrote:
I have question regarding KInterrupt Object. I am using MSIX in my PCIe device driver.
After IoConnectInterruptEx() returns, the MessageCount returned is 1. what
is the relationship between the field “InterruptObject” returned from the
IO_INTERRUPT_MESSAGE_INFO_ENTRY data struct and the Interrupt[in] parameter passed into my InterruptMessageService routine. They are both the type of “struct _KINTERRUPT *”.Should they be same?
Why would you possibly care?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Tim,
Thank you for your response. The reason I am asking the question is that they are both associated with how to set up interrupt handling mechanism for MSIX. Is that possible that you can answer my question directly?
Thanks,
Ying
xxxxx@yahoo.ca wrote:
The reason I am asking the question is that they are both associated with how to set up interrupt handling mechanism for MSIX. Is that possible that you can answer my question directly?
They should be the same. Is that what you are seeing?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Tim,
Thanks for your response. They are not the same. I am using Windows 2012 server. To compare,
I print out the one from IO_INTERRUPT_MESSAGE_INFO_ENTRY data struct after I call
IoConnectInterruptEx() successfully and then print out the one passed in as the first argument
into my MessageService routine when my isr is triggered. Why are they different?
Thanks,
Ying
On Jun 26, 2015, at 12:30 PM, xxxxx@yahoo.ca wrote:
Thanks for your response. They are not the same. I am using Windows 2012 server. To compare,
I print out the one from IO_INTERRUPT_MESSAGE_INFO_ENTRY data struct after I call
IoConnectInterruptEx() successfully and then print out the one passed in as the first argument
into my MessageService routine when my isr is triggered. Why are they different?
I don’t know, but if your service routine is getting fired, why do you care? You’re talking about a Windows kernel implementation detail. Maybe they are copying the structure. Maybe the first structure is getting a copy. The relationship is not documented.
—
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
In the interest of curiosity:
No. There is one KINTERRUPT per CPU, as it is used for form the link between the interrupt vector and the ISR. On x86/x64 machines, the IDT entry points to code in the KINTERRUPT, that in turn saves some information and points to code in the Windows interrupt dispatcher.
In any case, as Mr. Roberts said… this i is an implementation detail with no impact on driver development.
Peter
OSR
@OSRDrivers
Actually, as of Windows 8.1, this is no longer true on x86 platforms.
As of Windows 10, this is no longer true on x64 platforms either.
And this was never true on ARM.
Not to disagree with Peter – in fact this only proves how much this is an “implementation detail” you needn’t worry about.
–
Best regards,
Alex Ionescu