* [ECOS] Bug in i386 interrupt handler
@ 2000-10-31 11:54 Phil Hinton
2000-10-31 15:25 ` Jonathan Larmour
0 siblings, 1 reply; 4+ messages in thread
From: Phil Hinton @ 2000-10-31 11:54 UTC (permalink / raw)
To: Ecos-List (E-mail)
Hi,
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
(ecos\packages\hal\i386\arch\current\src\vectors.S).
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
called:
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
phil@crosstor.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Bug in i386 interrupt handler
2000-10-31 11:54 [ECOS] Bug in i386 interrupt handler Phil Hinton
@ 2000-10-31 15:25 ` Jonathan Larmour
2000-11-01 8:47 ` Phil Hinton
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2000-10-31 15:25 UTC (permalink / raw)
To: Phil Hinton; +Cc: Ecos-List (E-mail)
Phil Hinton wrote:
>
> The hal_intc_ack macro then uses EAX, and when interrupt_end is
> called:
>
> 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?
This does indeed look like it would be a problem. If you can just confirm
that this does fix your problem, I'll update our code here.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Bug in i386 interrupt handler
2000-10-31 15:25 ` Jonathan Larmour
@ 2000-11-01 8:47 ` Phil Hinton
0 siblings, 0 replies; 4+ messages in thread
From: Phil Hinton @ 2000-11-01 8:47 UTC (permalink / raw)
To: Jonathan Larmour; +Cc: Ecos-List (E-mail)
Jonathan Larmour wote:
> Phil Hinton wrote:
> >
> > The hal_intc_ack macro then uses EAX, and when interrupt_end is
> > called:
> >
> > 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?
>
> This does indeed look like it would be a problem. If you can just confirm
> that this does fix your problem, I'll update our code here.
>
The SCSII interrupt handling is now working as expected. I also stepped
through the (assembly level) code to make sure the behavior is as expected.
The problem is fixed.
> Jifl
> --
> Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
> "Plan to be spontaneous tomorrow." || These opinions are all my own fault
>
Phil Hinton
CrosStor Software, Inc.
908-226-0100 ext 138
phil@crosstor.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [ECOS] Bug in i386 interrupt handler
@ 2000-10-31 18:19 Fabrice Gautier
0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Gautier @ 2000-10-31 18:19 UTC (permalink / raw)
To: 'Phil Hinton', Ecos-List (E-mail)
> -----Original Message-----
> From: Phil Hinton [ mailto:phil@crosstor.com ]
> Subject: [ECOS] Bug in i386 interrupt handler
>
> Did I miss a patch? Anyone having trouble with i386 PC DSR posts?
I didn't experienced any problem but it really looks like I should have.
Thanks
--
Fabrice Gautier
fabrice_gautier@sdesigns.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-11-01 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-31 11:54 [ECOS] Bug in i386 interrupt handler Phil Hinton
2000-10-31 15:25 ` Jonathan Larmour
2000-11-01 8:47 ` Phil Hinton
2000-10-31 18:19 Fabrice Gautier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).