COMPILATION LISTING OF SEGMENT amu_translate_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx. Az., Sys-M Compiled on: 07/28/87 0927.2 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 amu_translate_: proc (); 7 8 return; /* not an entrypoint */ 9 10 /* format: style4,delnl,insnl,ifthenstmt,indnoniterend,ifthendo,ifthen,^thendo */ 11 12 /* This procedure manages the translation table associated with an amu_info. 13* It adds, deletes, and locates translation entries. 14* 15* Note: for the moment, the translation table is just an unordered array. It would 16* be good to make it ordered someday, so we could search it with a binary search. 17* 18* 09/06/80 W. Olin Sibert 19**/ 20 21 dcl ( 22 P_amu_info_ptr pointer, 23 P_segno fixed bin, 24 P_translation_ptr pointer, 25 P_size fixed bin, 26 P_code fixed bin (35) 27 ) parameter; 28 29 dcl idx fixed bin; 30 dcl segno fixed bin; 31 32 dcl amu_error_ entry options (variable); 33 34 dcl ( 35 amu_et_$bad_segno, 36 amu_et_$trans_exists, 37 amu_et_$no_translation 38 ) fixed bin (35) external static; 39 40 dcl (addr, min, null, unspec) builtin; 41 42 43 44 amu_translate_$get: 45 entry (P_amu_info_ptr, P_segno, P_translation_ptr, P_code); 46 47 /* This entry is used to get a pointer to the translation info for a particular segment */ 48 49 amu_info_ptr = P_amu_info_ptr; 50 segno = P_segno; 51 52 if (segno < 0) | (segno > 4095) then do; 53 call amu_error_ (amu_info_ptr, amu_et_$bad_segno, "^d", segno); 54 P_code = amu_et_$bad_segno; 55 return; 56 end; 57 if ^translation_table.valid (segno) then do; /* segno does not exist in foreign address space */ 58 P_code = amu_et_$no_translation; 59 P_translation_ptr = null (); 60 return; 61 end; 62 63 do idx = 1 to translation_table.n_entries; 64 if segno = translation_table.segno (idx) then do; 65 P_translation_ptr = addr (translation_table.array (idx)); 66 P_code = 0; 67 return; 68 end; 69 end; 70 71 P_translation_ptr = null (); /* didn't find it */ 72 /* call amu_debug$proc (amu_info_ptr); */ 73 P_code = amu_et_$no_translation; 74 return; /* end of code for this entrypoint */ 75 76 77 78 amu_translate_$allocate: 79 entry (P_amu_info_ptr, P_size); 80 81 /* This entry is used to initially allocate an empty translation table of the specified size */ 82 83 amu_info_ptr = P_amu_info_ptr; 84 alloc_translation_table_max_entries = P_size; 85 86 allocate translation_table in (amu_area) set (amu_info.translation_table_ptr); 87 88 unspec (translation_table) = ""b; 89 90 translation_table.max_entries = alloc_translation_table_max_entries; 91 translation_table.n_entries = 0; 92 93 return; /* end of code for this entrypoint */ 94 95 96 97 amu_translate_$add: 98 entry (P_amu_info_ptr, P_translation_ptr, P_segno, P_code); 99 100 /* This entry is used to add a new translation to the list of translations. */ 101 102 amu_info_ptr = P_amu_info_ptr; 103 segno = P_segno; 104 if translation_table.valid (segno) then do; 105 P_code = amu_et_$trans_exists; 106 return; 107 end; 108 109 add_it: 110 if translation_table.n_entries >= translation_table.max_entries then 111 /* too big, must reallocate */ 112 call reallocate_translation_table (); 113 114 idx = translation_table.n_entries + 1; 115 translation_table.array (idx) = P_translation_ptr -> translation, by name; 116 translation_table.valid (segno) = "1"b; 117 translation_table.used (idx) = "1"b; 118 translation_table.n_entries = idx; 119 P_code = 0; 120 return; /* end of code for this entrypoint */ 121 amu_translate_$force_add: 122 entry (P_amu_info_ptr, P_translation_ptr, P_segno, P_code); 123 amu_info_ptr = P_amu_info_ptr; 124 segno = P_segno; 125 if translation_table.valid (segno) then do; 126 do idx = 1 to translation_table.n_entries; 127 if translation_table.array (idx).segno = segno then do; 128 translation_table.array (idx) = P_translation_ptr -> translation; 129 P_code = 0; 130 return; 131 end; 132 end; 133 end; 134 else goto add_it; 135 return; 136 137 138 139 140 141 reallocate_translation_table: 142 proc (); 143 144 /* This procedure reallocates the translation table, copying all the old information, 145* and doubling the size of the table. */ 146 147 dcl old_tt pointer; 148 dcl new_tt pointer; 149 dcl copy_idx fixed bin; 150 151 152 old_tt = amu_info.translation_table_ptr; 153 154 if translation_table.max_entries >= 4096 then 155 call amu_error_ (amu_info_ptr, 0, "Translation table is full. Cannot reallocate."); 156 157 alloc_translation_table_max_entries = min (4096, 2 * translation_table.max_entries); 158 allocate translation_table in (amu_area) set (new_tt); 159 160 unspec (new_tt -> translation_table) = ""b; 161 new_tt -> translation_table.max_entries = alloc_translation_table_max_entries; 162 new_tt -> translation_table.n_entries = old_tt -> translation_table.n_entries; 163 new_tt -> translation_table.valid_array = old_tt -> translation_table.valid_array; 164 new_tt -> translation_table.used_array = old_tt -> translation_table.used_array; 165 166 do copy_idx = 1 to new_tt -> translation_table.n_entries; 167 new_tt -> translation_table.array (copy_idx) = old_tt -> translation_table.array (copy_idx); 168 end; 169 170 171 amu_info.translation_table_ptr = new_tt; 172 process_info.address_map_ptr = new_tt; 173 free old_tt -> translation_table in (amu_area); 174 175 return; 176 end reallocate_translation_table; 177 178 1 1 /* BEGIN INCLUDE FILE amu_info.incl.pl1 */ 1 2 1 3 dcl 1 amu_info aligned based (amu_info_ptr), 1 4 2 version char (8) aligned, /* AMU_INFO_VERSION */ 1 5 2 flags aligned, 1 6 3 early_dump bit(1) unal, 1 7 3 pad bit(35) unal, 1 8 2 type fixed bin unal, /* One of the types below */ 1 9 2 time_created fixed bin (71) aligned, /* time created -- for debugging purposes */ 1 10 2 chain, /* a chain of all the amu_info's which exist */ 1 11 3 prev pointer unaligned, 1 12 3 next pointer unaligned, 1 13 1 14 2 area_ptr pointer, /* pointer to area used for allocating things */ 1 15 1 16 2 translation_table_ptr pointer, /* pointer to address map -- always present */ 1 17 /* SEE: amu_translation.incl.pl1 */ 1 18 2 fdump_info_ptr pointer, 1 19 /* pointer to FDUMP info, present if looking at an FDUMP */ 1 20 /* SEE: amu_fdump_info.incl.pl1 */ 1 21 /* old_uid_table pointer if looking at a SAVED PROC. */ 1 22 /* See: amu_old_uid_table */ 1 23 1 24 1 25 2 hardcore_info_ptr pointer, /* pointer to hardcore information -- always present */ 1 26 /* SEE: amu_hardcore_info.incl.pl1 */ 1 27 2 copy_chain pointer, /* pointer to info about segment copies */ 1 28 /* SEE: amu_copy_info.incl.pl1 */ 1 29 2 process_info_ptr pointer, /* pointer to process info for this translation */ 1 30 /* SEE: amu_process_info.incl.pl1 */ 1 31 2 process_idx fixed bin, /* index of process in translation-specifc process table */ 1 32 1 33 2 proc_idx_hold fixed bin, /* a place to keep the index when a changing to another proc */ 1 34 1 35 2 error_info, /* various info about how amu_error_ is to behave */ 1 36 3 error_flags aligned, 1 37 4 handler_exists bit (1) unaligned, /* set to indicate existence of an amu_error handler */ 1 38 4 in_subsystem bit (1) unaligned, /* This amu_info belongs to an ssu_ maintained subsystem */ 1 39 4 pad bit (34) unaligned, 1 40 3 sci_ptr pointer, /* sci_ptr for subsystem, if in_subsystem = "1"b */ 1 41 2 definitions_info_ptr ptr; 1 42 1 43 dcl amu_area area based (amu_info.area_ptr); 1 44 1 45 dcl amu_info_ptr pointer; 1 46 1 47 dcl (FDUMP_TYPE init (1037), /* the various legitimate types of amu_info's */ 1 48 FDUMP_PROCESS_TYPE init (1038), 1 49 ONLINE_TYPE init (1039), 1 50 ONLINE_PROCESS_TYPE init (1040), 1 51 NETWORK_FDUMP_TYPE init (1041), 1 52 NETWORK_ONLINE_TYPE init (1042), 1 53 SAVED_PROC_TYPE init (1043), 1 54 INDIRECT_TYPE init (1044)) fixed bin internal static options (constant); 1 55 1 56 dcl AMU_INFO_VERSION_1 char (8) internal static options (constant) init ("amu_v1"); 1 57 dcl AMU_INFO_VERSION char (8) internal static options (constant) init ("amu_v1"); 1 58 dcl AMU_INFO_VERSION_2 char (8) internal static options (constant) init ("amu_v2"); 1 59 1 60 dcl PDIR_SUFFIX char(4) init("pdir") int static options(constant); 1 61 1 62 /* END INCLUDE FILE amu_info.incl.pl1 */ 179 180 2 1 /* BEGIN INCLUDE FILE amu_translation.incl.pl1 */ 2 2 2 3 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(87-01-16,Parisek), approve(87-07-16,MCR7746), 2 7* audit(87-07-16,Fawcett), install(87-07-28,MR12.1-1049): 2 8* Added the "replaced" field to record whether a segment was replaced by 2 9* another segment via the "replace" request. 2 10* END HISTORY COMMENTS */ 2 11 2 12 2 13 dcl 1 translation_table aligned based (amu_info.translation_table_ptr), 2 14 2 n_entries fixed bin, 2 15 2 max_entries fixed bin, 2 16 2 17 2 valid_array aligned, /* one bit for each valid segno */ 2 18 3 valid (0 : 4095) bit (1) unaligned, 2 19 2 used_array aligned, /* one bit for each existing translation */ 2 20 3 used (0 : 4095) bit (1) unaligned, 2 21 2 22 2 array (alloc_translation_table_max_entries refer (translation_table.max_entries)) like translation; 2 23 2 24 dcl 1 translation aligned based (translation_ptr), /* a single translation */ 2 25 2 segno fixed bin (18) unsigned unaligned, /* foreign segno for this translation */ 2 26 2 flags unaligned, 2 27 3 two_part bit (1) unaligned, /* segment is in two pieces -- from an FDUMP */ 2 28 3 in_dump bit (1) unaligned, /* segment is part of an FDUMP image */ 2 29 3 in_temp_seg bit (1) unaligned, /* segment is a copy at the base of a temp segment */ 2 30 3 in_perm_seg bit (1) unaligned, /* segment is in the file system */ 2 31 3 in_dp_dir bit (1) unaligned, 2 32 3 replaced bit (1) unaligned, 2 33 3 pad bit (12) unaligned, 2 34 2 part1, /* pointer to first (possibly only) part of segment */ 2 35 3 ptr pointer unaligned, 2 36 3 lth fixed bin (19), 2 37 2 part2 like translation.part1; 2 38 2 39 dcl alloc_translation_table_max_entries fixed bin; 2 40 dcl translation_ptr pointer; 2 41 2 42 /* END INCLUDE FILE amu_translation.incl.pl1 */ 181 182 3 1 /* BEGIN INCLUDE FILE amu_process_info.incl.pl1 */ 3 2 3 3 /* This structure describes information about a single process in an address 3 4* translation. It is only relevant for translations involving the online system 3 5* or an FDUMP. */ 3 6 3 7 dcl 1 process_info aligned based (amu_info.process_info_ptr), /* information about a single process */ 3 8 2 pid bit (36) aligned, /* process_id of this process */ 3 9 2 address_map_ptr pointer unaligned, /* pointer to address map */ 3 10 2 idx fixed bin, /* index of process in FDUMP, or apte index if online */ 3 11 2 state fixed bin, /* state, from the APTE -- only good for FDUMP */ 3 12 3 13 2 dbr fixed bin (71), /* DBR of this process */ 3 14 3 15 2 apte aligned, /* pointer to this process's APTE */ 3 16 3 foreign_ptr pointer unaligned, 3 17 3 local_ptr pointer unaligned, 3 18 2 prds aligned like process_info.apte, /* and PRDS, IFF it has one (is running) -- volatile */ 3 19 2 dseg aligned like process_info.apte, /* DSEG -- These values must be constantly recalculated */ 3 20 2 pds aligned like process_info.apte, /* PDS --- for an online process, if phcs transparency */ 3 21 2 kst aligned like process_info.apte, /* KST --- is not in use. */ 3 22 3 23 2 dump_segx, /* index of first and last seg belonging to this */ 3 24 3 first fixed bin, /* process in bos_dump.seg_array, or zero if none */ 3 25 3 last fixed bin, /* this information is only valid for a process in a dump */ 3 26 3 27 2 pad1 fixed bin; 3 28 3 29 /* END INCLUDE FILE amu_process_info.incl.pl1 */ 183 184 end amu_translate_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/28/87 0927.2 amu_translate_.pl1 >spec>install>MR12.1-1049>amu_translate_.pl1 179 1 11/20/84 0856.1 amu_info.incl.pl1 >ldd>include>amu_info.incl.pl1 181 2 07/28/87 0927.3 amu_translation.incl.pl1 >spec>install>MR12.1-1049>amu_translation.incl.pl1 183 3 11/20/84 0856.2 amu_process_info.incl.pl1 >ldd>include>amu_process_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. P_amu_info_ptr parameter pointer dcl 21 ref 44 49 78 83 97 102 121 123 P_code parameter fixed bin(35,0) dcl 21 set ref 44 54* 58* 66* 73* 97 105* 119* 121 129* P_segno parameter fixed bin(17,0) dcl 21 ref 44 50 97 103 121 124 P_size parameter fixed bin(17,0) dcl 21 ref 78 84 P_translation_ptr parameter pointer dcl 21 set ref 44 59* 65* 71* 97 115 121 128 addr builtin function dcl 40 ref 65 address_map_ptr 1 based pointer level 2 packed unaligned dcl 3-7 set ref 172* alloc_translation_table_max_entries 000104 automatic fixed bin(17,0) dcl 2-39 set ref 84* 86 86 90 157* 158 158 161 amu_area based area(1024) dcl 1-43 ref 86 158 173 amu_error_ 000010 constant entry external dcl 32 ref 53 154 amu_et_$bad_segno 000012 external static fixed bin(35,0) dcl 34 set ref 53* 54 amu_et_$no_translation 000016 external static fixed bin(35,0) dcl 34 ref 58 73 amu_et_$trans_exists 000014 external static fixed bin(35,0) dcl 34 ref 105 amu_info based structure level 1 dcl 1-3 amu_info_ptr 000102 automatic pointer dcl 1-45 set ref 49* 53* 57 63 64 65 83* 86 86 88 90 91 102* 104 109 109 114 115 116 117 118 123* 125 126 127 128 152 154 154* 157 158 171 172 173 apte 6 based structure level 2 dcl 3-7 area_ptr 10 based pointer level 2 dcl 1-3 ref 86 158 173 array 346 based structure array level 2 dcl 2-13 set ref 65 115* 128* 167* 167 copy_idx 000126 automatic fixed bin(17,0) dcl 149 set ref 166* 167 167* idx 000100 automatic fixed bin(17,0) dcl 29 set ref 63* 64 65* 114* 115 115 115 115 115 115 115 115 115 115 115 115 115 115 115 117 118 126* 127 128* max_entries 1 based fixed bin(17,0) level 2 dcl 2-13 set ref 86* 88 90* 109 154 157 158* 160 161* 173 min builtin function dcl 40 ref 157 n_entries based fixed bin(17,0) level 2 dcl 2-13 set ref 63 91* 109 114 118* 126 162* 162 166 new_tt 000124 automatic pointer dcl 148 set ref 158* 160 161 162 163 164 166 167 171 172 null builtin function dcl 40 ref 59 71 old_tt 000122 automatic pointer dcl 147 set ref 152* 162 163 164 167 173 part1 347 based structure array level 3 in structure "translation_table" dcl 2-13 in procedure "amu_translate_" part1 1 based structure level 2 in structure "translation" dcl 2-24 in procedure "amu_translate_" process_info based structure level 1 dcl 3-7 process_info_ptr 22 based pointer level 2 dcl 1-3 ref 172 segno 000101 automatic fixed bin(17,0) dcl 30 in procedure "amu_translate_" set ref 50* 52 52 53* 57 64 103* 104 116 124* 125 127 segno 346 based fixed bin(18,0) array level 3 in structure "translation_table" packed unsigned unaligned dcl 2-13 in procedure "amu_translate_" set ref 64 127 translation based structure level 1 dcl 2-24 ref 115 128 translation_table based structure level 1 dcl 2-13 set ref 86 88* 158 160* 173 translation_table_ptr 12 based pointer level 2 dcl 1-3 set ref 57 63 64 65 86* 88 90 91 104 109 109 114 115 116 117 118 125 126 127 128 152 154 157 171* unspec builtin function dcl 40 set ref 88* 160* used 164 based bit(1) array level 3 packed unaligned dcl 2-13 set ref 117* used_array 164 based structure level 2 dcl 2-13 set ref 164* 164 valid 2 based bit(1) array level 3 packed unaligned dcl 2-13 set ref 57 104 116* 125 valid_array 2 based structure level 2 dcl 2-13 set ref 163* 163 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AMU_INFO_VERSION internal static char(8) initial unaligned dcl 1-57 AMU_INFO_VERSION_1 internal static char(8) initial unaligned dcl 1-56 AMU_INFO_VERSION_2 internal static char(8) initial unaligned dcl 1-58 FDUMP_PROCESS_TYPE internal static fixed bin(17,0) initial dcl 1-47 FDUMP_TYPE internal static fixed bin(17,0) initial dcl 1-47 INDIRECT_TYPE internal static fixed bin(17,0) initial dcl 1-47 NETWORK_FDUMP_TYPE internal static fixed bin(17,0) initial dcl 1-47 NETWORK_ONLINE_TYPE internal static fixed bin(17,0) initial dcl 1-47 ONLINE_PROCESS_TYPE internal static fixed bin(17,0) initial dcl 1-47 ONLINE_TYPE internal static fixed bin(17,0) initial dcl 1-47 PDIR_SUFFIX internal static char(4) initial unaligned dcl 1-60 SAVED_PROC_TYPE internal static fixed bin(17,0) initial dcl 1-47 translation_ptr automatic pointer dcl 2-40 NAMES DECLARED BY EXPLICIT CONTEXT. add_it 000274 constant label dcl 109 ref 125 amu_translate_ 000025 constant entry external dcl 6 amu_translate_$add 000243 constant entry external dcl 97 amu_translate_$allocate 000174 constant entry external dcl 78 amu_translate_$force_add 000400 constant entry external dcl 121 amu_translate_$get 000040 constant entry external dcl 44 reallocate_translation_table 000462 constant entry internal dcl 141 ref 109 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 772 1012 621 1002 Length 1252 621 20 224 150 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME amu_translate_ 136 external procedure is an external procedure. reallocate_translation_table internal procedure shares stack frame of external procedure amu_translate_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME amu_translate_ 000100 idx amu_translate_ 000101 segno amu_translate_ 000102 amu_info_ptr amu_translate_ 000104 alloc_translation_table_max_entries amu_translate_ 000122 old_tt reallocate_translation_table 000124 new_tt reallocate_translation_table 000126 copy_idx reallocate_translation_table THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return_mac ext_entry op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. amu_error_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. amu_et_$bad_segno amu_et_$no_translation amu_et_$trans_exists LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000024 8 000032 44 000033 49 000052 50 000056 52 000060 53 000063 54 000112 55 000116 57 000117 58 000124 59 000127 60 000131 63 000132 64 000141 65 000151 66 000154 67 000156 69 000157 71 000161 73 000163 74 000167 78 000170 83 000201 84 000205 86 000207 88 000222 90 000232 91 000234 93 000235 97 000236 102 000255 103 000261 104 000263 105 000270 106 000273 109 000274 114 000302 115 000306 116 000361 117 000365 118 000371 119 000373 120 000375 121 000376 123 000412 124 000416 125 000420 126 000425 127 000435 128 000445 129 000454 130 000456 132 000457 135 000461 141 000462 152 000463 154 000466 157 000516 158 000526 160 000540 161 000550 162 000552 163 000554 164 000560 166 000563 167 000571 168 000602 171 000604 172 000607 173 000612 175 000620 ----------------------------------------------------------- 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