Commit Graph

12 Commits

Author SHA1 Message Date
Joel Sherrill
b73e57bffe Patch from Jiri Gaisler <jgais@ws.estec.esa.nl>:
+ interrupt masking correction
  + FPU rev.B workaround
  + minor erc32 related fixes
1999-07-09 17:08:48 +00:00
Joel Sherrill
123ddae0e3 Moved erc32.h back up in tree. 1999-02-19 23:33:25 +00:00
Joel Sherrill
77138089c5 Moved to proper rtems/score 1999-02-19 23:26:19 +00:00
Joel Sherrill
16a9ee1d06 Bug report from Jiri Gaisler <jgais@ws.estec.esa.nl>:
> > I think I have found a bug in src/exec/scor/sparc/cpu/erc32.h in:
> >
> > #define ERC32_Disable_interrupt( _source, _previous ) \
> >   do { \
> >     unsigned32 _level; \
> >     unsigned32 _mask = 1 << (_source); \
> >     \
> >     sparc_disable_interrupts( _level ); \
> >       (_previous) = ERC32_MEC.Interrupt_Mask; \
> >       ERC32_MEC.Interrupt_Mask = _previous | _mask; \
> >     sparc_enable_interrupts( _level ); \
> >     (_previous) &= ~_mask; \                  <- IS THIS CORRECT...?
> >   } while (0)
> >
> > The previous interrupt mask is returned after first clearing the
> > bit to be disabled, regardless whether the bit was set before or
> > not. If the bit was set (interrupt masked), subsequent call to
> > ERC32_Restore_interrupt() will enable the interrupt even though
> > it was supposed to be masked. This is indeed what happens in
> > DEBUG_puts when polled console I/O is used. In my opinion, the
> > last statement in the macro should be removed - what is your opinion?
>
> I think the "~" shouldn't be there.  I recall that the intent of that line
> is to only return the state of the interrupts you were concerned with.
> Removing the line returns entire state.  Given that the value returned
> shuold only be used in conjunction with the map, I suppose either removing
> the ~ or the entire line is correct?   I can go either way.  Just let me
> know which you think is more correct and the source will change. :)

Hmmm, just removing the '~' should be OK. DEBUG_puts() seems to be the
only user of ERC32_Restore_interrupt() anyway ...
1999-01-13 14:13:47 +00:00
Joel Sherrill
60b791ada1 updated copyright to 1998 1998-02-17 23:46:28 +00:00
Joel Sherrill
98e4ebf594 Fixed typo in the pointer to the license terms. 1997-10-08 15:45:54 +00:00
Joel Sherrill
03f2154e51 headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.
1997-04-22 17:20:27 +00:00
Joel Sherrill
e1a06d1bae Changes to reflect new revision of erc32 per Jiri Gaisler's suggestions.
This is current as of sis 2.6.
1996-12-02 22:47:38 +00:00
Joel Sherrill
2d0383b60e patches to erc32.h to correct handling of timer mirror from Jiri Gaisler. 1996-10-14 19:17:37 +00:00
Joel Sherrill
66e519c1c1 ERC32_Force_interrupt implementation replaced per Jiri Gaisler's experience
on the real erc32 hardware.
1996-08-08 16:52:24 +00:00
Joel Sherrill
c4808ca59f typos fixed 1995-10-31 21:28:16 +00:00
Joel Sherrill
97005786d8 SPARC port passes all tests 1995-10-30 21:54:45 +00:00