COMPILATION LISTING OF SEGMENT wire_pages Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1733.0 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* WIRE_PAGES/UNWIRE_PAGES - Commands to interface to ring-0 segment wiring primitive. 12* 13* Written 770210 by PG for Xerox/CMU Benchmarks. 14* Modified 770407 by PG for installation. 15**/ 16 17 wire_pages: 18 procedure options (variable); 19 20 /* automatic */ 21 22 dcl arg_len fixed bin (21), 23 arg_no fixed bin, 24 arg_ptr ptr, 25 bitcount fixed bin (24), 26 code fixed bin (35), 27 dname char (168), 28 ename char (32), 29 first_page fixed bin (18), 30 my_name char (12), 31 n_pages fixed bin (18), 32 1 oi aligned like object_info, 33 seg_ptr ptr, 34 text_flag bit (1) aligned, 35 wire_flag bit (1) aligned; 36 37 /* based */ 38 39 dcl arg_string char (arg_len) based (arg_ptr); 40 41 /* builtins */ 42 43 dcl (addr, divide, null, substr) builtin; 44 45 /* conditions */ 46 47 dcl cleanup condition; 48 49 /* entries */ 50 51 dcl com_err_ entry options (variable), 52 cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)), 53 expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)), 54 hcs_$initiate_count entry (char (*), char (*), char (*), fixed bin (24), fixed bin (2), ptr, fixed bin (35)), 55 hcs_$terminate_noname entry (ptr, fixed bin (35)), 56 hphcs_$user_wire entry (ptr, bit (1) aligned, fixed bin (18), fixed bin (18), fixed bin (35)), 57 object_info_$brief entry (ptr, fixed bin (24), ptr, fixed bin (35)); 58 59 /* external static */ 60 61 dcl (error_table_$badopt fixed bin (35), 62 error_table_$wrong_no_of_args fixed bin (35), 63 sys_info$page_size fixed bin (18)) external static; 64 65 /* include files */ 66 1 1 /* BEGIN INCLUDE FILE ... object_info.incl.pl1 1 2*coded February 8, 1972 by Michael J. Spier */ 1 3 /* modified May 26, 1972 by M. Weaver */ 1 4 /* modified 15 April, 1975 by M. Weaver */ 1 5 1 6 declare 1 object_info aligned based, /* structure containing object info based, returned by object_info_ */ 1 7 2 version_number fixed bin, /* version number of current structure format (=2) */ 1 8 2 textp pointer, /* pointer to beginning of text section */ 1 9 2 defp pointer, /* pointer to beginning of definition section */ 1 10 2 linkp pointer, /* pointer to beginning of linkage section */ 1 11 2 statp pointer, /* pointer to beginning of static section */ 1 12 2 symbp pointer, /* pointer to beginning of symbol section */ 1 13 2 bmapp pointer, /* pointer to beginning of break map (may be null) */ 1 14 2 tlng fixed bin, /* length in words of text section */ 1 15 2 dlng fixed bin, /* length in words of definition section */ 1 16 2 llng fixed bin, /* length in words of linkage section */ 1 17 2 ilng fixed bin, /* length in words of static section */ 1 18 2 slng fixed bin, /* length in words of symbol section */ 1 19 2 blng fixed bin, /* length in words of break map */ 1 20 2 format, /* word containing bit flags about object type */ 1 21 3 old_format bit(1) unaligned, /* on if segment isn't in new format, i.e. has old style object map */ 1 22 3 bound bit(1) unaligned, /* on if segment is bound */ 1 23 3 relocatable bit(1) unaligned, /* on if seg has relocation info in its first symbol block */ 1 24 3 procedure bit(1) unaligned, /* on if segment is an executable object program */ 1 25 3 standard bit(1) unaligned, /* on if seg is in standard format (more than just standard map) */ 1 26 3 gate bit(1) unaligned, /* on if segment is a gate */ 1 27 3 separate_static bit(1) unaligned, /* on if static not in linkage */ 1 28 3 links_in_text bit(1) unaligned, /* on if there are threaded links in text */ 1 29 3 perprocess_static bit (1) unaligned, /* on if static is not to be per run unit */ 1 30 3 pad bit(27) unaligned, 1 31 2 entry_bound fixed bin, /* entry bound if segment is a gate */ 1 32 2 textlinkp pointer, /* ptr to first link in text */ 1 33 1 34 /* LIMIT OF BRIEF STRUCTURE */ 1 35 1 36 2 compiler char(8) aligned, /* name of processor which generated segment */ 1 37 2 compile_time fixed bin(71), /* clock reading of date/time object was generated */ 1 38 2 userid char(32) aligned, /* standard Multics id of creator of object segment */ 1 39 2 cvers aligned, /* generator version name in printable char string form */ 1 40 3 offset bit(18) unaligned, /* offset of name in words relative to base of symbol section */ 1 41 3 length bit(18) unaligned, /* length of name in characters */ 1 42 2 comment aligned, /* printable comment concerning generator or generation of segment */ 1 43 3 offset bit(18) unaligned, /* offset of comment in words relative to base of symbol section */ 1 44 3 length bit(18) unaligned, /* length of comment in characters */ 1 45 2 source_map fixed bin, /* offset, relative to base of symbol section, of source map structure */ 1 46 1 47 /* LIMIT OF DISPLAY STRUCTURE */ 1 48 1 49 2 rel_text pointer, /* pointer to text section relocation info */ 1 50 2 rel_def pointer, /* pointer to definition section relocation info */ 1 51 2 rel_link pointer, /* pointer to linkage section relocation info */ 1 52 2 rel_static pointer, /* pointer to static section relocation info */ 1 53 2 rel_symbol pointer, /* pointer to symbol section relocation info */ 1 54 2 text_boundary fixed bin, /* specifies mod of text section base boundary */ 1 55 2 static_boundary fixed bin, /* specifies mod of internal static base boundary */ 1 56 /* currently not used by system */ 1 57 2 default_truncate fixed bin, /* offset rel to symbp for binder to automatically trunc. symb sect. */ 1 58 2 optional_truncate fixed bin; /* offset rel to symbp for binder to optionally trunc. symb sect. */ 1 59 1 60 declare object_info_version_2 fixed bin int static init(2); 1 61 1 62 /* END INCLUDE FILE ... object_info.incl.pl1 */ 67 68 69 /* program */ 70 71 wire_flag = "1"b; /* wire the seg down */ 72 my_name = "wire_pages"; 73 go to join; 74 75 unwire_pages: 76 entry options (variable); 77 78 wire_flag = "0"b; /* unwire the seg */ 79 my_name = "unwire_pages"; 80 81 join: 82 call cu_$arg_ptr (1, arg_ptr, arg_len, code); 83 if code ^= 0 84 then do; 85 if wire_flag 86 then call com_err_ (code, my_name, "Usage: wire_pages path {first_page n_pages} {-text}"); 87 else call com_err_ (code, my_name, "Usage: unwire_pages path"); 88 return; 89 end; 90 91 call expand_pathname_ (arg_string, dname, ename, code); 92 if code ^= 0 93 then do; 94 call com_err_ (code, my_name, "^a", arg_string); 95 return; 96 end; 97 98 first_page = 0; /* set defaults */ 99 n_pages = -1; /* to cover whole segment */ 100 seg_ptr = null; 101 text_flag = "0"b; /* default is to wire whole seg */ 102 103 on cleanup call clean_up; 104 105 arg_no = 2; 106 call cu_$arg_ptr (arg_no, arg_ptr, arg_len, code); 107 if wire_flag & (code = 0) /* any args for wire_pages? */ 108 then do; 109 if substr (arg_string, 1, 1) = "-" 110 then if arg_string = "-text" 111 then text_flag = "1"b; 112 else do; 113 call com_err_ (error_table_$badopt, my_name, "^a", arg_string); 114 return; 115 end; 116 else do; 117 118 /* User has specified first_page... */ 119 120 first_page = cv_num_ (arg_string, code); 121 if code ^= 0 122 then return; 123 124 arg_no = arg_no + 1; 125 call cu_$arg_ptr (arg_no, arg_ptr, arg_len, code); 126 if code ^= 0 127 then do; 128 call com_err_ (0, my_name, "If first_page is given, n_pages must be given."); 129 return; 130 end; 131 132 n_pages = cv_num_ (arg_string, code); 133 if code ^= 0 134 then return; /* message already printed */ 135 end; 136 137 arg_no = arg_no + 1; 138 call cu_$arg_ptr (arg_no, arg_ptr, arg_len, code); /* see if any more args... */ 139 end; 140 141 if code = 0 142 then do; 143 call com_err_ (error_table_$wrong_no_of_args, my_name, ""); 144 return; 145 end; 146 147 call hcs_$initiate_count (dname, ename, "", bitcount, 0, seg_ptr, code); 148 if seg_ptr = null 149 then do; 150 call com_err_ (code, my_name, "^a>^a", dname, ename); 151 return; 152 end; 153 154 if text_flag 155 then do; 156 oi.version_number = object_info_version_2; 157 call object_info_$brief (seg_ptr, bitcount, addr (oi), code); 158 if code ^= 0 159 then do; 160 call com_err_ (code, my_name, "Unable to determine length of text section of ^a>^a", 161 dname, ename); 162 call clean_up; 163 return; 164 end; 165 166 first_page = 0; 167 n_pages = divide (oi.tlng + sys_info$page_size - 1, sys_info$page_size, 18, 0); 168 end; 169 170 call hphcs_$user_wire (seg_ptr, wire_flag, first_page, n_pages, code); 171 if code ^= 0 172 then call com_err_ (code, my_name, "Cannot ^[wire^;unwire^] ^a>^a", wire_flag, dname, ename); 173 174 call clean_up; 175 return; 176 177 clean_up: 178 procedure; 179 180 call hcs_$terminate_noname (seg_ptr, code); 181 182 end clean_up; 183 184 185 cv_num_: 186 procedure (bv_arg_string, bv_code) returns (fixed bin (18)); 187 188 /* parameters */ 189 190 dcl (bv_arg_string char (*), 191 bv_code fixed bin (35)) parameter; 192 193 /* automatic */ 194 195 dcl num fixed bin (18); 196 197 /* builtins */ 198 199 dcl (length, substr) builtin; 200 201 /* entries */ 202 203 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin (35)), 204 cv_oct_check_ entry (char (*), fixed bin (35)) returns (fixed bin (35)); 205 206 /* program */ 207 208 if substr (bv_arg_string, length (bv_arg_string), 1) = "." 209 then num = cv_dec_check_ (substr (bv_arg_string, 1, length (bv_arg_string) - 1), bv_code); 210 else num = cv_oct_check_ (bv_arg_string, bv_code); 211 212 if bv_code ^= 0 213 then call com_err_ (0, my_name, "Non-^[decimal^;octal^] digit in position ^d of ""^a"".", 214 (substr (bv_arg_string, length (bv_arg_string), 1) = "."), bv_code, bv_arg_string); 215 216 return (num); 217 218 end cv_num_; 219 220 end /* wire_pages */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1518.8 wire_pages.pl1 >dumps>old>recomp>wire_pages.pl1 67 1 08/05/77 1022.5 object_info.incl.pl1 >ldd>include>object_info.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 43 ref 157 157 arg_len 000100 automatic fixed bin(21,0) dcl 22 set ref 81* 91 91 94 94 106* 109 109 113 113 120 120 125* 132 132 138* arg_no 000101 automatic fixed bin(17,0) dcl 22 set ref 105* 106* 124* 124 125* 137* 137 138* arg_ptr 000102 automatic pointer dcl 22 set ref 81* 91 94 106* 109 109 113 120 125* 132 138* arg_string based char unaligned dcl 39 set ref 91* 94* 109 109 113* 120* 132* bitcount 000104 automatic fixed bin(24,0) dcl 22 set ref 147* 157* bv_arg_string parameter char unaligned dcl 190 set ref 185 208 208 208 208 208 208 210* 212 212 212* bv_code parameter fixed bin(35,0) dcl 190 set ref 185 208* 210* 212 212* cleanup 000270 stack reference condition dcl 47 ref 103 code 000105 automatic fixed bin(35,0) dcl 22 set ref 81* 83 85* 87* 91* 92 94* 106* 107 120* 121 125* 126 132* 133 138* 141 147* 150* 157* 158 160* 170* 171 171* 180* com_err_ 000010 constant entry external dcl 51 ref 85 87 94 113 128 143 150 160 171 212 cu_$arg_ptr 000012 constant entry external dcl 51 ref 81 106 125 138 cv_dec_check_ 000034 constant entry external dcl 203 ref 208 cv_oct_check_ 000036 constant entry external dcl 203 ref 210 divide builtin function dcl 43 ref 167 dname 000106 automatic char(168) unaligned dcl 22 set ref 91* 147* 150* 160* 171* ename 000160 automatic char(32) unaligned dcl 22 set ref 91* 147* 150* 160* 171* error_table_$badopt 000026 external static fixed bin(35,0) dcl 61 set ref 113* error_table_$wrong_no_of_args 000030 external static fixed bin(35,0) dcl 61 set ref 143* expand_pathname_ 000014 constant entry external dcl 51 ref 91 first_page 000170 automatic fixed bin(18,0) dcl 22 set ref 98* 120* 166* 170* hcs_$initiate_count 000016 constant entry external dcl 51 ref 147 hcs_$terminate_noname 000020 constant entry external dcl 51 ref 180 hphcs_$user_wire 000022 constant entry external dcl 51 ref 170 length builtin function dcl 199 ref 208 208 208 212 my_name 000171 automatic char(12) unaligned dcl 22 set ref 72* 79* 85* 87* 94* 113* 128* 143* 150* 160* 171* 212* n_pages 000174 automatic fixed bin(18,0) dcl 22 set ref 99* 132* 167* 170* null builtin function dcl 43 ref 100 148 num 000304 automatic fixed bin(18,0) dcl 195 set ref 208* 210* 216 object_info based structure level 1 dcl 1-6 object_info_$brief 000024 constant entry external dcl 51 ref 157 object_info_version_2 constant fixed bin(17,0) initial dcl 1-60 ref 156 oi 000176 automatic structure level 1 dcl 22 set ref 157 157 seg_ptr 000264 automatic pointer dcl 22 set ref 100* 147* 148 157* 170* 180* substr builtin function dcl 199 in procedure "cv_num_" ref 208 208 208 212 substr builtin function dcl 43 in procedure "wire_pages" ref 109 sys_info$page_size 000032 external static fixed bin(18,0) dcl 61 ref 167 167 text_flag 000266 automatic bit(1) dcl 22 set ref 101* 109* 154 tlng 16 000176 automatic fixed bin(17,0) level 2 dcl 22 set ref 167 version_number 000176 automatic fixed bin(17,0) level 2 dcl 22 set ref 156* wire_flag 000267 automatic bit(1) dcl 22 set ref 71* 78* 85 107 170* 171* NAMES DECLARED BY EXPLICIT CONTEXT. clean_up 001156 constant entry internal dcl 177 ref 103 162 174 cv_num_ 001175 constant entry internal dcl 185 ref 120 132 join 000173 constant label dcl 81 ref 73 unwire_pages 000160 constant entry external dcl 75 wire_pages 000144 constant entry external dcl 17 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1562 1622 1355 1572 Length 2034 1355 40 175 205 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME wire_pages 332 external procedure is an external procedure. on unit on line 103 64 on unit clean_up 70 internal procedure is called by several nonquick procedures. cv_num_ internal procedure shares stack frame of external procedure wire_pages. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME wire_pages 000100 arg_len wire_pages 000101 arg_no wire_pages 000102 arg_ptr wire_pages 000104 bitcount wire_pages 000105 code wire_pages 000106 dname wire_pages 000160 ename wire_pages 000170 first_page wire_pages 000171 my_name wire_pages 000174 n_pages wire_pages 000176 oi wire_pages 000264 seg_ptr wire_pages 000266 text_flag wire_pages 000267 wire_flag wire_pages 000304 num cv_num_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_ptr cv_dec_check_ cv_oct_check_ expand_pathname_ hcs_$initiate_count hcs_$terminate_noname hphcs_$user_wire object_info_$brief THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$wrong_no_of_args sys_info$page_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 17 000143 71 000151 72 000153 73 000156 75 000157 78 000165 79 000166 81 000173 83 000212 85 000214 87 000244 88 000273 91 000274 92 000324 94 000326 95 000360 98 000361 99 000362 100 000364 101 000366 103 000367 105 000411 106 000413 107 000430 109 000435 113 000452 114 000504 115 000505 120 000506 121 000531 124 000533 125 000534 126 000551 128 000553 129 000600 132 000601 133 000624 137 000626 138 000627 141 000644 143 000646 144 000667 147 000670 148 000732 150 000736 151 000771 154 000772 156 000774 157 000776 158 001015 160 001017 162 001053 163 001057 166 001060 167 001061 170 001067 171 001106 174 001150 175 001154 177 001155 180 001163 182 001174 185 001175 208 001206 210 001247 212 001273 216 001347 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved