Re: IRQ Sharing with PCI Device
- From: already5chosen@xxxxxxxxx
- Date: 19 Oct 2006 11:12:42 -0700
bbartson wrote:
already5chosen@xxxxxxxxx wrote:
bbartson wrote:
Hello,
I've inherited a windows driver that was designed for the NT4 style
architecture (non-PNP and non-WDM).
<snip>
My problem is this old NT4 style driver fails when it tries to allocate interrupts.
The interrupt allocation fails with STATUS_CONFLICTING_ADDRESSES. This error code comes from
IoAssignResources.
Nt4-style PCI drivers must use HalAssignSlotResources(). All other
approaches are conflict-prone.
Of course, if backward compatibility is not required you could just
convert everything to WDM. Then instead of being at mercy of BIOS
vendor you end up at mercy of Microsoft. I'm not sure which one is
worse :(
Thanks for the reply. So I've started using HalAssignSlotResources
however now I get an error from IoConnectInterrupt
(STATUS_INVALID_PARAMETER = 0xC000000D). Is there some other call I
should be using instead of this?
IoConnectInterrupt() is o.k. but you should map interrupt vector
obtained from HalAssignSlotResources via HalGetInterruptVector().
Something like that:
KIRQL mapped_system_Irql = pPartialDescriptor->u.Interrupt.Level,
KAFFINITY mapped_system_Affinity =
pPartialDescriptor->u.Interrupt.Affinity;
ULONG mapped_system_vector = HalGetInterruptVector(PCIBus,
BusNumber,
pPartialDescriptor->u.Interrupt.Level,
pPartialDescriptor->u.Interrupt.Vector,
&mapped_system_Irql,
&mapped_system_Affinity);
status = IoConnectInterrupt(
&m_InterruptObject,
Isr,
context,
NULL,
mapped_system_vector,
mapped_system_Irql,
mapped_system_Irql,
LevelSensitive,
TRUE,
mapped_system_Affinity,
FALSE);
.
- Follow-Ups:
- Re: IRQ Sharing with PCI Device
- From: bbartson
- Re: IRQ Sharing with PCI Device
- References:
- IRQ Sharing with PCI Device
- From: bbartson
- Re: IRQ Sharing with PCI Device
- From: already5chosen
- Re: IRQ Sharing with PCI Device
- From: bbartson
- IRQ Sharing with PCI Device
- Prev by Date: Is this a difference in behaviour b/w WDM and KMDF
- Next by Date: Re: Unclear fakemodem kmdf sample behavior
- Previous by thread: Re: IRQ Sharing with PCI Device
- Next by thread: Re: IRQ Sharing with PCI Device
- Index(es):
Relevant Pages
|