1 /* Begin include file ...... ioi_data.incl.pl1 */
  2 
  3 
  4 /****^  HISTORY COMMENTS:
  5   1) change(85-09-09,Farley), approve(85-09-09,MCR6979),
  6      audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033):
  7      Support for FIPS and
  8      IMU.
  9   2) change(86-05-16,Kissel), approve(86-07-30,MCR7461), audit(86-07-31,Coren),
 10      install(86-08-19,MR12.0-1120):
 11      Changed the value of IOI_DEFAULT_MAX_BOUND from 4096 to 1024.  This
 12      corrects a problem when RCP tries to set the maximum workspace size if it
 13      is less than 4096.  Since ioi_ (actually grab_aste) touched all the pages
 14      at assignment time, the current length is 4, and trying to set the max
 15      length to less than 4 (e.g. because the max unprivileged workspace size in
 16      RCP for a special device is 1) returns an error.
 17                                                    END HISTORY COMMENTS */
 18 
 19 /* Rewritten May 1982 by C. Hornig for new ioi_ */
 20 /* Rewrite finished March 1983 by Chris Jones */
 21 /* Extended for reconfiguration April 1983 by Chris Jones. */
 22 /* Modified November 1983 by Chris Jones to separate items in the dte protected by different locks. */
 23 /* Modified January 1984 by Chris Jones to add ite's. */
 24 /* Modified Feb 1984 by Rich Fawcett to add ipc and fips */
 25 /* Modified Sept 1985 by Paul Farley to add controller flag to dte. */
 26 
 27 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */
 28 
 29 dcl       idp                    ptr;                       /* pointer to IOI data structure */
 30 dcl       gtep                   ptr;                       /* pointer to channel/device group entry */
 31 dcl       ctep                   ptr;                       /* pointer to channel table entry */
 32 dcl       dtep                   ptr;                       /* pointer to wired device table entry */
 33 dcl       itep                   ptr;                       /* pointer to I/O multiplexer entry */
 34 
 35 dcl       (ioi_subsystems, ioi_devices, ioi_channels, ioi_multiplexers)
 36                                  fixed bin;
 37 dcl       ioi_data$              external;                  /* IOI data segment */
 38 
 39 
 40 dcl       1 ioi_data             based (idp) aligned,       /* I/O Interfacer data structure */
 41             2 ngt                fixed bin,                 /* number of groups */
 42             2 nct                fixed bin,                 /* number of channels */
 43             2 ndt                fixed bin,                 /* number of devices */
 44             2 nit                fixed bin,                 /* number of IOMs */
 45             2 spurious_interrupts
 46                                  fixed bin (35),            /* interrupts with no status */
 47             2 reconfig_lock      like lock,                 /* lock for reconfiguring devices, channels, etc. */
 48             2 flags,
 49               3 setup            bit (1) unal,              /* "1"b => ioi_init has run */
 50               3 pad1             bit (35) unal,
 51             2 rss_idcw           bit (36),                  /* reset status IDCW */
 52             2 pad2               (6) fixed bin (35),        /* pad to 16 words */
 53             2 dt                 (ioi_devices refer (ioi_data.ndt)) like dte aligned,
 54                                                             /* device table */
 55             2 gt                 (ioi_subsystems refer (ioi_data.ngt)) like gte aligned,
 56                                                             /* channel/device group table */
 57             2 ct                 (ioi_channels refer (ioi_data.nct)) like cte aligned,
 58                                                             /* channel table */
 59             2 it                 (ioi_multiplexers refer (ioi_data.nit)) like ite aligned;
 60                                                             /* multiplexer table */
 61 %include hc_lock;
 62 
 63 dcl       1 ite                  based (itep) aligned,      /* I/O multiplexer table entry */
 64             2 model              char (4),                  /* which flavor we are */
 65             2 flags,
 66             ( 3 deleting         bit (1),
 67               3 deleted          bit (1)
 68               )                  unaligned,
 69             2 pad1               bit (16) unaligned,
 70             2 iom_table_idx      fixed bin (17) unaligned,
 71             2 tag                fixed bin (3),
 72             2 pad2               (5) bit (36);
 73 
 74 dcl       1 gte                  based (gtep) aligned,      /* channel/device group table entry */
 75             2 lock               bit (36),                  /* (0) loop lock */
 76             2 name               char (4),                  /* (1) subsystem name */
 77             2 dtep               bit (18) unaligned,        /* (2) rel ptr to device just serviced */
 78             2 ctep               bit (18) unaligned,        /* (2) rel ptr to thread of channel table entries */
 79             2 detailed_status_cmd
 80                                  bit (6) unal,              /* (3) idcw command to read detailed status */
 81             2 flags              unaligned,                 /* (3) */
 82               3 psia             bit (1),                   /* "1"b if channel is PSIA */
 83               3 suspend_devices  bit (1),                   /* "1"b if device I/O suspended */
 84               3 dual_controller  bit (1),                   /* "1"b if dual controller subsystem (disk only) */
 85               3 ascii_dtst       bit (1),                   /* "1"b if detailed status sent in ASCII mode */
 86               3 mplex            bit (1),                   /* "1"b if channels are multiplexed among devices */
 87               3 ipc              bit (1),                   /* "1"b if devices are on an IMU */
 88               3 fips             bit (1),                   /* "1"b if devices start at zero */
 89               3 pad              bit (23),
 90             2 n_devices          fixed bin,                 /* (4) number of devices in device table thread */
 91             2 pending_connects   fixed bin,                 /* (5) count of pending connect requests */
 92             2 io_log_info_index  fixed bin,                 /* (6) index into io_log_status_info table */
 93             2 disk_data_subsystem_idx
 94                                  fixed bin;                 /* (7) index into disk_data.array for disks */
 95 
 96 dcl       1 cte                  based (ctep) aligned,      /* channel table entry */
 97             2 next_ctep          bit (18) unaligned,        /* (0) rel ptr to next channel table entry */
 98             2 gtep               bit (18) unaligned,        /* (0) rel ptr to channel/device group table entry */
 99             2 flags1             unaligned,                 /* (1) */
