source: rtems/c/src/lib/libbsp/m68k/shared/m68000spurious.c @ c186f2ed

4.115
Last change on this file since c186f2ed was c186f2ed, checked in by Joel Sherrill <joel.sherrill@…>, on 10/15/14 at 22:17:08

m68k/mvme162: Fix warnings

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 *  C3X Spurious Trap Handler
3 *
4 *  This is just enough of a trap handler to let us know what
5 *  the likely source of the trap was.
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.org/license/LICENSE.
13 */
14
15#include <bsp.h>
16#include <rtems/bspIo.h>
17
18/*
19 *  bsp_spurious_handler
20 *
21 *  Print a message on the debug console and then die
22 */
23
24void bsp_spurious_handler_assistant(
25  rtems_vector_number /*,
26  CPU_Interrupt_frame * */
27);
28
29rtems_isr bsp_spurious_handler(
30   rtems_vector_number  vector /*,
31   CPU_Interrupt_frame *isf */
32)
33{
34#if 0
35  printk( "Unexpected interrupt (0x%x)\n", vector );
36#else
37  char *s;
38
39/*
40  printk( "It looks like we got the interrupt at 0x%x\n", isf->interrupted );
41*/
42
43  /*
44   *  Can we print a name?
45   */
46  s = 0;
47  if ( vector <= 0x1f ) {
48    switch ( vector ) {
49      case 1:     s = "INT0";     break;
50      case 2:     s = "INT1";     break;
51      case 3:     s = "INT2";     break;
52      case 4:     s = "INT3";     break;
53      case 5:     s = "XINT0";    break;
54      case 6:     s = "RINT0";    break;
55      case 7:     s = "XINT1";    break;
56      case 8:     s = "RINT1";    break;
57      case 9:     s = "TINT0";    break;
58      case 0x0a:  s = "TINT1";    break;
59      case 0x0b:  s = "DINT0";    break;
60      case 0x0c:  s = "DINT1";    break;
61      default:    s = "Reserved"; break;
62    }
63    printk( "Looks like it was an %s\n", s );
64  } else {
65    printk( "Looks like it was a TRAP%d\n", vector - 0x20 );
66  }
67#endif
68
69  /*
70   *  Now call the BSP specific routine
71   */
72
73  bsp_spurious_handler_assistant( vector/* , 0 */ );
74}
Note: See TracBrowser for help on using the repository browser.