source: rtems/c/src/lib/libbsp/powerpc/ppcn_60x/startup/spurious.c @ e4071cf

4.104.114.84.95
Last change on this file since e4071cf was 0c04c377, checked in by Joel Sherrill <joel.sherrill@…>, on 02/18/99 at 16:48:14

./clock/Makefile.in,v
./clock/clock.c,v
./console/Makefile.in,v
./console/config.c,v
./console/console.c,v
./console/console.h,v
./console/debugio.c,v
./console/i8042.c,v
./console/i8042_p.h,v
./console/i8042vga.c,v
./console/i8042vga.h,v
./console/ns16550.c,v
./console/ns16550.h,v
./console/ns16550_p.h,v
./console/ns16550cfg.c,v
./console/ns16550cfg.h,v
./console/vga.c,v
./console/vga_p.h,v
./console/z85c30.c,v
./console/z85c30.h,v
./console/z85c30_p.h,v
./console/z85c30cfg.c,v
./console/z85c30cfg.h,v
./include/Makefile.in,v
./include/bsp.h,v
./include/chain.h,v
./include/coverhd.h,v
./include/extisrdrv.h,v
./include/nvram.h,v
./include/pci.h,v
./include/tod.h,v
./network/Makefile.in,v
./network/amd79c970.c,v
./network/amd79c970.h,v
./nvram/Makefile.in,v
./nvram/ds1385.h,v
./nvram/mk48t18.h,v
./nvram/nvram.c,v
./nvram/prepnvr.h,v
./nvram/stk11c68.h,v
./pci/Makefile.in,v
./pci/pci.c,v
./start/Makefile.in,v
./start/start.s,v
./startup/Makefile.in,v
./startup/bspclean.c,v
./startup/bspstart.c,v
./startup/bsptrap.s,v
./startup/device-tree,v
./startup/genpvec.c,v
./startup/linkcmds,v
./startup/rtems-ctor.cc,v
./startup/sbrk.c,v
./startup/setvec.c,v
./startup/spurious.c,v
./startup/swap.c,v
./timer/Makefile.in,v
./timer/timer.c,v
./tod/Makefile.in,v
./tod/cmos.h,v
./tod/tod.c,v
./universe/Makefile.in,v
./universe/universe.c,v
./vectors/Makefile.in,v
./vectors/README,v
./vectors/align_h.s,v
./vectors/vectors.s,v
./wrapup/Makefile.in,v
./Makefile.in,v
./README,v
./STATUS,v
./bsp_specs,v

  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*
