1 /****^  ***********************************************************
  2         *                                                         *
  3         * Copyright, (C) Honeywell Bull Inc., 1987                *
  4         *                                                         *
  5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
  6         *                                                         *
  7         *********************************************************** */
  8 
  9 
 10 /****^  HISTORY COMMENTS:
 11   1) change(86-05-13,GJohnson), approve(86-05-13,MCR7387),
 12      audit(86-05-13,Martinson), install(86-05-14,MR12.0-1056):
 13      Correct error message documentation.
 14                                                    END HISTORY COMMENTS */
 15 
 16 
 17 /* format: style2 */
 18 
 19 announce_chwm:
 20      proc ();
 21 
 22 /* format: off */
 23 /* *      This procedure announces the value of the Collection One High Water Mark,
 24    *      once before, and once after segments are made paged.
 25    *
 26    *      Extracted from init_sst and make_segs_paged, 12/21/80 W. Olin Sibert
 27    *      Modified September 1983 by Keith Loepere for high marks on unpaged page tables.
 28    */
 29 
 30 /* format: on */
 31 
 32           dcl     parm_ptr               pointer;
 33 
 34           dcl     ptp                    pointer;           /* Can't be declared in silly include files */
 35           dcl     wired_bit              bit (1) aligned;
 36           dcl     suptop                 fixed bin;
 37           dcl     initbase               fixed bin;
 38           dcl     n_pages                fixed bin;
 39           dcl     wired                  fixed bin;
 40           dcl     total                  fixed bin;
 41 
 42           dcl     int_unpaged_page_tables$
 43                                          external static;
 44           dcl     slt$                   fixed bin external static;
 45           dcl     sst_seg$               external static;
 46           dcl     sstp                   pointer;
 47           dcl     cmp                    pointer;
 48           dcl     sst$cmp                ptr ext static;
 49           dcl     sst$usedp              bit (18) external static;
 50           dcl     sys_info$system_type   fixed bin external static;
 51           dcl     unpaged_page_tables$   external static;
 52 
 53           dcl     config_$find_parm      entry (char (4) aligned, pointer);
 54           dcl     syserr                 entry options (variable);
 55           dcl     sys_boot_info$contig_mem_size
 56                                          fixed bin (26) ext static;
 57 
 58           dcl     (addr, divide, pointer, rel, null, segno)
 59                                          builtin;
 60 
 61 /* ^L */
 62 
 63 announce_chwm$before:
 64      entry ();
 65 
 66 /* Announce the number of pages left over after collection one loaded and initialized */
 67 
 68           call config_$find_parm ("chwm", parm_ptr);        /* Should we bother? */
 69           if parm_ptr = null ()
 70           then return;
 71 
 72           sltp = addr (slt$);
 73 
 74           suptop = divide (slt.free_core_start + 1023, 1024, 17, 0);
 75           initbase = divide ((slt.free_core_start + slt.free_core_size - 1), 1024, 17, 0);
 76 
 77           total = divide (sys_boot_info$contig_mem_size, 1024, 17, 0);
 78           n_pages = total - (initbase - suptop);
 79 
 80           call syserr (ANNOUNCE, "announce_chwm: ^d. pages used of ^d. in wired environment.", n_pages, total);
 81 
 82           upt_ptr = addr (int_unpaged_page_tables$);
 83           call syserr (ANNOUNCE, "announce_chwm: ^d. words used of ^d. in int_unpaged_page_tables.", upt.current_length, upt.max_length);
 84           return;
 85 
 86 /* ^L */
 87 
 88 announce_chwm$after:
 89      entry ();
 90 
 91 /* Announce the number of pages left after segs are made paged */
 92 
 93           call config_$find_parm ("chwm", parm_ptr);        /* Should we bother? */
 94           if parm_ptr = null ()
 95           then return;
 96 
 97           sltp = addr (slt$);
 98           sstp = addr (sst_seg$);
 99           cmp = sst$cmp;
100 
101           total = 0;
102           wired = 0;
103 
104           cmep = pointer (cmp, sst$usedp);                  /* scan the used list */
105           ptp = pointer (sstp, cme.ptwp);
106 
107           if sys_info$system_type = ADP_SYSTEM
108           then wired_bit = adp_ptw.wired;
109           else wired_bit = l68_ptw.wired;
110 
111           if ptp = sstp
112           then total = total + 1;
113           else if wired_bit
114           then wired = wired + 1;
115           else total = total + 1;
116 
117           do cmep = pointer (cmep, cme.fp) repeat pointer (cmep, cme.fp) while (rel (cmep) ^= sst$usedp);
118 
119                ptp = pointer (sstp, cme.ptwp);              /* get pointer to page table word */
120                if sys_info$system_type = ADP_SYSTEM
121                then wired_bit = adp_ptw.wired;
122                else wired_bit = l68_ptw.wired;
123 
124                if ptp = sstp
125                then /* free */
126                     total = total + 1;
127                else if wired_bit
128                then wired = wired + 1;
129                else total = total + 1;
130           end;
131 
132           call syserr (ANNOUNCE, "announce_chwm: ^d. pages wired, ^d. pages usable.", wired, total);
133 
134           upt_ptr = addr (unpaged_page_tables$);
135           call syserr (ANNOUNCE, "announce_chwm: ^d. words used of ^d. in unpaged_page_tables.", upt.current_length, upt.max_length);
136           return;                                           /* End of announce_chwm$after */
137 
138 %page;
139 %include slt;
140 %page;
141 %include cmp;
142 %page;
143 %include "ptw.l68";
144 %page;
145 %include "ptw.adp";
146 %page;
147 %include syserr_constants;
148 %page;
149 %include system_types;
150 %page;
151 %include unpaged_page_tables;
152 
153 /* ^L */
154 
155 /* BEGIN MESSAGE DOCUMENTATION
156 
157    Message:
158    announce_chwm: WWW. pages used of XXX. in wired environment.
159 
160    S: $info
161 
162    T: $init
163 
164    M: This message is produced when the CHWM parameter is specified on
165    the PARM CONFIG card. WWW is the number of pages of memory which
166    remain unused (out of a maximum of XXX) after all the segments in
167    collection one have been loaded, and all the segments constructed by
168    collection one have been created.
169 
170    A: $ignore
171 
172 
173    Message:
174    announce_chwm: WWW. words used of XXX. in int_unpaged_page_tables.
175 
176    S: $info
177 
178    T: $init
179 
180    M: This message is produced when the CHWM parameter is specified on
181    the PARM CONFIG card.  WWW is the number of words of the XXX word
182    long segment int_unpaged_page_tables used to hold page tables for
183    temporary collection 1 segments.
184 
185    A: $ignore
186 
187 
188    Message:
189    announce_chwm: WWW pages wired, UUU pages usable.
190 
191    S: $info
192 
193    T: $init
194 
195    M: This message is produced when the CHWM paramter is specified on
196    the PARM CONFIG card. WWW is the number of wired pages in collection
197    one. UUU is the number of available main memory frames, including those
198    occupied by wired pages, but not those occupied by unpaged segments.
199 
200    A: $ignore
201 
202 
203    Message:
204    announce_chwm: WWW. words used of XXX. in unpaged_page_tables.
205 
206    S: $info
207 
208    T: $init
209 
210    M: This message is produced when the CHWM parameter is specified on
211    the PARM CONFIG card.  WWW is the number of words of the XXX word long
212    segment unpaged_page_tables used to hold page tables for permanent
213    "unpaged" segments.
214 
215    A: $ignore
216 
217    END MESSAGE DOCUMENTATION */
218 
219      end announce_chwm;