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

4.104.114.84.95
Last change on this file since 23e3ce64 was b812f84, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/00 at 20:01:14

Added sim68000 BSP for the BSVC simulator. This BSP includes the
alias simcpu32 that supports the CPU32 simulator in BSVC. At this
point, it is still under development.

  • 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.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#include <bsp.h>
18#include <bspIo.h>
19
20/*
21 *  bsp_spurious_handler
22 *
23 *  Print a message on the debug console and then die
24 */
25
26void bsp_spurious_handler_assistant(
27  rtems_vector_number /*,
28  CPU_Interrupt_frame * */
29);
30
31rtems_isr bsp_spurious_handler(
32   rtems_vector_number  vector /*,
33   CPU_Interrupt_frame *isf */
34)
35{
36  char *s;
37
38  printk( "Unexpected interrupt (0x%x)\n", vector );
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
47  s = 0;
48#if 0
49  if ( vector <= 0x1f ) {
50    switch ( vector ) {
51      case 1:     s = "INT0";     break;
52      case 2:     s = "INT1";     break;
53      case 3:     s = "INT2";     break;
54      case 4:     s = "INT3";     break;
55      case 5:     s = "XINT0";    break;
56      case 6:     s = "RINT0";    break;
57      case 7:     s = "XINT1";    break;
58      case 8:     s = "RINT1";    break;
59      case 9:     s = "TINT0";    break;
60      case 0x0a:  s = "TINT1";    break;
61      case 0x0b:  s = "DINT0";    break;
62      case 0x0c:  s = "DINT1";    break;
63      default:    s = "Reserved"; break;
64    }
65    printk( "Looks like it was an %s\n", s );
66  } else {
67    printk( "Looks like it was a TRAP%d\n", vector - 0x20 );
68  }
69#endif
70
71  /*
72   *  Now call the BSP specific routine
73   */
74
75  bsp_spurious_handler_assistant( vector/* , 0 */ );
76}
Note: See TracBrowser for help on using the repository browser.