root/src/dps8/dps8_faults.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * vim: filetype=c:tabstop=4:ai:expandtab
   3  * SPDX-License-Identifier: ICU
   4  * scspell-id: 4603a112-f62e-11ec-81f9-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2007-2013 Michael Mondy
   9  * Copyright (c) 2012-2016 Harry Reed
  10  * Copyright (c) 2013-2016 Charles Anthony
  11  * Copyright (c) 2021-2023 The DPS8M Development Team
  12  *
  13  * All rights reserved.
  14  *
  15  * This software is made available under the terms of the ICU
  16  * License, version 1.8.1 or later.  For more details, see the
  17  * LICENSE.md file at the top-level directory of this distribution.
  18  *
  19  * ---------------------------------------------------------------------------
  20  */
  21 
  22 #ifndef QUIET_UNUSED
  23 struct _fault_register {
  24     // even word
  25     bool    ILL_OP;     // IPR fault. An illegal operation code has been detected.
  26     bool    ILL_MOD;    // IPR fault. An illegal address modifier has been detected.
  27     bool    ILL_SLV;    // IPR fault. An illegal BAR mode procedure has been encountered.
  28     bool    ILL_PROC;   // IPR fault. An illegal procedure other than the three above has been encountered.
  29     bool    NEM;        // ONC fault. A nonexistent main memory address has been requested.
  30     bool    OOB;        // STR fault. A BAR mode boundary violation has occurred.
  31     bool    ILL_DIG;    // IPR fault. An illegal decimal digit or sign has been detected by the decimal unit.
  32     bool    PROC_PARU;  // PAR fault. A parity error has been detected in the upper 36 bits of data. (Yeah, right)
  33     bool    PROC_PARL;  // PAR fault. A parity error has been detected in the lower 36 bits of data. (Yeah, right)
  34     bool    CON_A;      // CON fault. A $CONNECT signal has been received through port A.
  35     bool    CON_B;      // CON fault. A $CONNECT signal has been received through port B.
  36     bool    CON_C;      // CON fault. A $CONNECT signal has been received through port C.
  37     bool    CON_D;      // CON fault. A $CONNECT signal has been received through port D.
  38     bool    DA_ERR;     // ONC fault. Operation not complete. Processor/system controller interface sequence error 1 has been detected. (Yeah, right)
  39     bool    DA_ERR2;    // ONC fault. Operation not completed. Processor/system controller interface sequence error 2 has been detected.
  40     int     IA_A;       // Coded illegal action, port A. (See Table 3-2)
  41     int     IA_B;       // Coded illegal action, port B. (See Table 3-2)
  42     int     IA_C;       // Coded illegal action, port C. (See Table 3-2)
  43     int     IA_D;       // Coded illegal action, port D. (See Table 3-2)
  44     bool    CPAR_DIV;   // A parity error has been detected in the cache memory directory. (Not likely)
  45     bool    CPAR_STR;   // PAR fault. A data parity error has been detected in the cache memory.
  46     bool    CPAR_IA;    // PAR fault. An illegal action has been received from a system controller during a store operation with cache memory enabled.
  47     bool    CPAR_BLK;   // PAR fault. A cache memory parity error has occurred during a cache memory data block load.
  48 
  49     // odd word
  50     //      Cache Duplicate Directory WNO Buffer Overflow
  51     bool    PORT_A;
  52     bool    PORT_B;
  53     bool    PORT_C;
  54     bool    PORT_D;
  55 
  56     bool    CPD;  // Cache Primary Directory WNO Buffer Overflow
  57     // Write Notify (WNO) Parity Error on Port A, B, C, or D.
  58 
  59     //      Cache Duplicate Directory Parity Error
  60     bool    LEVEL_0;
  61     bool    LEVEL_1;
  62     bool    LEVEL_2;
  63     bool    LEVEL_3;
  64 
  65     // Cache Duplicate Directory Multiple Match
  66     bool    CDD;
  67 
  68     bool    PAR_SDWAM;  // A parity error has been detected in the SDWAM.
  69     bool    PAR_PTWAM;  // A parity error has been detected in the 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 //void doG7Fault (void);
 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);

/* [previous][next][first][last][top][bottom][index][help] */