1 /* BEGIN INCLUDE ............imp_dcm_data ................ */
  2 
  3 /* For imp_dcm */
  4 
  5 dcl  imp_data$dcm external;
  6 
  7 dcl 1 dcm based aligned,
  8 
  9 
 10     2 initialized bit (36) aligned,                         /* If non-zero IMP DCM has been initialized */
 11     2 int_lock bit (36) aligned,                            /* Lock for interupts */
 12     2 finish_status_lock bit (36) aligned,                  /* If unsuccesful to lock "imp_status" returns.
 13                                                                "imp_finish" waits until the lock is cleared. */
 14     2 interrupt_sequence_number fixed bin (35),
 15     2 last_ready_line_drop_time fixed bin (71),             /* Time at which the last ready-line-drop happenned.
 16                                                                It is needed to take care of the burst of interrupts
 17                                                                generated by the new Interface when the ready line
 18                                                                comes up */
 19     2 state char (8) aligned,                               /* State of IMP and last I/O operation */
 20     2 data_transfer_sw bit (1) aligned,                     /* If off no read writes permitted. */
 21     2 multi_cpu_int_lock bit (36) aligned,                  /* Lock to make sure only one
 22                                                                cpu gets in the interrupt handler */
 23     2 filler1 (6) fixed bin (35),
 24     2 interrupt_times_histogram (1:6),                      /* CPU time spent in processing interrupts */
 25       3 max_value fixed bin (35),
 26       3 count fixed bin (34),
 27       3 total fixed bin (71),
 28 
 29 
 30 /* Following variables used to store data about IMP read and write channels */
 31 
 32     2 channel (1:2),                                        /* Data blocks for read and write channels */
 33       3 mode char (4) aligned,                              /* Mode of current operation on this channel */
 34       3 assigned bit (1),                                   /*  ="1"b if the channel has been assigned */
 35       3 devx fixed bin (35),                                /* IOM manager index of the channel */
 36       3 current_io_counter fixed bin,                       /* Number of attempts */
 37       3 reset_status_needed bit (1),
 38       3 alarm_set bit (1),
 39       3 alarm_time fixed bin (71),
 40       3 last_io_time fixed bin (71),
 41       3 buffer_address pointer,                             /* Address of buffer area */
 42       3 buffer_absolute_address fixed bin (24),             /* Absolute address of buffer area */
 43       3 idcw bit (36),                                      /* IDCW for reset */
 44       3 status_ptr pointer,                                 /* points to status word */
 45 
 46 /* Following variables used for read operations */
 47 
 48     2 rin fixed bin,                                        /* Number of words traversed in read buffer
 49                                                                on input. */
 50     2 rout fixed bin,                                       /* Number of words traversed in read buffer
 51                                                                while emptying it. */
 52     2 read_buffer_full bit (1) aligned,                     /* When read buffers are full this bit is turned
 53                                                                on by the interrupt side. Call side turns
 54                                                                this bit off after removing something from the
 55                                                                read buffer. */
 56     2 filler2 fixed bin (35),
 57 
 58 /* Following variables used for write operations */
 59 
 60     2 win fixed bin,                                        /* Number of words traversed in write buffer
 61                                                                while filling the buffers. (Copying messages
 62                                                                into the buffer.) */
 63     2 wout fixed bin,                                       /* Number of words traversed in write buffer
 64                                                                while emptying the buffers. (Sending the
 65                                                                messages to the IMP. ) */
 66     2 wakeup_ncp_on_write_buf_empty fixed bin,              /* It also contains the length in words */
 67     2 filler3 fixed bin (35),
 68     2 write_times_histogram (1:4),
 69       3 max_value fixed bin (35),                           /* Maximum number of micro seconds for this entry */
 70       3 count fixed bin (34),                               /* Number of write in this entry */
 71       3 total fixed bin (71),                               /* Total time for this entry in microseconds */
 72 
 73 /* Following variables used for non-read-write operations */
 74 
 75     2 polling_on bit (1),                                   /* If on, IMP polling is on. */
 76     2 polling_needed bit (1),                               /* If on polling operation is perforemed
 77                                                                at the first oppertunity. */
 78     2 filler3_2 (6) fixed bin (35),
 79 
 80 /* Following variables are used by imp_dcm_init */
 81 
 82     2 misc_bits aligned,
 83       3 (imp_status_wired,                                  /* On if imp_status has been wired down */
 84      data_seg_wired) bit (1) unaligned,                     /* On if necessary data pages are wired */
 85     2 imp_dcm_init_progress fixed bin,
 86     2 imp_dcm_first_call_time fixed bin (71),               /* This is the time imp_dcm_init was first
 87                                                                called. Used for statistics gathering. */
 88                                                             /* Bits for various debugging aids to become operational */
 89     2 misc_switches aligned,
 90       3 print_status bit (1) unaligned,                     /* If on status is printed on typewriter for every
 91                                                                call to imp_status */
 92       3 stop_status bit (1) unaligned,                      /* If on and a connect can not be issued
 93                                                                then imp_status will call BOS */
 94       3 trace_wakeups bit (1) unaligned,                    /* If this bit is on and if memory tracing is on
 95                                                                then wakeup_ncp calls in imp_status are traced. */
 96       3 tracing bit (1) unaligned,                          /* If this bit is on and one of the processor switches
 97                                                                is on too, then "trace" is called to write either
 98                                                                on tape or printer. */
 99     2 filler6 (3) fixed bin (35),
