Configuring HT Interrupts

Hi All,

I am writing a standard WDM driver for my PCI based device on Windows Server 2008 (64 bit). My device sits on HyperTransport(HT) IO link and configuring the HT interrupts for my device has become a problem. I understand that Windows do not support HT interrupts, but is there a way in which I can configure them?

I tried the following approach. I picked a vector range (200-255) assuming that these vectors will not be used. My call to IoConncetInterrupt succeeded for a vector I passed to it. Then, using this vector I configured the HT interrupt capability block in the config space of my device and I also picked up an unused IOAPIC entry and configured it accordingly. I have set the Destination Mode field in the free I/O Redirection table register of the IOAPIC to Logical mode and the Destination Field, which represents the set of processors to send the interrupt to, to 0xFF. In spite of doing these settings, my ISR is still not getting called. Is this configuration valid? I know that with this approach the PNP Manager will not be aware of the usage of the vector, but I want to see if it works. Is there anything wrong in what I have done? Please suggest a way to get around this problem.

Is there any HAL library available for HT interrupts?

Regards,
AY

> I also picked up an unused IOAPIC entry

What is “unused IOAPIC entry”??? Look - IOAPIC maps IRQs (in fact, IOAPIC pins) to vectors. If entry is not used, it means that no interrupt source is connected to this pin. In order to be able to map device interrupt to vector, one has, first of all, to get bus and device number, and obtain IOAPIC pin to which your device’s interrupts are routed, from BIOS tables. At this point you can already map this pin to vector

In spite of doing these settings, my ISR is still not getting called.

Hopefully, by now you understand why - there is nothing that associates your ISR with your device…

Is there anything wrong in what I have done?

Well, I would say absolutely everything that you do is wrong - from the very idea of implementing something that the OS does not support to the way you implement this idea…

Please suggest a way to get around this problem.

Just give it up…

Anton Bassov

Oops, sorry, I overlooked the fact that you are speaking about HyperTransport, which uses message-signaled interrupts. In such case, why are you speaking about IOAPIC, in the first place??? Please check Intel Manuals, and you will see how MSI interrupts have to be raised - they have nothing to do with IOAPIC. Instead, your device has to write to memory specified in Message Address Register…

Anton Bassov

Hi Anton,

Thanks for the pointers.
I shall look into manual and try to program this accordingly.

AY

> I shall look into manual and try to program this accordingly.

Well, I would not advise you to do it for any purpose, other than mere experimentation just in order to satisfy your curiosity. I can assure you that if you do it in a production driver you will almost ensure your device’s commercial failure - it will never get certified, it may probably get into a conflict with PatchGuard, etc,etc,etc…

Anton Bassov

Yes, I’ll be doing this exercise as an experiment. :slight_smile:
When I call IoConnectInterrupt with a random vector, say 201 and the function returns STATUS_SUCCESS, can I be sure that an entry is created in the IDT for this vector?

Will there be any log entry created if an Interrupt is missed in windows? If so, where will be this logged?

Best Regards,
AY

xxxxx@gmail.com wrote:

I am writing a standard WDM driver for my PCI based device on Windows Server 2008 (64 bit). My device sits on HyperTransport(HT) IO link and configuring the HT interrupts for my device has become a problem. I understand that Windows do not support HT interrupts, but is there a way in which I can configure them?

I’m a little confused by this. Since the device is really PCI, you must
have a PCI-to-HyperTransport bridge on your board. The key, then, is to
configure the bridge to pass the HT interrupts through to PCI
correctly. YOU shouldn’t be dinking with the IOAPIC. You just need to
set up the bridge properly.

Is there any HAL library available for HT interrupts?

No, because Windows doesn’t see the HyperTransport bus. Windows sees PCI.


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

> The key, then, is to configure the bridge to pass the HT interrupts through to PCI correctly.

Well, the OS still has to configure CPU’s local APIC so that it understands that it should raise interrupt when device writes to the memory specified in Message Address Register. Unless it does the above you are out of luck even if your device is MSI-capable. What the OP tries to do here is more or less the same thing Alberto was trying to do a year ago when he wanted to make his device to make use of its MSI capabilities under XP…

Anton Bassov