1 /*                            BEGIN dn355_mailbox.incl.pl1                      */
  2 
  3 /* Date Last Modified and Reason
  4    Created 07/25/74 by R. B. Snyder for new ttydim.
  5    Modified 08/20/75 by Mike Grady to prepare for multiple 355's
  6    Modified 11/08/78 by Robert Coren to introduce FNP-controlled mailboxes
  7    Modified 02/19/80 by Robert Coren to specify format of accept_input mailbox
  8    Modified 04/23/80 by Robert Coren to replace lock with num_in_use
  9    Modified 09/21/82 by Robert Coren to make subfields of crash_data be fixed bin (18) unsigned
 10    */
 11 
 12 dcl 1 datanet_mbx aligned based (mbxp),                     /* declaration of 355 mailbox */
 13     2 dia_pcw aligned,                                      /* Peripheral Control Word for DIA */
 14       3 zero bit (18) unaligned,
 15       3 error bit (1) unaligned,                            /* set to "1"b if error on connect */
 16       3 pad1 bit (5) unaligned,
 17       3 mbx_no bit (6) unaligned,                           /* number of submbx being sent to 355 */
 18       3 command bit (6) unaligned,                          /* always 71 (octal) */
 19     2 mailbox_requests fixed bin,                           /* 0 mod 256K cnt of mbx requests by 355 */
 20     2 term_inpt_mpx_wd bit (36) aligned,                    /* terminate interrupt multiplex word */
 21     2 last_mbx_req_count fixed bin,                         /* previous value of mailbox_requests */
 22     2 num_in_use fixed bin,                                 /* number of submailboxes currently in use */
 23     2 mbx_used_flags,                                       /* one bit for each mailbox */
 24       3 used (0:7) bit (1) unaligned,                       /* "1"b means this mbx is being used */
 25       3 pad2 bit (28) unaligned,
 26     2 crash_data,                                           /* data for 355 emergency interrupt */
 27       3 fault_code fixed bin (18) unal unsigned,
 28       3 ic fixed bin (18) unal unsigned,
 29       3 iom_fault_status fixed bin (18) unal unsigned,
 30       3 fault_word fixed bin (18) unal unsigned,            /* contains either faulting instruction or iomchannel no */
 31     2 dn355_sub_mbxes (0:7) aligned,                        /* 8 CS-initiated submailboxes */
 32       3 pad4 (8) fixed bin,                                 /* eight words each */
 33     2 fnp_sub_mbxes (0:3) aligned,                          /* 4 FNP-initiated mailboxes */
 34       3 pad5 (28) fixed bin;                                /* 28 words each */
 35 
 36 dcl 1 sub_mbx aligned based (subp),                         /* declaration of a submailbox */
 37     2 dn355_no bit (3) unaligned,                           /* 355 number */
 38     2 pad1 bit (5) unaligned,
 39     2 line_number unaligned,                                /* line number assigned by 355 */
 40       3 is_hsla bit (1) unaligned,                          /* on if hsla, off if lsla */
 41       3 la_no bit (3) unaligned,                            /* line adapter (high or low speed) number */
 42       3 slot_no bit (6) unaligned,                          /* physical slot/subchannel number */
 43     2 terminal_id bit (18) unaligned,                       /* not used */
 44 
 45     2 terminal_type bit (9) unaligned,                      /* unused */
 46     2 cmd_data_len fixed bin (8) unaligned,                 /* no. of 6 bit chars in command data */
 47     2 op_code fixed bin (8) unaligned,                      /* op code */
 48     2 io_cmd fixed bin (8) unaligned,                       /* i/o cmd */
 49 
 50     2 command_data (3) bit (36) unaligned,                  /* data associated with op code */
 51 
 52     2 address unal,                                         /* dcw buffer or circular queue address */
 53       3 data_addr bit (18) unaligned,                       /* data address */
 54       3 word_cnt fixed bin (18) unsigned unaligned,         /* data length */
 55     2 pad3 bit (72) unaligned;
 56 
 57 /* The structure below defines the long form of submailbox used by the FNP. Note that
 58    the declaration of command_data and input_data is that used for the input_in_mailbox
 59    operation; other FNP-initiated operations use the command_data format described by
 60    the above (short mailbox) structure
 61 */
 62 
 63 dcl 1 fnp_sub_mbx aligned based (subp),                     /* format used for FNP-controlled mailbox */
 64     2 dn355_no bit (3) unaligned,                           /* as above */
 65     2 pad1 bit (5) unaligned,
 66     2 line_number unaligned,                                /* as above */
 67       3 is_hsla bit (1) unaligned,
 68       3 la_no bit (3) unaligned,
 69       3 slot_no bit (6) unaligned,
 70     2 n_free_buffers fixed bin (17) unaligned,              /* number of free blocks in FNP at present */
 71 
 72     2 pad3 bit (9) unaligned,
 73     2 n_chars fixed bin (9) unsigned unaligned,             /* number of data characters (if input) */
 74     2 op_code fixed bin (9) unsigned unaligned,             /* as above */
 75     2 io_cmd fixed bin (9) unsigned unaligned,              /* as above */
 76 
 77     2 input_data char (100) unaligned,                      /* input characters for input_in_mailbox op */
 78     2 command_data bit (36) unaligned;                      /* shouldn't need more than one word */
 79 
 80 /* The structure below defines the format of a long submailbox used for an accept_input operation
 81    when the data is too long to fit directly in the mailbox. command_data and n_chars occupy the same position as for input_in_mailbox, above.
 82 */
 83 
 84 dcl 1 input_sub_mbx aligned based (subp),
 85     2 pad1 bit (8) unaligned,
 86     2 line_number unaligned like sub_mbx.line_number,
 87     2 n_free_buffers fixed bin (17) unaligned,              /* number of free blocks in FNP at present */
 88 
 89     2 n_chars fixed bin (17) unaligned,                     /* total number of data characters */
 90     2 op_code fixed bin (9) unsigned unaligned,
 91     2 io_cmd fixed bin (9) unsigned unaligned,
 92 
 93     2 n_buffers fixed bin,                                  /* number of buffers in this input chain */
 94     2 dcw (24),                                             /* "pseudo-DCWs"  used to specify buffer addresses and tallies */
 95       3 abs_addr bit (24) unaligned,                        /* supplied by CS */
 96       3 tally fixed bin (12) unsigned unaligned,            /* in characters, supplied by FNP */
 97     2 command_data bit (36) unaligned;                      /* as above */
 98 
 99 dcl  subp pointer;
100 dcl  mbxp pointer;
101 
102 /*                            END dn355_mailbox.incl.pl1                        */