1 /*  BEGIN dn355_data.incl.pl1 */
  2 
  3 
  4 
  5 /****^  HISTORY COMMENTS:
  6   1) change(88-06-15,Berno), approve(88-07-13,MCR7928),
  7      audit(88-06-15,Parisek), install(88-07-19,MR12.2-1061):
  8      Add data needed for the uncp multiplexer (DSA gateway) interface
  9      implementation.
 10   2) change(89-03-20,Parisek), approve(89-06-06,MCR8110),
 11      audit(89-10-09,Farley), install(89-10-25,MR12.3-1100):
 12      Add support of protocol mpx.
 13                                                    END HISTORY COMMENTS */
 14 
 15 
 16 /* Date Last Modified and Reason
 17 
 18    Created 07/25/74 by R. B. Snyder for new ttydim.
 19    Modified 06/23/77 by J. Stern to add channel_work_reqd and cwork_count
 20    Modified 08/14/78 by Robert Coren to remove devx_tab and invent PCBs
 21    Modified 79 May 14 by Art Beattie to add fnp_mem_size
 22    Modified December 1979 by Robert Coren to add FNP queue lock
 23    Modified January 1980 by Larry Johnson to increase max number of FNPs to 8
 24    Modified 02/12/80 by Robert Coren to add dcw_list_array_ptr
 25    Modified 03/06/80 by Robert Coren to add some metering info
 26    Modified 12/10/80 by Robert Coren to add get_meters_waiting flag
 27    Modified 83-12-16 BIM to use a chanid instead of iom/channel fb's.
 28    Modified 1984-07-26 BIM for paged iom.
 29    Modified in September 1985 for the DN7100 version interim.
 30 */
 31 
 32 /* LOCKING RULES: A fnp is locked by its LCTE unless its LCTE is uninitialized.
 33    In that case, the configuration_lock must be held.
 34    if tty_lock$lock_lcte returns io_no_permission, then the caller must
 35    lock$lock_fast the configuration lock and retry the LCTE lock. If
 36    the lcte is now initialized, too bad. Otherwise, the config lock protects.
 37 
 38    Configuration locking is interesting to init_multiplexer and
 39    all of fnp t&d and reconfiguration. The guts of the multiplexer
 40    pay no attention to it. Thus, if the LCTE can be locked, it MUST be
 41    locked before changing the io_manager_assigned flag. */
 42 
 43 /* format: style4,delnl,insnl,^ifthendo */
 44 
 45 dcl  max_no_355s fixed bin int static init (8) options (constant);
 46                                                             /* max no of 355s we can handle (arbitrary) */
 47 dcl  dn355_data$ external fixed bin;
 48 
 49 dcl  infop pointer;
 50 dcl  fnpp ptr;
 51 
 52 dcl  1 datanet_info aligned based (infop),
 53        2 configuration_lock aligned,
 54          3 pid bit (36) aligned,
 55          3 event bit (36) aligned,
 56          3 flags aligned,
 57            4 notify_sw bit (1) unaligned,
 58            4 pad bit (35) aligned,
 59        2 no_of_355s fixed bin,                              /* no. of FNP's */
 60        2 trace bit (1) aligned,                             /* watch events on console */
 61        2 debug_stop bit (1) aligned,                        /* crash on errors */
 62        2 uncp_bufp ptr,                                     /* pointer to the circular buffer */
 63        2 protocol_datap ptr,                                /* pointer to protocol_mpx data */
 64        2 pad1 (6) bit (36) aligned,
 65        2 per_datanet (max_no_355s) aligned like fnp_info;   /* data per datanet */
 66 
 67 dcl  1 fnp_info aligned based (fnpp),                       /* structure for each FNP */
 68        2 mbx_pt pointer,                                    /* pointer to mailbox NULL if not in config */
 69        2 pcb_array_ptr pointer,                             /* pointer to array of physical channel blocks */
 70        2 dcw_list_array_ptr pointer,                        /* pointer to array of space reserved for output DCW lists */
 71        2 no_of_channels fixed bin,                          /* number of channels on this FNP */
 72        2 fnp_id,
 73          3 fnp_tag char (1) unaligned,                      /* letter identifying FNP */
 74          3 fnp_number fixed bin (9) unsigned unaligned,     /* sequence number of FNP */
 75          3 padc bit (18) unaligned,
 76        2 io_chanid char (8) aligned,
 77        2 io_manager_chx fixed bin (35),                     /* devx for DIA on iom */
 78        2 lsla_idx (0:5) fixed bin aligned,                  /* index into PCB array for lsla lines */
 79        2 hsla_idx (0:2) fixed bin aligned,                  /* index into PCB array for hsla lines */
 80        2 count fixed bin,                                   /* number of items in delay queue */
 81        2 cur_ptr fixed bin,                                 /* offset in tty_buf of next delay queue element */
 82        2 last_ptr fixed bin,                                /* offset in tty_buf of last delay queue element */
 83        2 bleft_355 fixed bin,                               /* number of free buffers in this 355 */
 84        2 flags,
 85          3 work_reqd bit (1) unaligned,                     /* mailbox messages queued up */
 86          3 bootloading bit (1) unaligned,                   /* currently being bootloaded */
 87          3 running bit (1) unaligned,                       /* this FNP is running */
 88          3 wired bit (1) unaligned,                         /* bootload buffer is wired */
 89          3 dump_patch_in_progress bit (1) unaligned,        /* a dump or patch order is in progress */
 90          3 level_3_pending bit (1) unaligned,               /* level 3 interrupt pending */
 91          3 level_7_pending bit (1) unaligned,               /* level 7 interrupt pending */
 92          3 dump_patch_disabled bit (1) unaligned,           /* dump & patch orders disabled because of timeout */
 93          3 t_and_d_in_progress bit (1) unaligned,           /* T & D using FNP */
 94          3 t_and_d_lev_3_occurred bit (1) unaligned,        /* A level 3 occurred */
 95          3 t_and_d_lev_7_occurred bit (1) unaligned,
 96          3 t_and_d_notify_requested bit (1) unaligned,
 97          3 t_and_d_assigned bit (1) unaligned,              /* AS has given fnp to process */
 98          3 get_meters_waiting bit (1) unaligned,            /* waiting for meter copy to complete */
 99          3 padb bit (7) unaligned,