100 
101 /* Following variables are used for memory trace operations. */
102 
103     2 mtrace_lock bit (36) aligned,                         /* Tracing tries to lock it. If succesful tracing
104                                                                is done. Ofcourse tracing switch should be on.
105                                                                If unsuccesful no tracing */
106     2 mtrace_routine_lock bit (36) aligned,                 /* Routines that manipulate tracing
107                                                                use this lock. */
108     2 mtrace_sequence fixed bin (34),
109     2 mtrace_current fixed bin,                             /* Index to entry available. */
110     2 mtrace aligned,
111       3 mtdummy bit (2) unaligned,
112       3 mtswitch bit (1) unaligned,
113     2 filler7 (3) fixed bin,
114 
115 /* Following variables used to gather information about cpu time
116    wasted in looping on data base in case of multiple-processor system */
117 
118     2 (loop_interrupt,                                      /* Number of times the stac function looped. */
119      loop_call) fixed bin (71);
120 
121 /* CONSTANTS */
122 
123 dcl  interrupt_times_histogram_values (1:6) fixed bin (35) static options (constant)
124      initial (2000,                                         /* two mili-seconds */
125      4000,                                                  /* four millseconds */
126      8000,                                                  /* eight miliseconds */
127      16000,                                                 /* sixteen miliseconds */
128      32000,                                                 /* thirtytwo milliseconds */
129      64000);                                                /* sixtyfour milliseconds */
130 
131 
132 dcl  write_times_histogram_values (1:4) fixed bin (34) static options (constant)
133      initial (1000000,                                      /* One second */
134      5000000,                                               /* Five seconds */
135      10000000,                                              /* Ten Seconds */
136      50000000);                                             /* Fifty seconds. This value is not used any way */
137 
138 
139 /* definition of I/O modes on IMP read and write channels */
140 
141 dcl (inactive_mode init (""),
142      read_mode init ("read"),
143      write_mode init ("writ"),
144      reset_status_mode init ("rese"),
145      host_down_mode init ("hsdn"),
146      host_up_mode init ("hsup"),
147 
148      abort_mode init ("abrt")) char (4) aligned static options (constant);
149 
150 
151 /* Indices for referecencing channel data */
152 
153 dcl (read_channel init (1),
154      write_channel init (2)) fixed binary static options (constant);
155 
156 /* ASCII channel names */
157 
158 dcl  channel_name (1:2) char (4) aligned static options (constant) init ("impr", "impw");
159 
160 /* END INCLUDE...............imp_dcm_data ................ */