OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i960/] [rxgen960/] [startup/] [fault.h] - Blame information for rev 562

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*-------------------------------------*/
2
/* fault.h                             */
3
/* Last change :  2.11.94              */
4
/*-------------------------------------*/
5
/*
6
 *  $Id: fault.h,v 1.2 2001-09-27 11:59:59 chris Exp $
7
 */
8
 
9
#ifndef _FAULT_H_
10
#define _FAULT_H_
11
 
12
  /* (RAM-based) Fault Handler.
13
   * Is invoked when there is no chance to repair current state.
14
   */
15
extern void faultBad(int invokedFromRom,
16
                     unsigned int inst, unsigned int * faultBuffer,
17
                     unsigned int type, unsigned int sbtp);
18
  /* (RAM-based) Fault Handler.
19
   * Is invoked when there is a chance to repair current state.
20
   */
21
extern void faultGood(unsigned int instr, unsigned int * faultBuffer,
22
                      unsigned int type, unsigned int sbtp);
23
  /* Some addresses that are defined in rom.ld.
24
   */
25
extern unsigned int faultCheckSum;
26
 
27
extern unsigned int faultBuffer[];
28
 
29
extern unsigned int faultStart[];
30
extern unsigned int faultEnd[];
31
  /* Interface for user to register fault handlers of his own.
32
   * Fault names.
33
   */
34
#define ParallelFLT     0
35
#define TraceFLT        1
36
#define OperationFLT    2
37
#define ArithmeticFLT   3
38
#define ConstraintFLT   5
39
#define ProtectionFLT   7
40
#define TypeFLT         9  
41
  /* User-registered fault handler.
42
   */
43
typedef void (* UserFaultHandler)(unsigned int inst, unsigned int * faultBuf,
44
                                  unsigned int type, unsigned int sbtp);
45
  /* Register user-defined fault handler. The third argument is
46
   * how many times this fault handler will be valid. This to avoid
47
   * the situation when handler is bad and it causes a fault itself.
48
   */
49
extern int faultRegister(int fault, UserFaultHandler, int cnt);
50
  /* Validate handler for one more time.
51
   */
52
extern int faultOk(int fault);
53
 
54
#endif
55
/*-------------*/
56
/* End of file */
57
/*-------------*/
58
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.