COMPILATION LISTING OF SEGMENT initialize_kst Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1002.0 mst Sat Options: optimize map 1 /****^ ****************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright (c) 1987 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* * Copyright (c) 1972 by Massachusetts Institute of * 9* * Technology and Honeywell Information Systems, Inc. * 10* * * 11* ****************************************************** */ 12 13 initialize_kst: proc (); 14 15 /* Initialize_kst is called during system initialization and process creation 16* to initialize the Known Segment Table and the Reference Name Table. 17* 18* LAST MODIFIED: 19* Feb 1983 by E. N. Kittlitz to set kst.allow_256K_connect for inzr 20* Nov 1979 by Mike Grady to set pds$max_lot_size to kst size for inzr 21* June 1979 by Mike Grady to not set stack_base_segno to pds for stack sharing 22* September 1977 by B. Greenberg to keep Initialhzer KST below initsegs during initialization. 23* March 1977 by M. Weaver to move rnt, search rule initialization to makestack 24* October 1975 by R. Bratt to not preinitialize all kstes 25* October 1975 by R. Bratt for prelinking 26* March 1975 by R. Bratt for the new KST / RNT 27* 28* USAGE: - - - call initialize_kst(); 29* 30* */ 31 1 1 /* START OF: kst.incl.pl1 * * * * * */ 1 2 1 3 /* 1 4*Modified March 1976 by R. Bratt 1 5*Modified November 1984 to remove hdr, Keith Loepere. */ 1 6 1 7 1 8 /****^ HISTORY COMMENTS: 1 9* 1) change(86-08-08,GDixon), approve(86-08-08,MCR7388), 1 10* audit(86-09-02,Farley), install(86-09-08,MR12.0-1150): 1 11* Add warning on use of kste.entryp. 1 12* END HISTORY COMMENTS */ 1 13 1 14 1 15 dcl pds$kstp ext ptr, 1 16 (kstp, kstep) ptr; 1 17 1 18 dcl 1 kst aligned based (kstp), /* KST header declaration */ 1 19 2 lowseg fixed bin (17), /* lowest segment number described by kst */ 1 20 2 highseg fixed bin (17), /* highest segment number described by kst */ 1 21 2 highest_used_segno fixed bin (17), /* highest segment number yet used */ 1 22 2 lvs fixed bin (8), /* number of private LVs this process is connected to */ 1 23 2 time_of_bootload fixed bin (71), /* bootload time during prelinking */ 1 24 2 garbage_collections fixed bin (17) unaligned, /* KST garbage collections */ 1 25 2 entries_collected fixed bin (17) unaligned, /* KST entries recovered by garbage collection */ 1 26 2 free_list bit (18) unaligned, /* relative pointer to first free kste */ 1 27 2 prelinked_ring (7) bit (1) unaligned, /* rings prelinked in process */ 1 28 2 template bit (1) unaligned, /* this is a template kst if set */ 1 29 2 allow_256K_connect bit (1) unaligned, /* can use 256K segments */ 1 30 2 unused_2 bit (9) unaligned, 1 31 2 uid_hash_bucket (0 : 127) bit (18) unaligned, /* hash buckets */ 1 32 2 kst_entry (0 refer (kst.lowseg):0 refer (kst.highseg)) aligned like kste, /* kst entries */ 1 33 2 lv (1:256) bit (36), /* private logical volume connection list */ 1 34 2 end_of_kst bit (36); 1 35 1 36 dcl 1 kste based (kstep) aligned, /* KST entry declaration */ 1 37 2 fp bit (18) unaligned, /* forward rel pointer */ 1 38 2 segno fixed bin (17) unaligned, /* segment number of this kste */ 1 39 2 usage_count (0:7) fixed bin (8) unaligned, /* outstanding initiates/ring */ 1 40 2 entryp ptr unaligned, /* branch pointer */ 1 41 /* See WARNING below for requirements to use entryp. */ 1 42 2 uid bit (36) aligned, /* unique identifier */ 1 43 2 access_information unaligned, 1 44 3 dtbm bit (36), /* date time branch modified */ 1 45 3 extended_access bit (33), /* extended access from the branch */ 1 46 3 access bit (3), /* rew */ 1 47 3 ex_rb (3) bit (3), /* ring brackets from branch */ 1 48 2 pad1 bit (3) unaligned, 1 49 2 flags unaligned, 1 50 3 dirsw bit (1), /* directory switch */ 1 51 3 allow_write bit (1), /* set if initiated with write permission */ 1 52 3 priv_init bit (1), /* privileged initiation */ 1 53 3 tms bit (1), /* transparent modification switch */ 1 54 3 tus bit (1), /* transparent usage switch */ 1 55 3 tpd bit (1), /* transparent paging device switch */ 1 56 3 audit bit (1), /* audit switch */ 1 57 3 explicit_deact_ok bit (1), /* set if I am willing to have a user force deactivate */ 1 58 3 pad bit (3), 1 59 2 infcount fixed bin (12) unaligned; /* _i_f dirsw _t_h_e_n inferior count _e_l_s_e lv index */ 1 60 1 61 1 62 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 63 /* */ 1 64 /* WARNING: Before using kste.entryp to get a pointer to the directory */ 1 65 /* entry associated with the kst entry, you must first validate its value */ 1 66 /* by calling sum$getbranch or sum$getbranch_root_my. This call also locks */ 1 67 /* the containing directory. The containing directory must remain locked */ 1 68 /* during the entire period when kste.entryp and the directory entry are */ 1 69 /* being referenced. Once the directory is unlocked, kste.entryp can no */ 1 70 /* longer be used to get a pointer to the entry within the unlocked */ 1 71 /* directory since the dir entry could have been moved within the directory */ 1 72 /* by another processor. */ 1 73 /* */ 1 74 /* If you only need a pointer to the directory containing the associated */ 1 75 /* dir entry (but not to the dir entry itself), you can use: */ 1 76 /* pointer (kste.entryp, 0) */ 1 77 /* without calling sum to lock the directory and validate entryp. GDixon */ 1 78 /* */ 1 79 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 80 1 81 /* END OF: kst.incl.pl1 * * * * * */ 32 2 1 /* BEGIN INCLUDE FILE slt.incl.pl1 --- Last modified 2/76 SHW */ 2 2 2 3 /* Declarations for Segment Loading Table header and array. 2 4* 2 5* Used by Initialization and MST Checker subroutines */ 2 6 2 7 dcl sltp ptr, /* pointer to base of SLT segment */ 2 8 names_ptr ptr, /* pointer to base of SLT names segment */ 2 9 namep ptr, /* pointer to segment name list block */ 2 10 pathp ptr, /* pointer to segment's directory path name */ 2 11 aclp ptr; /* pointer to acl structure */ 2 12 2 13 declare 1 slt based (sltp) aligned, /* declaration of Segment Loading Table (SLT) */ 2 14 2 name_seg_ptr ptr, /* words 0-1, pointer (ITS pair) to name segment */ 2 15 2 free_core_start fixed bin (24), /* word 2, start of free core after perm-wired */ 2 16 2 first_sup_seg fixed bin (18), /* word 3, first supervisor segment number */ 2 17 2 last_sup_seg fixed bin (18), /* word 4, last supervisor segment number */ 2 18 2 first_init_seg fixed bin (18), /* word 5, first initializer segment number */ 2 19 2 last_init_seg fixed bin (18), /* word 6, last initializer segment number */ 2 20 2 free_core_size fixed bin (24), /* size (in words) of free core after perm-wired */ 2 21 2 seg (0:8191) aligned, /* segment entries (4 words each) */ 2 22 3 slte (4) fixed bin (35); /* Space for SLT entries */ 2 23 2 24 /* auxiliary segment of SLT for storing of segment names and directory path names */ 2 25 2 26 declare 1 name_seg based (names_ptr) aligned, /* name segment header */ 2 27 2 pad bit (18) unal, 2 28 2 next_loc bit (18) unal, /* Next available free location in name seg */ 2 29 2 ht (0:127) bit (18) aligned; /* Names hash table */ 2 30 2 31 declare 1 segnam based (namep) aligned, /* declaration for segment name block */ 2 32 2 count fixed bin (17), /* number of segment names in this block */ 2 33 2 names (50 refer (segnam.count)), /* segment name array */ 2 34 3 hp bit (18) unal, /* hash thread pointer */ 2 35 3 ref bit (1) unal, /* "1"b if name referenced */ 2 36 3 pad bit (5) unal, 2 37 3 segno bit (12) unal, /* segment number associated with this name */ 2 38 3 name char (32) unal; /* space for name (max 32 characters) */ 2 39 2 40 declare 1 path based (pathp) aligned, /* declaration for directory path name */ 2 41 2 size fixed bin (17), /* length of pathname */ 2 42 2 name char (168 refer (path.size)) unal, /* directory path name */ 2 43 2 acls fixed bin; /* ACL list starts here */ 2 44 2 45 declare 1 acls based (aclp) aligned, /* declaration for acl list */ 2 46 2 count fixed bin, /* number of entries in acl list */ 2 47 2 acl (50 refer (acls.count)), /* array of acl entries */ 2 48 3 userid char (32), /* user specification */ 2 49 3 mode bit (36) aligned, /* mode for the specified user */ 2 50 3 pad bit (36) aligned, 2 51 3 code fixed bin; 2 52 2 53 2 54 /* END INCLUDE FILE slt.incl.pl1 */ 33 34 35 dcl (baseno, addr, fixed, string) builtin; 36 37 38 dcl first_time bit (1), 39 this_is_initializer bit (1), 40 highseg fixed bin, 41 i fixed bin; 42 43 dcl kst_seg$ ext, 44 slt$ ext, 45 pds$max_lot_size (0:7) fixed bin ext, 46 pds$processid bit (36) aligned ext, 47 tc_data$initializer_id bit (36) aligned ext, 48 49 dseg$ (0: 1) fixed bin (71) ext, 50 active_all_rings_data$stack_base_segno fixed bin (18) ext, /* segno of first stack segment */ 51 (active_all_rings_data$hcscnt, active_all_rings_data$max_segno) ext fixed bin (17), 52 pds$ fixed bin ext; 53 54 55 kstp = addr (kst_seg$); /* Get a pointer to the KST seg */ 56 this_is_initializer = (pds$processid = tc_data$initializer_id); /* set initializer flag */ 57 58 if this_is_initializer then 59 if kst.lowseg ^= 0 then 60 first_time = "0"b; 61 else first_time = "1"b; 62 63 if this_is_initializer & first_time then do; 64 highseg = addr (slt$) -> slt.first_init_seg - 1; 65 kst.allow_256K_connect = "1"b; 66 end; 67 else highseg = active_all_rings_data$max_segno; 68 69 if this_is_initializer & ^first_time then do; 70 kst.highseg = highseg; /* Expand mx limit, init segs gone. */ 71 pds$max_lot_size (*) = highseg + 1; 72 return; 73 end; 74 75 pds$kstp = kstp; /* initialize pointer to kst */ 76 if string (kst.prelinked_ring) = "0"b 77 then do; /* only initialize if not prelinked process */ 78 kst.lowseg = active_all_rings_data$hcscnt; 79 if kst.highseg = 0 then kst.highseg = highseg; 80 kst.highest_used_segno = kst.lowseg + 7; 81 kst.free_list = "0"b; 82 /* reserve kstes for stacks */ 83 do i = kst.lowseg to kst.lowseg + 7; 84 kst.kst_entry (i).fp = (18)"1"b; 85 kst.kst_entry (i).segno = i; 86 end; 87 end; 88 89 return; 90 91 92 93 end initialize_kst; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0805.3 initialize_kst.pl1 >spec>install>1111>initialize_kst.pl1 32 1 09/18/86 1308.1 kst.incl.pl1 >ldd>include>kst.incl.pl1 33 2 05/24/82 1005.0 slt.incl.pl1 >ldd>include>slt.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. active_all_rings_data$hcscnt 000024 external static fixed bin(17,0) dcl 43 ref 78 active_all_rings_data$max_segno 000026 external static fixed bin(17,0) dcl 43 ref 67 addr builtin function dcl 35 ref 55 64 allow_256K_connect 7(26) based bit(1) level 2 packed packed unaligned dcl 1-18 set ref 65* first_init_seg 5 based fixed bin(18,0) level 2 dcl 2-13 ref 64 first_time 000102 automatic bit(1) packed unaligned dcl 38 set ref 58* 61* 63 69 fp 110 based bit(18) array level 3 packed packed unaligned dcl 1-18 set ref 84* free_list 7 based bit(18) level 2 packed packed unaligned dcl 1-18 set ref 81* highest_used_segno 2 based fixed bin(17,0) level 2 dcl 1-18 set ref 80* highseg 000104 automatic fixed bin(17,0) dcl 38 in procedure "initialize_kst" set ref 64* 67* 70 71 79 highseg 1 based fixed bin(17,0) level 2 in structure "kst" dcl 1-18 in procedure "initialize_kst" set ref 70* 79 79* i 000105 automatic fixed bin(17,0) dcl 38 set ref 83* 84 85 85* kst based structure level 1 dcl 1-18 kst_entry 110 based structure array level 2 dcl 1-18 kst_seg$ 000012 external static fixed bin(17,0) dcl 43 set ref 55 kste based structure level 1 dcl 1-36 kstp 000100 automatic pointer dcl 1-15 set ref 55* 58 65 70 75 76 78 79 79 80 80 81 83 83 84 85 lowseg based fixed bin(17,0) level 2 dcl 1-18 set ref 58 78* 80 83 83 84 85 pds$kstp 000010 external static pointer dcl 1-15 set ref 75* pds$max_lot_size 000016 external static fixed bin(17,0) array dcl 43 set ref 71* pds$processid 000020 external static bit(36) dcl 43 ref 56 prelinked_ring 7(18) based bit(1) array level 2 packed packed unaligned dcl 1-18 ref 76 segno 110(18) based fixed bin(17,0) array level 3 packed packed unaligned dcl 1-18 set ref 85* slt based structure level 1 dcl 2-13 slt$ 000014 external static fixed bin(17,0) dcl 43 set ref 64 string builtin function dcl 35 ref 76 tc_data$initializer_id 000022 external static bit(36) dcl 43 ref 56 this_is_initializer 000103 automatic bit(1) packed unaligned dcl 38 set ref 56* 58 63 69 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. aclp automatic pointer dcl 2-7 acls based structure level 1 dcl 2-45 active_all_rings_data$stack_base_segno external static fixed bin(18,0) dcl 43 baseno builtin function dcl 35 dseg$ external static fixed bin(71,0) array dcl 43 fixed builtin function dcl 35 kstep automatic pointer dcl 1-15 name_seg based structure level 1 dcl 2-26 namep automatic pointer dcl 2-7 names_ptr automatic pointer dcl 2-7 path based structure level 1 dcl 2-40 pathp automatic pointer dcl 2-7 pds$ external static fixed bin(17,0) dcl 43 segnam based structure level 1 dcl 2-31 sltp automatic pointer dcl 2-7 NAME DECLARED BY EXPLICIT CONTEXT. initialize_kst 000001 constant entry external dcl 13 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 250 300 134 260 Length 502 134 30 166 113 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME initialize_kst 73 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME initialize_kst 000100 kstp initialize_kst 000102 first_time initialize_kst 000103 this_is_initializer initialize_kst 000104 highseg initialize_kst 000105 i initialize_kst THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as return_mac ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. active_all_rings_data$hcscnt active_all_rings_data$max_segno kst_seg$ pds$kstp pds$max_lot_size pds$processid slt$ tc_data$initializer_id LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000000 55 000006 56 000010 58 000014 61 000021 63 000023 64 000027 65 000033 66 000035 67 000036 69 000040 70 000044 71 000045 72 000063 75 000064 76 000065 78 000070 79 000072 80 000076 81 000101 83 000103 84 000113 85 000125 86 000131 89 000133 ----------------------------------------------------------- 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