[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: shared irq problem
I am assuming you have the DDK and are using either wdeb386 or winice.
Once you virtualized the IRQ (with the VPICD_Opt_Can_Share flag) and
called VPICD_Physically_Unmask, make the device generate an interrupt
while you are stopped in the debugger, then do ..vpicd in the debugger.
Option 1 will tell you whether the interrupt is requested and whether it
is masked. If it is requested and not masked, it will fire (and become
in service) once you do 'g'o. Option 3 tells you who is on that
interrupt, so you can put a breakpoint on the first guy and see if he is
correctly passing it down (returning carry set so that VPICD calls the
next handler).
The proper code in your interrupt handler should be:
if (IsTheInterruptMine()) {
ClearTheCauseOfTheInterrupt();
VPICD_Phys_EOI();
ReturnCarryClear();
} else {
ReturnCarrySet();
}
Sounds like your problem is that the routine of the first guy does not
ever return with carry set. Be advised that writing an interrupt handler
in 'C' or with BeginProc macros may sometimes add an "add esp, x" before
returning which clear the carry.
>----------
>From: js@iras1.TN.CORNELL.EDU[SMTP:js@iras1.TN.CORNELL.EDU]
>Sent: Monday, July 08, 1996 6:37 PM
>To: Mailing List Recipients
>Subject: shared irq problem
>
>Greetings...
>
> I can't get shared interrupts (shared irq numbers) to work in
>my VxD.
>
> I have a PCI device with which I can generate hardware interrupts
>at will, and a VxD that virtualizes the irq via the VPICD VxD. This
>works as expected unless another PCI device is registered to use
>the same irq (INTLN=same_irq in PCI configuration), and then the
>interrupt service routine is never called. This other device can
>be a clone of the first, for which there are guaranteed no software
>drivers that might conflict with mine.
>
> I'm only virtualizing the irq once, the second device is not
>generating any interrupts (it's not active at all),
>VPICD_Virtualize_IRQ indicates successful completion, and I've
>tried VPICD_Opt_Can_Share.
>
> Please help!
>
> --Justin
>
>
€ p