summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i960/rxgen960/startup/fault.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-27 15:29:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-27 15:29:18 +0000
commit702c5f5b42e975c35a94f1ae3d39a77815f36f70 (patch)
tree46a9caa5230280f7c51530aeeff50355f893083c /c/src/lib/libbsp/i960/rxgen960/startup/fault.h
parentFirst attempt at icluding Eric Valette and Emmanuel Raguet. (diff)
downloadrtems-702c5f5b42e975c35a94f1ae3d39a77815f36f70.tar.bz2
The rxgen960 BSP and i960 RPM support was submitted by Mark Bronson
<mark@ramix.com> of RAMIX.
Diffstat (limited to 'c/src/lib/libbsp/i960/rxgen960/startup/fault.h')
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/startup/fault.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i960/rxgen960/startup/fault.h b/c/src/lib/libbsp/i960/rxgen960/startup/fault.h
new file mode 100644
index 0000000000..b068fdde1d
--- /dev/null
+++ b/c/src/lib/libbsp/i960/rxgen960/startup/fault.h
@@ -0,0 +1,54 @@
+/*-------------------------------------*/
+/* fault.h */
+/* Last change : 2.11.94 */
+/*-------------------------------------*/
+#ifndef _FAULT_H_
+#define _FAULT_H_
+
+ /* (RAM-based) Fault Handler.
+ * Is invoked when there is no chance to repair current state.
+ */
+extern void faultBad(int invokedFromRom,
+ unsigned int inst, unsigned int * faultBuffer,
+ unsigned int type, unsigned int sbtp);
+ /* (RAM-based) Fault Handler.
+ * Is invoked when there is a chance to repair current state.
+ */
+extern void faultGood(unsigned int instr, unsigned int * faultBuffer,
+ unsigned int type, unsigned int sbtp);
+ /* Some addresses that are defined in rom.ld.
+ */
+extern unsigned int faultCheckSum;
+
+extern unsigned int faultBuffer[];
+
+extern unsigned int faultStart[];
+extern unsigned int faultEnd[];
+ /* Interface for user to register fault handlers of his own.
+ * Fault names.
+ */
+#define ParallelFLT 0
+#define TraceFLT 1
+#define OperationFLT 2
+#define ArithmeticFLT 3
+#define ConstraintFLT 5
+#define ProtectionFLT 7
+#define TypeFLT 9
+ /* User-registered fault handler.
+ */
+typedef void (* UserFaultHandler)(unsigned int inst, unsigned int * faultBuf,
+ unsigned int type, unsigned int sbtp);
+ /* Register user-defined fault handler. The third argument is
+ * how many times this fault handler will be valid. This to avoid
+ * the situation when handler is bad and it causes a fault itself.
+ */
+extern int faultRegister(int fault, UserFaultHandler, int cnt);
+ /* Validate handler for one more time.
+ */
+extern int faultOk(int fault);
+
+#endif
+/*-------------*/
+/* End of file */
+/*-------------*/
+