diff --git a/ntoskrnl/io/iomgr/irq.c b/ntoskrnl/io/iomgr/irq.c index a604be1d604..f82d58d44c1 100644 --- a/ntoskrnl/io/iomgr/irq.c +++ b/ntoskrnl/io/iomgr/irq.c @@ -166,4 +166,62 @@ IoDisconnectInterrupt(PKINTERRUPT InterruptObject) ExFreePool(IoInterrupt); // ExFreePoolWithTag(IoInterrupt, TAG_KINTERRUPT); } +NTSTATUS +IopConnectInterruptExFullySpecific( + _Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters) +{ + NTSTATUS Status; + PAGED_CODE(); + + /* Fallback to standard IoConnectInterrupt */ + Status = IoConnectInterrupt(Parameters->FullySpecified.InterruptObject, + Parameters->FullySpecified.ServiceRoutine, + Parameters->FullySpecified.ServiceContext, + Parameters->FullySpecified.SpinLock, + Parameters->FullySpecified.Vector, + Parameters->FullySpecified.Irql, + Parameters->FullySpecified.SynchronizeIrql, + Parameters->FullySpecified.InterruptMode, + Parameters->FullySpecified.ShareVector, + Parameters->FullySpecified.ProcessorEnableMask, + Parameters->FullySpecified.FloatingSave); + DPRINT("IopConnectInterruptEx_FullySpecific: has failed with status %X", Status); + return Status; +} + +NTSTATUS +NTAPI +IoConnectInterruptEx( + _Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters) +{ + PAGED_CODE(); + switch (Parameters->Version) + { + case CONNECT_FULLY_SPECIFIED: + return IopConnectInterruptExFullySpecific(Parameters); + case CONNECT_FULLY_SPECIFIED_GROUP: + //TODO: We don't do anything for the group type + return IopConnectInterruptExFullySpecific(Parameters); + case CONNECT_MESSAGE_BASED: + DPRINT1("FIXME: Message based interrupts are UNIMPLEMENTED\n"); + break; + case CONNECT_LINE_BASED: + DPRINT1("FIXME: Line based interrupts are UNIMPLEMENTED\n"); + break; + } + return STATUS_SUCCESS; +} + +VOID +NTAPI +IoDisconnectInterruptEx( + _In_ PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters) +{ + PAGED_CODE(); + + //FIXME: This eventually will need to handle more cases + if (Parameters->ConnectionContext.InterruptObject) + IoDisconnectInterrupt(Parameters->ConnectionContext.InterruptObject); +} + /* EOF */ diff --git a/ntoskrnl/ntoskrnl.spec b/ntoskrnl/ntoskrnl.spec index ced05f9a8bd..fe90fb7fdfd 100644 --- a/ntoskrnl/ntoskrnl.spec +++ b/ntoskrnl/ntoskrnl.spec @@ -362,6 +362,7 @@ @ stdcall IoCheckShareAccess(long long ptr ptr long) @ stdcall IoCompleteRequest(ptr long) @ stdcall IoConnectInterrupt(ptr ptr ptr ptr long long long long long long long) +@ stdcall -version=0x600+ IoConnectInterruptEx(ptr) @ stdcall IoCreateController(long) @ stdcall IoCreateDevice(ptr long ptr long long long ptr) @ stdcall IoCreateDisk(ptr ptr) @@ -390,6 +391,7 @@ @ extern IoDeviceHandlerObjectType @ extern IoDeviceObjectType @ stdcall IoDisconnectInterrupt(ptr) +@ stdcall -version=0x600+ IoDisconnectInterruptEx(ptr) @ extern IoDriverObjectType @ stdcall IoEnqueueIrp(ptr) @ stdcall IoEnumerateDeviceObjectList(ptr ptr long ptr)