source: rtems/c/src/lib/libbsp/m68k/mrm332/spurious/spinit.c @ 0b6d74d0

4.104.114.84.95
Last change on this file since 0b6d74d0 was 0b6d74d0, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 4, 2002 at 2:26:48 PM

2002-11-04 Joel Sherrill <joel@…>

  • console/sci.c, spurious/spinit.c: Removed warnings.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*  Spurious_driver
2 *
3 *  This routine installs spurious interrupt handlers for the mrm.
4 *
5 *  Input parameters:  NONE
6 *
7 *  Output parameters:  NONE
8 *
9 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.OARcorp.com/rtems/license.html.
15 *
16 *  $Id$
17 */
18
19#include <bsp.h>
20#include <stdio.h>
21
22const char * const _Spurious_Error_[] = {"Reset","Bus Error","Address Error",
23   "Illegal Instruction","Zero Division","CHK, CHK2 Instruction",
24   "TRAPcc, TRAPV Instruction","Privilege Violation","Trace",
25   "Line 1010 Emulation","Line 1111 Emulation","Hardware Breakpoint",
26   "Coprocessor Protocal Violation",
27   "Format Error ans Uninitialized Interrupt","Unassigned",
28   "Spurious Interrupt","AVec1","AVec2","AVec3","AVec4","AVec5","AVec6",
29   "AVec7","Trap Instruction","Debug","Reboot","Reserved Coprocessor",
30   "Reserved Unassigned","User Defined"};
31
32rtems_isr Spurious_Isr(
33  rtems_vector_number vector
34)
35{
36  //int sp = 0;
37#if 0
38  const char * const VectDescrip[] = {
39    _Spurious_Error_[0],   _Spurious_Error_[0],  _Spurious_Error_[1],
40    _Spurious_Error_[2],   _Spurious_Error_[3],  _Spurious_Error_[4],
41    _Spurious_Error_[5],   _Spurious_Error_[6],  _Spurious_Error_[7],
42    _Spurious_Error_[8],   _Spurious_Error_[9], _Spurious_Error_[10],
43    _Spurious_Error_[11], _Spurious_Error_[12], _Spurious_Error_[13],
44    _Spurious_Error_[13], _Spurious_Error_[14], _Spurious_Error_[14],
45    _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
46    _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
47    _Spurious_Error_[15], _Spurious_Error_[16], _Spurious_Error_[17],
48    _Spurious_Error_[18], _Spurious_Error_[19], _Spurious_Error_[20],
49    _Spurious_Error_[21], _Spurious_Error_[22], _Spurious_Error_[23],
50    _Spurious_Error_[24], _Spurious_Error_[23], _Spurious_Error_[23],
51    _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
52    _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
53    _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
54    _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[25],
55    _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
56    _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
57    _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
58    _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[27],
59    _Spurious_Error_[27], _Spurious_Error_[27], _Spurious_Error_[27],
60    _Spurious_Error_[27], _Spurious_Error_[28]};
61#endif
62
63  //asm volatile ( "movea.l   %%sp,%0 " : "=a" (sp) : "0" (sp) );
64
65  _CPU_ISR_Set_level( 7 );
66  //_UART_flush();
67#if 0
68  RAW_PUTS("\n\rRTEMS: Spurious interrupt: ");
69  RAW_PUTS((char *)VectDescrip[( (vector>64) ? 64 : vector )]);
70  RAW_PUTS("\n\rRTEMS:    Vector: ");
71  RAW_PUTI(vector);
72  RAW_PUTS(" sp: ");
73  RAW_PUTI(sp);
74  RAW_PUTS("\n\r");
75#endif
76  bsp_cleanup();
77
78  /* BDM SIGEMT */
79  asm("  .word  0x4afa");
80
81  for(;;);
82}
83
84void Spurious_Initialize(void)
85{
86  rtems_vector_number vector;
87
88  for ( vector = 0x0 ; vector <= 0xFF ; vector++ )
89    {
90      switch (vector)
91        {
92        case 4:
93        case 9:
94        case 31:
95        case 47:
96        case 66:
97          /* These vectors used by CPU32bug - don't overwrite them. */
98          break;
99
100        default:
101          (void) set_vector( Spurious_Isr, vector, 1 );
102          break;
103        }
104    }
105}
Note: See TracBrowser for help on using the repository browser.