2 *  PPCn_60x 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 *  Based upon the SPARC ERC32 version which was developed as
8 *  part of the port of RTEMS to the ERC32 implementation
9 *  of the SPARC by On-Line Applications Research Corporation (OAR)
10 *  under contract to the European Space Agency (ESA).
11 *
12 *  COPYRIGHT (c) 1995. European Space Agency.
13 *
14 *  This terms of the RTEMS license apply to this file.
15 *
16 *  $Id$
17 */
18
19#include <bsp.h>
20
21#include <string.h>
22
23static const char digits[16] = "0123456789abcdef";
24
25rtems_isr bsp_stub_handler(
26   rtems_vector_number trap
27)
28{
29}
30
31/*
32 *  bsp_spurious_handler
33 *
34 *  Print a message on the debug console and then die
35 */
36rtems_isr bsp_spurious_handler(
37   rtems_vector_number trap
38)
39{
40
41
42
43  DEBUG_puts( "Spurious Trap" );
44 
45  switch ( trap ) {
46    case PPC_IRQ_SYSTEM_RESET:
47      DEBUG_puts( "System reset" );
48      break;
49    case PPC_IRQ_MCHECK:
50      DEBUG_puts( "Machine check" );
51      break;
52    case PPC_IRQ_PROTECT:
53      DEBUG_puts( "DSI" );
54      break;
55    case PPC_IRQ_ISI:
56      DEBUG_puts( "ISI" );
57      break;
58    case PPC_IRQ_EXTERNAL:
59      DEBUG_puts( "External interupt" );
60      break;
61    case PPC_IRQ_ALIGNMENT:
62      DEBUG_puts( "Alignment Exception" );
63      break;
64    case PPC_IRQ_PROGRAM:
65      DEBUG_puts( "Program" );
66      break;
67    case PPC_IRQ_NOFP:
68      DEBUG_puts( "Floating point unavailable" );
69      break;
70    case PPC_IRQ_DECREMENTER:
71      DEBUG_puts( "Decrementer" );
72      break;
73    case PPC_IRQ_RESERVED_A:
74      DEBUG_puts( "Reserved 0x00a00" );
75      break;
76    case PPC_IRQ_RESERVED_B:
77      DEBUG_puts( "Reserved 0x00b00" );
78      break;
79    case PPC_IRQ_SCALL:
80      DEBUG_puts( "System call" );
81      break;
82    case PPC_IRQ_TRACE:
83      DEBUG_puts( "Trace" );
84      break;
85    case PPC_IRQ_FP_ASST:
86      DEBUG_puts( "Floating point Assist" );
87      break;
88
89#if defined(ppc403)
90#error "Please fill in names. "                                 
91    case PPC_IRQ_CRIT :
92      DEBUG_puts( "Critical Error ");     
93      break;
94    case PPC_IRQ_PIT:
95      DEBUG_puts( "0x01000" );
96      break;
97    case PPC_IRQ_FIT:
98      DEBUG_puts( "0x01010" );
99      break;
100    case PPC_IRQ_WATCHDOG :
101      DEBUG_puts( "0x01020" );
102      break;
103    case PPC_IRQ_DEBUG   :
104      DEBUG_puts( "0x02000" );
105      break;
106
107#elif defined(ppc601)
108#error "Please fill in names. "                                 
109    case PPC_IRQ_TRACE    :
110      DEBUG_puts( "0x02000" );
111      break;
112
113#elif defined(ppc603)
114#error "Please fill in names. "                                 
115    case PPC_IRQ_TRANS_MISS :
116      DEBUG_puts( "0x1000" );
117      break;
118    case PPC_IRQ_DATA_LOAD:
119      DEBUG_puts( "0x1100" );
120      break;
121    case PPC_IRQ_DATA_STORE:
122      DEBUG_puts( "0x1200" );
123      break;
124    case PPC_IRQ_ADDR_BRK:
125      DEBUG_puts( "0x1300" );
126      break;
127    case PPC_IRQ_SYS_MGT:
128      DEBUG_puts( "0x1400" );
129      break;
130
131#elif defined(ppc603e)
132    case PPC_TLB_INST_MISS:
133      DEBUG_puts( "Instruction Translation Miss" );
134      break;
135    case PPC_TLB_LOAD_MISS:
136      DEBUG_puts( "Data Load Translation Miss" );
137      break;
138    case PPC_TLB_STORE_MISS :
139      DEBUG_puts( "Data store Translation Miss");
140      break;
141    case PPC_IRQ_ADDRBRK:
142      DEBUG_puts( "Instruction address break point" );
143      break;
144    case PPC_IRQ_SYS_MGT:
145      DEBUG_puts( "System management interrupt" );
146      break;
147
148#elif defined(ppc604)
149#error "Please fill in names. "                                 
150    case PPC_IRQ_ADDR_BRK:
151      DEBUG_puts( "0x1300" );
152      break;
153    case PPC_IRQ_SYS_MGT:
154      DEBUG_puts( "0x1400" );
155      break;
156#endif
157
158  default:
159     DEBUG_puts( "Undefined exception " );
160     break;
161  }
162
163  /*
164   *  What else can we do but stop ...
165   */
166  /*
167   asm volatile( "" );
168   */
169}
170
171/*
172 *  bsp_spurious_initialize
173 *
174 *  Install the spurious handler for most traps.
175 */
176
177void bsp_spurious_initialize()
178{
179  rtems_unsigned32 trap;
180
181  for ( trap=0 ; trap < PPC_IRQ_LAST ; trap++ ) {
182
183    /*
184     *  Skip window overflow, underflow, and flush as well as software
185     *  trap 0 which we will use as a shutdown.
186     */
187
188    set_vector( bsp_spurious_handler, trap,  1 );
189  }
190
191  set_vector( bsp_stub_handler, PPC_IRQ_DECREMENTER, 1 );
192  set_vector( bsp_stub_handler, PPC_IRQ_TRACE, 1 );
193  set_vector( bsp_stub_handler, PPC_IRQ_SYS_MGT, 1 );
194}
195
196
197
198
199
200
201
202
Note: See TracBrowser for help on using the repository browser.