100          3 active_dial unaligned,
101             4 active_bit (15) bit (1) unaligned,            /* ON if the process is active */
102        2 lcte_ptr ptr,                                      /* pointer to this FNP's LCT entry */
103        2 astep ptr,                                         /* pointer to aste of wired bootload buffer */
104        2 boot_ev_chan fixed bin (71),                       /* event channel over which to signal bootload completion */
105        2 boot_process_id bit (36),                          /* process that initiated bootload */
106        2 version char (4),                                  /* version id of core image */
107        2 fnp_mem_size fixed bin (18) unsigned,              /* memory size of this FNP in 18-bit words */
108        2 queue_lock bit (36) aligned,                       /* lock for interrupt queue */
109        2 dump_patch_lock bit (36),                          /* lock for fnp_dump or _patch operation */
110        2 q_entries_made fixed bin (35),                     /* count of delay queue entries made */
111        2 input_reject_count fixed bin,                      /* number of times input rejected */
112        2 processed_from_q fixed bin (35),                   /* number of interrupts processed from queue */
113        2 fnp_channel_locked fixed bin (35),                 /* number of times dn355 found per-FNP lock locked */
114        2 input_data_transactions fixed bin (35),            /* number of mailbox transactions for input */
115        2 output_data_transactions fixed bin (35),           /* number of mailbox transactions for output */
116        2 input_control_transactions fixed bin (35),         /* number of mailbox transactions for inbound control info */
117        2 output_control_transactions fixed bin (35),        /* number of mailbox transactions for outbound control info */
118        2 cumulative_mbx_in_use fixed bin (35),              /* cumulative count of number of outbound mailboxes in use */
119        2 max_mbx_in_use fixed bin,                          /* maximum number of mailboxes in use at any given time */
120        2 mbx_in_use_updated fixed bin (35),                 /* number of increments to cumulative_mbx_in_use */
121        2 mbx_unavailable fixed bin (35),                    /* number of times had to queue mailbox transaction because none available */
122        2 free_size fixed bin (35),                          /* cumulative amount of bleft_355 */
123        2 free_count fixed bin,                              /* number of adds to above */
124        2 fnp_space_restricted_output fixed bin (35),        /* number of times available FNP space restricted amount of output sent */
125        2 tandd_pcbx fixed bin,                              /* index of PCB for COLTS channel */
126        2 n_pages_wired fixed bin,                           /* pages wired for loading */
127        2 config_flags aligned,
128          3 available bit (1) unaligned,                     /* reconfig says "yes" */
129          3 io_manager_assigned bit (1) unaligned,           /* We have channel assigned to us */
130          3 pad bit (34) unaligned,
131        2 uncp_pcbx1 fixed bin (17) unaligned,               /* For the DN7100 */
132        2 uncp_pcbx2 fixed bin (17) unaligned,               /* For the DN7100 */
133        2 ptx fixed bin,                                     /* page table index, used only at bootload */
134        2 ptp pointer unaligned;                             /* page table for this FNP */
135 
136 /**** The following named constants are used to lay out the
137       iom page tables. Each FNP has to have its own page
138       table because there is not enough room to have eight different
139       bootload images of 32 K and > 64 K of tty_buf
140 
141       THE MAX TTY BUF LENGTH IS 192 K words. We could have another 16 K
142       easily, and then after that it would get hard. */
143 
144 /**** The layout
145 
146       Page   I/O address   Memory address     Comments
147       ----      ------     --------------     --------
148       0              0       xxxxxx           invalid PTW
149       1           2000         2000           write-enabled (mailbox)
150       2           4000         4000           write-enabled (mailbox)
151       3           6000         6000           write-enabled (mailbox)
152       4          10000       as needed        bootload image segment page 0
153       ....        ....         ....           ....
154       35        110000       as needed        bootload image segment page 31
155       36        112000       xxxxxx           invalid PTW
156       ...         ....         ....           ....
157       63        160000         ....           invalid PTW
158       64        200000       as needed        tty_buf page 0
159       ...         ....         ....           ....
160       127       260000       as needed        tty_buf page 63
161       255       ......        .....           tty_buf page 191
162 */
163 
164 /**** We assume that the page table starts at all zeros. */
165 
166 declare  FIRST_BOOTLOAD_PAGEX fixed bin init (4) int static options (constant);
167 declare  FIRST_TTY_BUF_PAGEX fixed bin init (64) int static options (constant);
168 
169 /* End include file dn355_data.incl.pl1 */