ManiS
2010-07-16 19:30:16 UTC
I have a hardware that exhibits only MSI-X (4 vectors) and no INTX support,
and am developing a Win Server 2008 x64 driver for it.
I tried using this IoConnectInterruptEx with MessageBased option with fields
filled in:
struct {
PDEVICE_OBJECT PhysicalDeviceObject; == PDO of my device
union {
PVOID *Generic; == ptr to my IntMessageTable
PIO_INTERRUPT_MESSAGE_INFO *InterruptMessageTable;
PKINTERRUPT *InterruptObject;
} ConnectionContext;
PKMESSAGE_SERVICE_ROUTINE MessageServiceRoutine; = my int handler code
PVOID ServiceContext; == my FDO
PKSPIN_LOCK SpinLock; = NULL
KIRQL SynchronizeIrql; == PassiveLevel
BOOLEAN FloatingSave; = 0
PKSERVICE_ROUTINE FallBackServiceRoutine; = NULL
} MessageBased;
This does work in most cases and I do get my MSI-X interrupts allocated and
driver loads.
But in cases when I introduce other hardware in the server that also use
MSI-X, my driver fails to load with code 10 (IoCOnnectInterruptEx fails with
error code 0xc000 00bb - STATUS_NOT_SUPPORTED).
After some more hours of debugging, I decided to put in a dummy function
pointer for the FALLBACKSERVICEROUTINE pointer in the MessageBased Structure
- And that helped! Now my driver loads always without any issues and it only
gets MSI-X vectors.
This seems strange that I have to give a line based interrupt handling
function pointer when I know my hardware only supports MSI-x and I am also
asking only for MSI-X.
Anybody has seen this?
Thanks
Mani
and am developing a Win Server 2008 x64 driver for it.
I tried using this IoConnectInterruptEx with MessageBased option with fields
filled in:
struct {
PDEVICE_OBJECT PhysicalDeviceObject; == PDO of my device
union {
PVOID *Generic; == ptr to my IntMessageTable
PIO_INTERRUPT_MESSAGE_INFO *InterruptMessageTable;
PKINTERRUPT *InterruptObject;
} ConnectionContext;
PKMESSAGE_SERVICE_ROUTINE MessageServiceRoutine; = my int handler code
PVOID ServiceContext; == my FDO
PKSPIN_LOCK SpinLock; = NULL
KIRQL SynchronizeIrql; == PassiveLevel
BOOLEAN FloatingSave; = 0
PKSERVICE_ROUTINE FallBackServiceRoutine; = NULL
} MessageBased;
This does work in most cases and I do get my MSI-X interrupts allocated and
driver loads.
But in cases when I introduce other hardware in the server that also use
MSI-X, my driver fails to load with code 10 (IoCOnnectInterruptEx fails with
error code 0xc000 00bb - STATUS_NOT_SUPPORTED).
After some more hours of debugging, I decided to put in a dummy function
pointer for the FALLBACKSERVICEROUTINE pointer in the MessageBased Structure
- And that helped! Now my driver loads always without any issues and it only
gets MSI-X vectors.
This seems strange that I have to give a line based interrupt handling
function pointer when I know my hardware only supports MSI-x and I am also
asking only for MSI-X.
Anybody has seen this?
Thanks
Mani