1 /* Begin include file ...... iom_data.incl.pl1
  2    First written in August 1971 by R F Mabee.
  3    Modified for paged IOM November 1980 by C. Hornig.
  4    More IIOC changes by C. Hornig, June 1982.
  5    Modified for channel reconfiguration by Chris Jones, January 1984.
  6    Modified to remove support of non-paged IOMs by Chris Jones, August 1984.
  7    Modified to add IMW read protocol flags by M. Pandolf, January 1985.
  8 */
  9 
 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */
 11 dcl       iom_data$              external;
 12 dcl       iom_mailbox$           external;
 13 
 14 dcl       n_devices              fixed bin;
 15 dcl       iom_data_ptr           ptr;
 16 
 17 dcl       1 iom_data             based (iom_data_ptr) aligned,
 18             2 n_devices          fixed bin,                 /* (0) Maximum number of channels. */
 19             2 stop_lpw           bit (36),                  /* (1) LPW pointing to stop_dcw. */
 20             2 stop_dcw           bit (36),                  /* (2) DCW to stop channel, probably storing bad status. */
 21             2 stop_scw           bit (36),                  /* (3) SCW for same */
 22             2 imw_lock           fixed bin (35),            /* (4) Essentially a lock for iom switch checking: */
 23                                                             /* 1  : OK to poll IMW */
 24                                                             /* 0  : lock in transition */
 25                                                             /* -1 : DONT poll IMW */
 26             2 n_intr_procs fixed bin (35),                  /* (5) Number of processors in interrupt handler */
 27             2 pad1               (2) bit (36),
 28             2 stop_status        bit (72),                  /* (10) All unused channels store status here. */
 29             2 rfh1               (6) bit (36),              /* can't use this */
 30             2 stop_ext_status    bit (8 * 36),              /* (20) Unused channels' extended status */
 31             2 pad3               (5) bit (36),
 32             2 invalid_interrupts fixed bin (35),            /* (35) interrupts on unused channels */
 33             2 null_interrupts    fixed bin (35),            /* (36) spurious interrupts */
 34             2 multiple_interrupts
 35                                  fixed bin (35),            /* (37) several interrupts at a time */
 36             2 per_iom            (4) like per_iom,          /* (40) for each IOM */
 37             2 per_device         (n_devices refer (iom_data.n_devices)) like per_device;
 38                                                             /* (240) Data for assigned channels. */
 39 
 40 dcl       1 per_iom              aligned based,
 41             2 lock               bit (36),                  /* (40) connect mailbox lock */
 42             2 flags,                                        /* (41) */
 43               3 configured       bit (1) unal,              /* is configured */
 44               3 on_line          bit (1) unal,              /* is ON */
 45               3 pad1             bit (34) unal,
 46             2 model              char (4),                  /* (42) what kind of IOM */
 47             2 port               fixed bin (3),             /* (43) SC port */
 48             2 connect_time       fixed bin (71),            /* (44) time of last connect */
 49             2 connect_lpw        bit (36),                  /* (46) LPW for connect channel */
 50             2 cow                bit (36),                  /* (47) Connect Operand Word */
 51             2 special_chx        fixed bin (35),            /* (50) chx of special status channel */
 52             2 fault_chx          fixed bin (35),            /* (51) chx of system fault channel */
 53             2 pad2               (4) bit (36),
 54             2 abandoned_connects fixed bin (35),            /* (56) times we couldn't get IOM to listen at all */
 55             2 reconnects         fixed bin (35),            /* (57) times a connect was lost */
 56             2 chantab            (0:63) uns fixed bin (9) unal;
 57                                                             /* (60) packed devtab indices */
 58 
 59 dcl       1 per_device           aligned based,
 60             2 status             bit (72),                  /* (0) Status for channel is stored here. */
 61             2 rfh1               (6) bit (36),
 62             2 ext_status         bit (8 * 36),              /* (10) extended status stored by IIOC */
 63             2 iom                uns fixed bin (3),         /* (20) IOM# (1-4) */
 64             2 channel            uns fixed bin (6),         /* (21) channel # */
 65             2 handler            entry (fixed bin (35), fixed bin (3), bit (36) aligned),
 66                                                             /* (22) Interrupt handler for device. */
 67             2 flags,                                        /* (26) */
 68               3 in_use           bit (1) unal,              /* assigned */
 69               3 queue_status     bit (1) unal,              /* maintain status queue */
 70               3 on_line          bit (1) unal,              /* can be assigned */
 71             2 index              fixed bin (35),            /* (27) Channel identification index. */
 72             2 pcw                bit (72),                  /* (30) Peripheral Control Word */
 73             2 lpw                bit (72),                  /* (32) List Pointer Word */
 74             2 scw                bit (36),                  /* (34) Status Control Word */
 75             2 pad1               fixed bin (35),
 76             2 status_queue_ptr   ptr,                       /* (36) Status queue */
 77             2 connect_time       fixed bin (71),            /* (40) time of last connect */
 78             2 connects           fixed bin (71),            /* (42) Total connects */
 79             2 interrupts         fixed bin (71),            /* (44) Total number of interrupts for this channel. */
 80             2 interrupt_time     fixed bin (71);            /* (46) Total interrupt time for this channel. */
 81 
 82 dcl       iom_mailbox_seg_ptr    ptr;
 83 dcl       1 iom_mailbox_seg      aligned based (iom_mailbox_seg_ptr),
 84             2 imw_array          (0:31) bit (32),           /* Indexed by interrupt cell number. One bit for each channel. */
 85             2 system_fault       (4) aligned like status_queue,
 86                                                             /* system faults store here (12 words/IOM) */
 87             2 special_status     (4) aligned like status_queue,
 88                                                             /* special status words here (12 words/IOM) */
 89             2 iom_mailbox        (4) like iom_mailbox;      /* Used to communicate with the IOM. */
 90 
 91 dcl       status_queue_ptr       ptr;
 92 dcl       1 status_queue         aligned based (status_queue_ptr),
 93             2 status             (12) bit (36);
 94 
 95 dcl       1 iom_mailbox          aligned based,
 96             2 channel_mailbox    (0:63) like channel_mailbox;
 97 
 98 dcl       1 channel_mailbox      aligned based,
 99             2 lpw                bit (72),                  /* List pointer word. Points to DCW list. */
100             2 scw                bit (36),                  /* Status control word. Points to channel_table.status. */
101             2 dcw                bit (36);                  /* Data control word. Primarily scratch space for IOM. */
102 
103 /* Defined channel numbers. */
104 
105 dcl       (
106           system_fault_channel   init (1),                  /* Stores system fault words using LPW and DCW. */
107           connect_channel        init (2),                  /* Starts other channels using LPW pointing to PCW. */
108           special_status_channel init (6)                   /* Stores special status using LPW and DCW. */
109           )                      fixed bin (6) static options (constant);
110 
111 /* End of include file ..... iom_data.incl.pl1 */