[ECOS] Bug in i386 interrupt handler

Phil Hinton phil@crosstor.com
Tue Oct 31 11:54:00 GMT 2000


I've been trying to get SCSII interrupt drivers working on the i386 PC
eCos using the latest tree from anoncvs, plus various patches from
Fabrice (PCI config, multi-thread, etc).

In our implementation, DSR's were being posted for the SCSII interrupt 
even though the interrupt handler returns CYG_ISR_HANDLED only.

After further investigation I found a bug in hal_pc_irq

hal_pc_irq calls the interrupt handler, invokes the hal_intc_ack macro,
then calls interrupt_end.

When the interrupt handler returns, EAX has its returned value, which is
to be passed as an argument to interrupt_end. Since the hal_intc_ack 
macro uses the EAX register, it is first stored to ESI by:

            movl %eax, %esi

The hal_intc_ack macro then uses EAX, and when interrupt_end is

             pushl %edx
             pushl %eax
             call interrupt_end

Instead this should be:

             pushl %edx
             pushl %esi   <----  modification
             call interrupt_end

Did I miss a patch? Anyone having trouble with i386 PC DSR posts?

Phil Hinton
CrosStor Software, Inc.
908-226-0100 ext 138

More information about the Ecos-discuss mailing list