100               3 ioi_use          bit (1),                   /* "1"b if channel currently being used */
101               3 connected        bit (1),                   /* "1"b if channel is connected */
102               3 toss_status      bit (1),                   /* "1"b if status is to be ignored */
103               3 quiescing        bit (1),                   /* "1"b if the channel is just finishing what it's doing */
104               3 direct           bit (1),                   /* "1"b if this is a direct channel */
105               3 pad1             bit (4),
106             2 disktab_ctx        fixed bin (9) uns unal,    /* (1) index into disktab.chantab for this channel */
107             2 cur_dtep           bit (18) unaligned,        /* (1) current device table entry */
108             2 chanid             char (8),                  /* (2) io_manager's name for channel */
109             2 statusp            ptr unal,                  /* (4) pointer to first word of status */
110             2 chx                fixed bin (35),            /* (5) channel index for io_manager */
111             2 time_limit         fixed bin (71),            /* (6) connect time limit */
112             2 saved_status       unaligned,                 /* (8) status repository while reading detailed status */
113               3 word1            bit (36),
114               3 word2            bit (36),
115               3 word4            bit (36),
116               3 next_lpw_offset  bit (18),
117               3 command          bit (6),
118             2 pad3               bit (12) unaligned,        /* (11) */
119             2 base_ctep          bit (18) unaligned,        /* (12) rel ptr to base logical chan. of physical chan. */
120             2 itep               bit (18) unaligned,        /* (12) rel ptr to itep */
121             2 flags2             unaligned,                 /* (13) */
122               3 deleting         bit (1),                   /* "1"b if attempting to delete this channel */
123               3 deleted          bit (1),                   /* "1"b if channel deleted */
124             2 pad4               bit (16) unaligned,        /* (13) */
125             2 channel_table_idx  fixed bin (17) unaligned,
126             2 pad5               (2) bit (36);              /* (14) pad to 8 word boundary */
127 
128 dcl       1 dte                  based (dtep) aligned,      /* wired device table entry */
129             2 next_dtep          bit (18) unaligned,        /* (0) rel ptr to next entry in thread */
130             2 gtep               bit (18) unaligned,        /* (0) rel ptr to channel/device group table entry */
131             2 cur_ctep           bit (18) unaligned,        /* (1) rel ptr to channel in use */
132             2 flags1             unaligned,                 /* (1) flags protected by gte lock */
133               3 connected        bit (1),                   /* "1"b if device has a channel */
134               3 log_status_cnt   bit (1),                   /* "1"b if count in log_status is valid */
135               3 reading_detailed_status
136                                  bit (1),                   /* "1"b if read of detailed device status in progress */
137               3 pad1             bit (15),
138             2 channel_required   char (8),                  /* (2) channel name of required channel */
139             2 ev_chn             fixed bin (71),            /* (4) event ID for status wakeups */
140             2 workspace_ptr      ptr,                       /* (6) workspace pointer */
141             2 workspace_astep    ptr,                       /* (8) workspace ASTE ptr */
142             2 workspace_sdw      fixed bin (71),            /* (10) SDW of workspace segment */
143             2 ptp                ptr,                       /* (12) device page table */
144             2 max_bound          fixed bin (19),            /* (14) largest allowable bound of workspace segment */
145             2 bound              fixed bin (19),            /* (15) bound of workspace */
146             2 process_id         bit (36),                  /* (16) ID of process owning device */
147             2 ring               fixed bin (3),             /* (17) highest ring allowed to access device */
148             2 device             bit (6) unal,              /* (18) device code */
149             2 flags2             unal,                      /* (18) constant or protected by dte lock */
150               3 priv             bit (1),                   /* "1"b if privileged user */
151               3 in_use           bit (1),                   /* "1"b if device is to be used */
152               3 deleting         bit (1),                   /* "1"b if trying to delete this device */
153               3 deleted          bit (1),                   /* "1"b if this device is deleted */
154               3 suspended        bit (1),                   /* "1"b if device isn't to be used temporarily */
155               3 workspace_wired  bit (1),                   /* "1"b if workspace is wired */
156               3 direct           bit (1),                   /* "1"b if device is connected to a direct channel */
157               3 controller       bit (1),                   /* "1"b if dte for the devices controller */
158               3 pad2             bit (4),
159             2 device_table_idx   fixed bin (17) unaligned,
160             2 listx              uns fixed bin (18) unal,   /* (19) DCW list index for connect */
161             2 idcw_listx         uns fixed bin (18) unal,   /* (19) DCW list index of IDCW */
162             2 timeout            fixed bin (35),            /* (20) time limit for I/O completion (usec) */
163             2 max_timeout        fixed bin (35),            /* (21) maximum allowable timeout grace time (usec) */
164             2 unwire_time        fixed bin (71),            /* (22) when to unwire the workspace */
165             2 pcw                bit (36),                  /* (24) peripheral control word (PCW) */
166             2 status_control,                               /* (25) */
167               3 status_offset    fixed bin (18) unsigned unaligned,
168                                                             /* offset of status queue in user workspace */
169               3 status_entries   fixed bin (9) unsigned unaligned,
170                                                             /* number of entries in status queue */
171               3 status_entry_idx fixed bin (9) unsigned unaligned,
172                                                             /* next entry to be used */
173             2 idcw               bit (36),                  /* (26) instruction DCW (KEEP ON EVEN WORD BOUNDARY) */
174             2 tdcw               bit (36),                  /* (27) transfer DCW to remainder of list */
175             2 special_status     bit (36),                  /* (28) special interrupt status */
176             2 lock               like lock,                 /* (29) wait lock */
177             2 log_status,                                   /* (32) */
178             ( 3 level            fixed bin (3) unsigned,
179               3 time_out         bit (1),
180               3 type             bit (2),
181               3 command          bit (6),
182               3 count            fixed bin (6) unsigned,
183               3 channel          bit (18),
184               3 status           bit (36)
185               )                  unaligned,
186             2 ptx                fixed bin,                 /* (34) index of page table */
187             2 active             bit (1),                   /* (35) "1"b if device running or to run */
188             2 special_interrupt  bit (1),                   /* (36) "1"b if special interrupt received */
189             2 detailed_status_valid
190                                  bit (1),                   /* (37) "1"b if detailed status read sucessfully */
191             2 last_log_time      fixed bin (71),            /* (38) when status was last logged */
192             2 detailed_status    (8) bit (36),              /* (40) (buffer for reading most recent detailed status */
193             2 log_detailed_status
194                                  (8) bit (36);              /* (48) copy of last detailed status logged */
195 
196 /**** Defaults for various I/O parameters */
197 
198 dcl       IOI_DEFAULT_MAX_BOUND  fixed bin (19) static options (constant) init (1024);
199 dcl       IOI_DEFAULT_MAX_TIMEOUT
200                                  fixed bin (35) static options (constant) init (30000000);
201 dcl       IOI_DEFAULT_TIMEOUT    fixed bin (35) static options (constant) init (30000000);
202 
203 dcl       IO_STATUS_ERROR_MASK   bit (36) static options (constant) init ("370000770000"b3);
204 
205 dcl       IO_CHANNEL_LOCK_TEMPLATE
206                                  char (2) int static options (constant) init ("ch");
207 dcl       IOI_DEVICE_LOCK_EVENT_TEMPLATE
208                                  char (2) static options (constant) init ("dv");
209 
210 /* End of include file ...... ioi_data.incl.pl1 */