source: rtems/c/src/lib/libcpu/mips/r46xx/vectorisrs/vectorisrs.c @ 7c05d28

4.104.114.84.95
Last change on this file since 7c05d28 was 7c05d28, checked in by Joel Sherrill <joel.sherrill@…>, on May 24, 2001 at 7:54:22 PM

2000-05-24 Joel Sherrill <joel@…>

  • mongoosev/include/mongoose-v.h, mongoosev/vectorisrs/vectorisrs.c, r46xx/vectorisrs/vectorisrs.c, tx39/vectorisrs/vectorisrs.c, tx39/include/tx3904.h: All exceptions were given low numbers and thus can be now be installed and processed in a uniform manner just like interrupts. Variances between various MIPS ISA levels are not accounted for at this time.
  • mongoosev/vectorisrs/Makefile.am, mongoosev/vectorisrs/maxvectors.c, r46xx/vectorisrs/Makefile.am, r46xx/vectorisrs/maxvectors.c, tx39/vectorisrs/Makefile.am, tx39/vectorisrs/maxvectors.c, shared/interrupts/maxvectors.c, shared/interrupts/Makefile.am: Split the shared maxvectors.c into a variety of CPU model specific versions to simplify the build process and reduce depdencies. Deleted shared/interrupts/maxvectors.c and created various CPU model versions.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 *  $Id$
3 */
4
5#include <rtems.h>
6#include <stdlib.h>
7
8
9void mips_default_isr( int vector );
10
11#define CALL_ISR(_vector,_frame) \
12  do { \
13    if ( _ISR_Vector_table[_vector] ) \
14      (_ISR_Vector_table[_vector])(_vector,_frame); \
15    else \
16      mips_default_isr(_vector); \
17  } while (0)
18
19#include <bspIo.h>  /* for printk */
20
21void mips_vector_isr_handlers( CPU_Interrupt_frame *frame )
22{
23  unsigned int sr;
24  unsigned int cause;
25  unsigned int i;
26  unsigned int mask;
27
28  mips_get_sr( sr );
29  mips_get_cause( cause );
30
31  cause &= (sr & SR_IMASK);
32  cause >>= CAUSE_IPSHIFT;
33
34  /* XXX check this and think about it. */
35
36  for ( i=1, mask=0x80 ; i<=8 ; i++, mask >>= 1 ) {
37    if ( cause & mask )
38      CALL_ISR( MIPS_EXCEPTION_BASE + 8 - i, frame );
39  }
40}
41
42void mips_default_isr( int vector )
43{
44  unsigned int sr;
45  unsigned int cause;
46
47  mips_get_sr( sr );
48  mips_get_cause( cause );
49
50  printk( "Unhandled isr exception: vector 0x%02x, cause 0x%08X, sr 0x%08X\n",
51    vector, cause, sr );
52  rtems_fatal_error_occurred(1);
53}
54
Note: See TracBrowser for help on using the repository browser.