A few BSPs have buggy ISR processing.

Joel Sherrill joel.sherrill at OARcorp.com
Wed Feb 12 15:07:32 UTC 2003



Till Straumann wrote:
> 
> Sergei Organov wrote:
> > While looking at ISR processing code in different BSPs I've noticed that a few
> > BSPs have bugs in the code. All the observations are made in the latest
> > 20030128 snapshot. The BSPs affected are:
> >
> > sh/sh7032
> > sh/sh7045
> > sh/sh7750
> 
> I have noticed the same (but only looked at 'sh')

As I said yesterday, except for the a29k all of the files listed 
derive from a common source which in turn was probably based upon
the C-ish psuedo code in no_cpu which was an interpretation of
an assembly port (probably m68k).  I think the C-ish no_cpu was
not perfect and the initial interpretation into real code 
may have inherited those and optimized the code into another one.
THe other two sh files and c4x copied that code.  

I have cleaned all files in questions, no_cpu, and the porting
manual.

--joel

> -- Till
> 
> > c4x
> > a29k
> >
> > The first 4 have the same bug:
> >
> > - if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
> > + if(( _Context_Switch_necessary) || (_ISR_Signals_to_thread_executing))
> >
> > Here are the relevant lines:
> >
> > rtems-ss-20030128/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c:305:      if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
> > rtems-ss-20030128/c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c:308:      if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
> > rtems-ss-20030128/c/src/lib/libcpu/sh/sh7750/score/cpu_asm.c:305:      if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
> > rtems-ss-20030128/cpukit/score/cpu/c4x/irq.c:77:    if (_Context_Switch_necessary || !_ISR_Signals_to_thread_executing ) {
> >
> > The a29k fails to reset _ISR_Signals_to_thread_executing to FALSE here:
> >
> > rtems-ss-20030128/cpukit/score/cpu/a29k/cpu.c:274:    (_Context_Switch_necessary || _ISR_Signals_to_thread_executing ))
> >
> >

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list