1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 announce_chwm:
20 proc ();
21
22
23
24
25
26
27
28
29
30
31
32 dcl parm_ptr pointer;
33
34 dcl ptp pointer;
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
62
63 announce_chwm$before:
64 entry ();
65
66
67
68 call config_$find_parm ("chwm", parm_ptr);
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
87
88 announce_chwm$after:
89 entry ();
90
91
92
93 call config_$find_parm ("chwm", parm_ptr);
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);
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);
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
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;
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
154
155
156
157
158 XXX
159
160
161
162
163
164
165
166 XXX
167
168
169
170
171
172
173
174 XXX
175
176
177
178
179
180
181 XXX
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204 XXX
205
206
207
208
209
210
211 XXX
212
213
214
215
216
217
218
219 end announce_chwm;