1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef QUIET_UNUSED
23 struct _fault_register {
24
25 bool ILL_OP;
26 bool ILL_MOD;
27 bool ILL_SLV;
28 bool ILL_PROC;
29 bool NEM;
30 bool OOB;
31 bool ILL_DIG;
32 bool PROC_PARU;
33 bool PROC_PARL;
34 bool CON_A;
35 bool CON_B;
36 bool CON_C;
37 bool CON_D;
38 bool DA_ERR;
39 bool DA_ERR2;
40 int IA_A;
41 int IA_B;
42 int IA_C;
43 int IA_D;
44 bool CPAR_DIV;
45 bool CPAR_STR;
46 bool CPAR_IA;
47 bool CPAR_BLK;
48
49
50
51 bool PORT_A;
52 bool PORT_B;
53 bool PORT_C;
54 bool PORT_D;
55
56 bool CPD;
57
58
59
60 bool LEVEL_0;
61 bool LEVEL_1;
62 bool LEVEL_2;
63 bool LEVEL_3;
64
65
66 bool CDD;
67
68 bool PAR_SDWAM;
69 bool PAR_PTWAM;
70 };
71 #endif
72
73 #ifndef QUIET_UNUSED
74 struct dps8faults
75 {
76 int fault_number;
77 int fault_address;
78 const char *fault_mnemonic;
79 const char *fault_name;
80 int fault_priority;
81 int fault_group;
82 };
83 typedef struct dps8faults dps8faults;
84 #endif
85
86 extern char * faultNames [N_FAULTS];
87 void check_events (void);
88 void clearFaultCycle (void);
89 void emCallReportFault (void);
90
91 void cu_safe_restore (void);
92
93 void doG7Fault(bool allowTR) NO_RETURN;
94
95 #ifdef NEED_128
96 # define fst_zero (_fault_subtype) {.bits=0}
97 # define fst_acv9 (_fault_subtype) {.fault_acv_subtype=ACV9}
98 # define fst_acv15 (_fault_subtype) {.fault_acv_subtype=ACV15}
99 # define fst_ill_mod (_fault_subtype) {.fault_ipr_subtype=FR_ILL_MOD}
100 # define fst_ill_proc (_fault_subtype) {.fault_ipr_subtype=FR_ILL_PROC}
101 # define fst_ill_dig (_fault_subtype) {.fault_ipr_subtype=FR_ILL_DIG}
102 # define fst_ill_op (_fault_subtype) {.fault_ipr_subtype=FR_ILL_OP}
103 # define fst_str_oob (_fault_subtype) {.fault_str_subtype=flt_str_oob}
104 # define fst_str_nea (_fault_subtype) {.fault_str_subtype=flt_str_nea}
105 # define fst_str_ptr (_fault_subtype) {.fault_str_subtype=flt_str_ill_ptr}
106 # define fst_cmd_lprpn (_fault_subtype) {.fault_cmd_subtype=flt_cmd_lprpn_bits}
107 # define fst_cmd_ctl (_fault_subtype) {.fault_cmd_subtype=flt_cmd_not_control}
108 # define fst_onc_nem (_fault_subtype) {.fault_onc_subtype=flt_onc_nem}
109 #else
110 extern const _fault_subtype fst_zero;
111 extern const _fault_subtype fst_acv9;
112 extern const _fault_subtype fst_acv15;
113 extern const _fault_subtype fst_ill_mod;
114 extern const _fault_subtype fst_ill_proc;
115 extern const _fault_subtype fst_ill_dig;
116 extern const _fault_subtype fst_ill_op;
117 extern const _fault_subtype fst_str_oob;
118 extern const _fault_subtype fst_str_nea;
119 extern const _fault_subtype fst_str_ptr;
120 extern const _fault_subtype fst_cmd_lprpn;
121 extern const _fault_subtype fst_cmd_ctl;
122 extern const _fault_subtype fst_onc_nem;
123 #endif
124
125 void doFault (_fault faultNumber, _fault_subtype faultSubtype,
126 const char * faultMsg) NO_RETURN;
127 void dlyDoFault (_fault faultNumber, _fault_subtype subFault,
128 const char * faultMsg);
129 bool bG7PendingNoTRO (void);
130 bool bG7Pending (void);
131 void setG7fault (uint cpuNo, _fault faultNo, _fault_subtype subFault);
132
133 void clearTROFault (void);
134 void advanceG7Faults (void);
135 void set_FFV_fault (uint f_fault_no);
136 void do_FFV_fault (uint fault_number, const char * fault_msg);