COMPILATION LISTING OF SEGMENT copy_on_write_handler_ 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 0958.3 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* format: style4,delnl,insnl,tree,ifthenstmt,indnoniterend */ 14 copy_on_write_handler_: 15 procedure (mcptr, cname, dummy1, dummy2) returns (bit (1) aligned); 16 17 /* Modified 6/77 by M. Weaver to save lot entry */ 18 /* Modified 6/79 by C. Hornig to work in ring 0 */ 19 /* Modified May 1981 by C. Hornig to really work in any ring */ 20 /* Modified November 1984 by Keith Loepere to rename terminate to terminate_. */ 21 22 /* Parameters */ 23 24 dcl cname char (*) parameter; 25 dcl (dummy1, dummy2) ptr parameter; 26 dcl mcptr ptr parameter; /* pointer to machine conditions */ 27 28 /* Automatic */ 29 30 dcl 1 old_status like branch; /* status of faulted segment */ 31 dcl old_segno fixed bin (15); /* segment number of faulted segment */ 32 dcl old_ptr ptr; /* pointer to faulted segment */ 33 dcl old_dirname char (168); /* directory containing faulted segment */ 34 dcl old_ename char (32); /* and its entry name */ 35 36 dcl new_ptr ptr; /* pointer to copy */ 37 dcl new_dirname char (168); /* directory containing copy */ 38 dcl new_ename char (32); /* entry name of copy */ 39 40 dcl maxlength fixed bin (19); /* max length of segment */ 41 dcl size fixed bin (21); /* size of segment in words */ 42 dcl rb (3) fixed bin (6); /* ring brackets of copy */ 43 dcl group_id char (32); /* group ID for ACL's */ 44 dcl ref_names (10) char (32); /* refnames so they can be put back */ 45 dcl saved_lote bit (36) aligned; /* LOT entry for the same reason */ 46 dcl code fixed bin (35); 47 dcl i fixed bin; 48 dcl initiate_entry variable entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 49 /* hcs_$initiate is saved here in case we have no linkage sectoion */ 50 dcl ( 51 val_ring, /* validation ring at time of fault */ 52 my_ring, /* current ring of execution */ 53 x_ring, /* ring of execution at time of fault */ 54 t_ring /* validation ring of faulting reference */ 55 ) fixed bin (3); 56 dcl saved_useable_lot bit (1) aligned; /* whether LOT was good when fault happened */ 57 58 /* Entries callable in any ring */ 59 60 dcl hcs_$level_get entry () returns (fixed bin (3)); 61 dcl hcs_$level_set entry (fixed bin (3)); 62 dcl hcs_$append_branchx 63 entry (char (*), char (*), fixed bin (5), (3) fixed bin (6), char (*), fixed bin (1), fixed bin (1), 64 fixed bin (24), fixed bin (35)); 65 dcl hcs_$fs_get_path_name entry (ptr, char (*), fixed bin, char (*), fixed bin (35)); 66 dcl hcs_$set_bc_seg entry (ptr, fixed bin (24), fixed bin (35)); 67 dcl hcs_$fs_get_ref_name entry (ptr, fixed bin, char (*), fixed bin (35)); 68 dcl hcs_$status_long entry (char (*), char (*), fixed bin (1), ptr, ptr, fixed bin (35)); 69 dcl hcs_$get_max_length entry (char(*), char(*), fixed bin (19), fixed bin(35)); 70 dcl hcs_$set_max_length_seg entry (ptr, fixed bin (19), fixed bin (35)); 71 dcl hcs_$terminate_seg entry (ptr, fixed bin, fixed bin (35)); 72 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 73 74 /* User-ring entries */ 75 76 dcl unique_chars_ entry (bit (*)) returns (char (15)); 77 dcl get_group_id_ entry returns (char (32)); 78 dcl get_pdir_ entry returns (char (168)); 79 dcl get_ring_ entry returns (fixed bin (3)); 80 81 /* Hardcore entries */ 82 83 dcl makeunknown_ entry (fixed bin (15), bit (2) aligned, bit (1) aligned, fixed bin (35)); 84 dcl initiate entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 85 86 dcl pds$process_dir_name char (32) ext; 87 dcl pds$process_group_id char (32) ext; 88 dcl pds$useable_lot (0:7) ext bit unaligned; 89 90 /* External static */ 91 92 dcl error_table_$no_s_permission ext fixed bin (35); 93 dcl sys_info$page_size fixed bin ext static; 94 95 /* Builtins */ 96 97 dcl (addr, baseptr, baseno, binary, max, null, pointer, unspec) builtin; 98 99 dcl cleanup condition; 100 101 /* Based */ 102 103 dcl move char (size) based aligned; 104 105 scup = addr (mcptr -> mc.scu); 106 old_segno = binary (scu.tpr.tsr, 15); /* extract segment number */ 107 x_ring = binary (scu.ppr.prr, 3); /* ring that faulted */ 108 val_ring = hcs_$level_get (); /* save the validation level */ 109 my_ring = get_ring_ (); /* find ring we are in now */ 110 if x_ring < my_ring then return ("1"b); /* must have crawled out already */ 111 t_ring = binary (scu.tpr.trr, 3); /* validation ring of reference */ 112 if my_ring = 0 then saved_useable_lot = pds$useable_lot (t_ring); 113 /* we have to restore this later */ 114 on cleanup 115 begin; /* restore in case of accidents */ 116 if my_ring = 0 then pds$useable_lot (t_ring) = saved_useable_lot; 117 call hcs_$level_set (val_ring); 118 end; 119 call hcs_$level_set (t_ring); /* set validation level */ 120 121 old_ptr = baseptr (old_segno); 122 call hcs_$fs_get_path_name (old_ptr, old_dirname, (0), old_ename, code); 123 /* get path name of faulted sgement */ 124 if code ^= 0 then goto error; 125 call hcs_$status_long (old_dirname, old_ename, 1, addr (old_status), null (), code); 126 /* get its copy switch */ 127 if (code ^= 0) & (code ^= error_table_$no_s_permission) then goto error; 128 if old_status.copy_switch = "0"b then goto error; /* no copy switch set */ 129 call hcs_$get_max_length (old_dirname, old_ename, maxlength, code); 130 if (code ^= 0) & (code ^= error_table_$no_s_permission) then goto error; 131 t_ring = max (t_ring, binary (old_status.ring_brackets (0), 3)); 132 /* update t_ring from ring brackets */ 133 if my_ring = 0 then saved_useable_lot = pds$useable_lot (t_ring); 134 /* must save it again */ 135 call hcs_$level_set (t_ring); 136 137 /* find ring whose lot entry is saved */ 138 139 if /* case */ my_ring = 0 then do; 140 pds$useable_lot (t_ring) = "0"b; /* this allows faults on the LOT to work */ 141 new_dirname = pds$process_dir_name; 142 group_id = pds$process_group_id; 143 end; 144 else if t_ring ^= x_ring /* someday we should be able to handle this case */ 145 then goto error; 146 else do; 147 sb = pointer (mcptr -> mc.prs (6), 0); /* get ptr to our stack */ 148 new_dirname = get_pdir_ (); 149 group_id = get_group_id_ (); 150 end; 151 152 /* Copy switch was ON, do the copy on write work */ 153 154 new_ename = unique_chars_ ("0"b) || ".cp." || old_ename; 155 do i = 1 to 3; /* compute new ring brackets */ 156 rb (i) = max (t_ring, binary (old_status.ring_brackets (i - 1), 3)); 157 end; 158 call hcs_$append_branchx (new_dirname, new_ename, 01110b, rb, group_id, 0, 0, binary (old_status.bit_count, 24), 159 code); /* create the copy */ 160 if code ^= 0 then goto error; 161 call hcs_$initiate (new_dirname, new_ename, "", 0, 0, new_ptr, code); 162 /* get a pointer to it */ 163 if new_ptr = null () then goto error; 164 call hcs_$set_max_length_seg (new_ptr, maxlength, code); 165 if code ^= 0 then goto error; 166 size = binary (old_status.current_length, 12) * sys_info$page_size * 4; 167 new_ptr -> move = old_ptr -> move; /* copy the segment */ 168 169 /* now swap the new segment for the old one */ 170 /* NOTE: we don't seem to do the right thing by known counts; this is hard to fix. 171* Don't do so well by refnames, either, if you have more than 10. */ 172 173 if my_ring = 0 then do; 174 call makeunknown_ (binary (baseno (new_ptr), 15), "01"b, (""b), code); 175 if code ^= 0 then goto error; /* make the new copy unknown */ 176 call makeunknown_ (old_segno, "11"b, (""b), code); 177 /* free up the segment number */ 178 if code ^= 0 then goto error; 179 call initiate (new_dirname, new_ename, "", 1, 0, old_ptr, code); 180 /* make the copy known with the old segment number */ 181 pds$useable_lot (t_ring) = saved_useable_lot;/* restore useable_lot */ 182 if code ^= 0 then goto error; 183 end; 184 else do; 185 call hcs_$terminate_seg (new_ptr, 0, code); /* terminate new copy */ 186 if code ^= 0 then goto error; 187 do i = 1 to 10 while (code = 0); /* save the refnames */ 188 call hcs_$fs_get_ref_name (old_ptr, i, ref_names (i), code); 189 end; 190 saved_lote = unspec (stack_header.lot_ptr -> lot.lp (old_segno)); 191 /* and the LOT entry */ 192 initiate_entry = hcs_$initiate; /* must save since our linkage section is going away */ 193 call hcs_$terminate_seg (old_ptr, 1, code); /* terminate old segment */ 194 if code ^= 0 then goto error; 195 call initiate_entry (new_dirname, new_ename, "", 1, 0, old_ptr, code); 196 /* initiate new one in its place */ 197 if code ^= 0 then goto error; 198 unspec (stack_header.lot_ptr -> lot.lp (old_segno)) = saved_lote; 199 /* restore LOT entry */ 200 do i = 1 to i - 1; /* and ref names */ 201 call hcs_$initiate (new_dirname, new_ename, ref_names (i), 0, 0, old_ptr, code); 202 end; 203 end; 204 205 call hcs_$level_set (val_ring); /* restore saved validation level */ 206 return ("0"b); 207 208 error: /* an error has occurred */ 209 call hcs_$level_set (val_ring); /* restore validation level */ 210 if my_ring = 0 then pds$useable_lot (t_ring) = saved_useable_lot; 211 return ("1"b); 212 1 1 1 2 declare /* Information returned by hcs_$status_ and hcs_$status_long */ 1 3 1 4 1 5 1 branch aligned based (info_ptr), /* information about this particular branch */ 1 6 2 type bit (2) unal, /* "00"b = link, "01"b = segment, "10"b = directory */ 1 7 2 nnames bit (16) unal, /* number of names this entry has */ 1 8 2 names_relp bit (18) unal, /* pointer, relative to base of segment, to names */ 1 9 2 dtm bit (36) unal, /* date-time the segment was last modified */ 1 10 2 dtu bit (36) unal, /* date-time the segment was last used */ 1 11 2 mode bit (5) unal, /* the user's access modes to the entry */ 1 12 2 padding bit (13) unal, /* yawn */ 1 13 2 records_used bit (18) unal, /* number of blocks actually occupied by entry */ 1 14 1 15 /* limit of information returned by status_ */ 1 16 1 17 2 dtd bit (36) unal, /* date-time the segment was last dumped */ 1 18 2 dtbm bit (36) unal, /* date-time the branch for the entry was modified */ 1 19 2 account bit (36) unal, /* account to which storage is charged */ 1 20 2 current_length bit (12) unal, /* maximum length in blocks */ 1 21 2 bit_count bit (24) unal, /* length of entry in bits */ 1 22 2 device_id bit (4) unal, /* device on which segment currently resides */ 1 23 2 mdid bit (4) unal, /* device to which it is currently being moved */ 1 24 2 copy_switch bit (1) unal, /* segment copy switch */ 1 25 2 tpd bit (1) unal, /* transparent paging device switch */ 1 26 2 more_padding bit (8) unal, /* yawn, yawn */ 1 27 2 ring_brackets (0:2) bit (6) unal, /* ring brackets for entry */ 1 28 2 uid bit (36) unal, /* unique identifier */ 1 29 1 30 1 31 1 link aligned based (info_ptr), /* information about link entries */ 1 32 2 type bit (2) unal, /* as above */ 1 33 2 nnames bit (16) unal, /* number of names for this link */ 1 34 2 names_relp bit (18) unal, /* as above */ 1 35 2 dtbm bit (36) unal, /* date-time, entry for link was last modified */ 1 36 2 dtd bit (36) unal, /* date-time dumped */ 1 37 2 pathname_length bit (18) unal, /* length of link pathname */ 1 38 2 pathname_relp bit (18) unal, /* pointer, relative to based of segment, to name */ 1 39 1 40 entry_names (1) character (32) aligned based (pointer (area_pointer, branch.names_relp)), 1 41 /* array of names returned */ 1 42 pathname character (fixed (link.pathname_length)) aligned based (pointer (area_pointer, link.pathname_relp)), 1 43 /* pathname a link points to */ 1 44 1 45 area_pointer pointer, /* to area in which to allocate names */ 1 46 info_ptr pointer; /* to structure returned */ 1 47 1 48 213 2 1 /* */ 2 2 /* BEGIN INCLUDE FILE mc.incl.pl1 Created Dec 72 for 6180 - WSS. */ 2 3 /* Modified 06/07/76 by Greenberg for mc.resignal */ 2 4 /* Modified 07/07/76 by Morris for fault register data */ 2 5 /* Modified 08/28/80 by J. A. Bush for the DPS8/70M CVPU */ 2 6 /* Modified '82 to make values constant */ 2 7 2 8 /* words 0-15 pointer registers */ 2 9 2 10 dcl mcp ptr; 2 11 2 12 dcl 1 mc based (mcp) aligned, 2 13 2 prs (0:7) ptr, /* POINTER REGISTERS */ 2 14 (2 regs, /* registers */ 2 15 3 x (0:7) bit (18), /* index registers */ 2 16 3 a bit (36), /* accumulator */ 2 17 3 q bit (36), /* q-register */ 2 18 3 e bit (8), /* exponent */ 2 19 3 pad1 bit (28), 2 20 3 t bit (27), /* timer register */ 2 21 3 pad2 bit (6), 2 22 3 ralr bit (3), /* ring alarm register */ 2 23 2 24 2 scu (0:7) bit (36), 2 25 2 26 2 mask bit (72), /* mem controller mask at time of fault */ 2 27 2 ips_temp bit (36), /* Temporary storage for IPS info */ 2 28 2 errcode fixed bin (35), /* fault handler's error code */ 2 29 2 fim_temp, 2 30 3 unique_index bit (18) unal, /* unique index for restarting faults */ 2 31 3 resignal bit (1) unal, /* recompute signal name with fcode below */ 2 32 3 fcode bit (17) unal, /* fault code used as index to FIM table and SCT */ 2 33 2 fault_reg bit (36), /* fault register */ 2 34 2 pad2 bit (1), 2 35 2 cpu_type fixed bin (2) unsigned, /* L68 = 0, DPS8/70M = 1 */ 2 36 2 ext_fault_reg bit (15), /* extended fault reg for DPS8/70M CPU */ 2 37 2 fault_time bit (54), /* time of fault */ 2 38 2 39 2 eis_info (0:7) bit (36)) unaligned; 2 40 2 41 2 42 dcl (apx fixed bin init (0), 2 43 abx fixed bin init (1), 2 44 bpx fixed bin init (2), 2 45 bbx fixed bin init (3), 2 46 lpx fixed bin init (4), 2 47 lbx fixed bin init (5), 2 48 spx fixed bin init (6), 2 49 sbx fixed bin init (7)) internal static options (constant); 2 50 2 51 2 52 2 53 2 54 dcl scup ptr; 2 55 2 56 dcl 1 scu based (scup) aligned, /* SCU DATA */ 2 57 2 58 2 59 /* WORD (0) */ 2 60 2 61 (2 ppr, /* PROCEDURE POINTER REGISTER */ 2 62 3 prr bit (3), /* procedure ring register */ 2 63 3 psr bit (15), /* procedure segment register */ 2 64 3 p bit (1), /* procedure privileged bit */ 2 65 2 66 2 apu, /* APPENDING UNIT STATUS */ 2 67 3 xsf bit (1), /* ext seg flag - IT modification */ 2 68 3 sdwm bit (1), /* match in SDW Ass. Mem. */ 2 69 3 sd_on bit (1), /* SDW Ass. Mem. ON */ 2 70 3 ptwm bit (1), /* match in PTW Ass. Mem. */ 2 71 3 pt_on bit (1), /* PTW Ass. Mem. ON */ 2 72 3 pi_ap bit (1), /* Instr Fetch or Append cycle */ 2 73 3 dsptw bit (1), /* Fetch of DSPTW */ 2 74 3 sdwnp bit (1), /* Fetch of SDW non paged */ 2 75 3 sdwp bit (1), /* Fetch of SDW paged */ 2 76 3 ptw bit (1), /* Fetch of PTW */ 2 77 3 ptw2 bit (1), /* Fetch of pre-paged PTW */ 2 78 3 fap bit (1), /* Fetch of final address paged */ 2 79 3 fanp bit (1), /* Fetch of final address non-paged */ 2 80 3 fabs bit (1), /* Fetch of final address absolute */ 2 81 2 82 2 fault_cntr bit (3), /* number of retrys of EIS instructions */ 2 83 2 84 2 85 /* WORD (1) */ 2 86 2 87 2 fd, /* FAULT DATA */ 2 88 3 iro bit (1), /* illegal ring order */ 2 89 3 oeb bit (1), /* out of execute bracket */ 2 90 3 e_off bit (1), /* no execute */ 2 91 3 orb bit (1), /* out of read bracket */ 2 92 3 r_off bit (1), /* no read */ 2 93 3 owb bit (1), /* out of write bracket */ 2 94 3 w_off bit (1), /* no write */ 2 95 3 no_ga bit (1), /* not a gate */ 2 96 3 ocb bit (1), /* out of call bracket */ 2 97 3 ocall bit (1), /* outward call */ 2 98 3 boc bit (1), /* bad outward call */ 2 99 3 inret bit (1), /* inward return */ 2 100 3 crt bit (1), /* cross ring transfer */ 2 101 3 ralr bit (1), /* ring alarm register */ 2 102 3 am_er bit (1), /* associative memory fault */ 2 103 3 oosb bit (1), /* out of segment bounds */ 2 104 3 paru bit (1), /* processor parity upper */ 2 105 3 parl bit (1), /* processor parity lower */ 2 106 3 onc_1 bit (1), /* op not complete type 1 */ 2 107 3 onc_2 bit (1), /* op not complete type 2 */ 2 108 2 109 2 port_stat, /* PORT STATUS */ 2 110 3 ial bit (4), /* illegal action lines */ 2 111 3 iac bit (3), /* illegal action channel */ 2 112 3 con_chan bit (3), /* connect channel */ 2 113 2 114 2 fi_num bit (5), /* (fault/interrupt) number */ 2 115 2 fi_flag bit (1), /* 1 => fault, 0 => interrupt */ 2 116 2 117 2 118 /* WORD (2) */ 2 119 2 120 2 tpr, /* TEMPORARY POINTER REGISTER */ 2 121 3 trr bit (3), /* temporary ring register */ 2 122 3 tsr bit (15), /* temporary segment register */ 2 123 2 124 2 pad2 bit (9), 2 125 2 126 2 cpu_no bit (3), /* CPU number */ 2 127 2 128 2 delta bit (6), /* tally modification DELTA */ 2 129 2 130 2 131 /* WORD (3) */ 2 132 2 133 2 word3 bit (18), 2 134 2 135 2 tsr_stat, /* TSR STATUS for 1,2,&3 word instructions */ 2 136 3 tsna, /* Word 1 status */ 2 137 4 prn bit (3), /* Word 1 PR number */ 2 138 4 prv bit (1), /* Word 1 PR valid bit */ 2 139 3 tsnb, /* Word 2 status */ 2 140 4 prn bit (3), /* Word 2 PR number */ 2 141 4 prv bit (1), /* Word 2 PR valid bit */ 2 142 3 tsnc, /* Word 3 status */ 2 143 4 prn bit (3), /* Word 3 PR number */ 2 144 4 prv bit (1), /* Word 3 PR valid bit */ 2 145 2 146 2 tpr_tbr bit (6), /* TPR.TBR field */ 2 147 2 148 2 149 /* WORD (4) */ 2 150 2 151 2 ilc bit (18), /* INSTRUCTION COUNTER */ 2 152 2 153 2 ir, /* INDICATOR REGISTERS */ 2 154 3 zero bit (1), /* zero indicator */ 2 155 3 neg bit (1), /* negative indicator */ 2 156 3 carry bit (1), /* carryry indicator */ 2 157 3 ovfl bit (1), /* overflow indicator */ 2 158 3 eovf bit (1), /* eponent overflow */ 2 159 3 eufl bit (1), /* exponent underflow */ 2 160 3 oflm bit (1), /* overflow mask */ 2 161 3 tro bit (1), /* tally runout */ 2 162 3 par bit (1), /* parity error */ 2 163 3 parm bit (1), /* parity mask */ 2 164 3 bm bit (1), /* ^bar mode */ 2 165 3 tru bit (1), /* truncation mode */ 2 166 3 mif bit (1), /* multi-word instruction mode */ 2 167 3 abs bit (1), /* absolute mode */ 2 168 3 hex bit (1), /* hexadecimal exponent mode */ 2 169 3 pad bit (3), 2 170 2 171 2 172 /* WORD (5) */ 2 173 2 174 2 ca bit (18), /* COMPUTED ADDRESS */ 2 175 2 176 2 cu, /* CONTROL UNIT STATUS */ 2 177 3 rf bit (1), /* on first cycle of repeat instr */ 2 178 3 rpt bit (1), /* repeat instruction */ 2 179 3 rd bit (1), /* repeat double instruction */ 2 180 3 rl bit (1), /* repeat link instruciton */ 2 181 3 pot bit (1), /* IT modification */ 2 182 3 pon bit (1), /* return type instruction */ 2 183 3 xde bit (1), /* XDE from Even location */ 2 184 3 xdo bit (1), /* XDE from Odd location */ 2 185 3 poa bit (1), /* operation preparation */ 2 186 3 rfi bit (1), /* tells CPU to refetch instruction */ 2 187 3 its bit (1), /* ITS modification */ 2 188 3 if bit (1), /* fault occured during instruction fetch */ 2 189 2 190 2 cpu_tag bit (6)) unaligned, /* computed tag field */ 2 191 2 192 2 193 /* WORDS (6,7) */ 2 194 2 195 2 even_inst bit (36), /* even instruction of faulting pair */ 2 196 2 197 2 odd_inst bit (36); /* odd instruction of faulting pair */ 2 198 2 199 2 200 2 201 2 202 2 203 2 204 /* ALTERNATE SCU DECLARATION */ 2 205 2 206 2 207 dcl 1 scux based (scup) aligned, 2 208 2 209 (2 pad0 bit (36), 2 210 2 211 2 fd, /* GROUP II FAULT DATA */ 2 212 3 isn bit (1), /* illegal segment number */ 2 213 3 ioc bit (1), /* illegal op code */ 2 214 3 ia_am bit (1), /* illegal address - modifier */ 2 215 3 isp bit (1), /* illegal slave procedure */ 2 216 3 ipr bit (1), /* illegal procedure */ 2 217 3 nea bit (1), /* non existent address */ 2 218 3 oobb bit (1), /* out of bounds */ 2 219 3 pad bit (29), 2 220 2 221 2 pad2 bit (36), 2 222 2 223 2 pad3a bit (18), 2 224 2 225 2 tsr_stat (0:2), /* TSR STATUS as an ARRAY */ 2 226 3 prn bit (3), /* PR number */ 2 227 3 prv bit (1), /* PR valid bit */ 2 228 2 229 2 pad3b bit (6)) unaligned, 2 230 2 231 2 pad45 (0:1) bit (36), 2 232 2 233 2 instr (0:1) bit (36); /* Instruction ARRAY */ 2 234 2 235 2 236 2 237 /* END INCLUDE FILE mc.incl.pl1 */ 214 3 1 /* BEGIN INCLUDE FILE -- lot.incl.pl1 S.Webber 9/74, Modified by R. Bratt 04/76, modified by M. Weaver 7/76 */ 3 2 /* modified by M. Weaver 3/77 */ 3 3 3 4 dcl lotp ptr; 3 5 3 6 dcl 1 lot based (lotp) aligned, 3 7 2 lp (0:9999) ptr unaligned; /* array of packed pointers to linkage sections */ 3 8 3 9 dcl lot_fault bit (36) aligned static options (constant) init ("111000000000000000000000000000000000"b); 3 10 /* lot fault has fault code = 0 and offset = 0 */ 3 11 3 12 dcl isotp ptr; 3 13 dcl 1 isot based (isotp) aligned, 3 14 2 isp (0:9999) ptr unaligned; 3 15 3 16 dcl 1 isot1 (0 :9999) aligned based, 3 17 2 flags unaligned, 3 18 3 fault bit (2) unaligned, 3 19 3 system bit (1) unaligned, 3 20 3 mbz bit (6) unaligned, 3 21 2 fault_code fixed bin (8) unaligned, 3 22 2 static_offset bit (18) unaligned; 3 23 3 24 3 25 /* END INCLUDE FILE lot.incl.pl1 */ 215 4 1 /* BEGIN INCLUDE FILE ... stack_header.incl.pl1 .. 3/72 Bill Silver */ 4 2 /* modified 7/76 by M. Weaver for *system links and more system use of areas */ 4 3 /* modified 3/77 by M. Weaver to add rnt_ptr */ 4 4 /* Modified April 1983 by C. Hornig for tasking */ 4 5 4 6 /****^ HISTORY COMMENTS: 4 7* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), 4 8* audit(86-08-05,Schroth), install(86-11-03,MR12.0-1206): 4 9* added the heap_header_ptr definition. 4 10* 2) change(86-08-12,Kissel), approve(86-08-12,MCR7473), 4 11* audit(86-10-10,Fawcett), install(86-11-03,MR12.0-1206): 4 12* Modified to support control point management. These changes were actually 4 13* made in February 1985 by G. Palter. 4 14* 3) change(86-10-22,Fawcett), approve(86-10-22,MCR7473), 4 15* audit(86-10-22,Farley), install(86-11-03,MR12.0-1206): 4 16* Remove the old_lot pointer and replace it with cpm_data_ptr. Use the 18 4 17* bit pad after cur_lot_size for the cpm_enabled. This was done to save some 4 18* space int the stack header and change the cpd_ptr unal to cpm_data_ptr 4 19* (ITS pair). 4 20* END HISTORY COMMENTS */ 4 21 4 22 /* format: style2 */ 4 23 4 24 dcl sb ptr; /* the main pointer to the stack header */ 4 25 4 26 dcl 1 stack_header based (sb) aligned, 4 27 2 pad1 (4) fixed bin, /* (0) also used as arg list by outward_call_handler */ 4 28 2 cpm_data_ptr ptr, /* (4) pointer to control point which owns this stack */ 4 29 2 combined_stat_ptr ptr, /* (6) pointer to area containing separate static */ 4 30 2 clr_ptr ptr, /* (8) pointer to area containing linkage sections */ 4 31 2 max_lot_size fixed bin (17) unal, /* (10) DU number of words allowed in lot */ 4 32 2 main_proc_invoked fixed bin (11) unal, /* (10) DL nonzero if main procedure invoked in run unit */ 4 33 2 have_static_vlas bit (1) unal, /* (10) DL "1"b if (very) large arrays are being used in static */ 4 34 2 pad4 bit (2) unal, 4 35 2 run_unit_depth fixed bin (2) unal, /* (10) DL number of active run units stacked */ 4 36 2 cur_lot_size fixed bin (17) unal, /* (11) DU number of words (entries) in lot */ 4 37 2 cpm_enabled bit (18) unal, /* (11) DL non-zero if control point management is enabled */ 4 38 2 system_free_ptr ptr, /* (12) pointer to system storage area */ 4 39 2 user_free_ptr ptr, /* (14) pointer to user storage area */ 4 40 2 null_ptr ptr, /* (16) */ 4 41 2 stack_begin_ptr ptr, /* (18) pointer to first stack frame on the stack */ 4 42 2 stack_end_ptr ptr, /* (20) pointer to next useable stack frame */ 4 43 2 lot_ptr ptr, /* (22) pointer to the lot for the current ring */ 4 44 2 signal_ptr ptr, /* (24) pointer to signal procedure for current ring */ 4 45 2 bar_mode_sp ptr, /* (26) value of sp before entering bar mode */ 4 46 2 pl1_operators_ptr ptr, /* (28) pointer to pl1_operators_$operator_table */ 4 47 2 call_op_ptr ptr, /* (30) pointer to standard call operator */ 4 48 2 push_op_ptr ptr, /* (32) pointer to standard push operator */ 4 49 2 return_op_ptr ptr, /* (34) pointer to standard return operator */ 4 50 2 return_no_pop_op_ptr 4 51 ptr, /* (36) pointer to standard return / no pop operator */ 4 52 2 entry_op_ptr ptr, /* (38) pointer to standard entry operator */ 4 53 2 trans_op_tv_ptr ptr, /* (40) pointer to translator operator ptrs */ 4 54 2 isot_ptr ptr, /* (42) pointer to ISOT */ 4 55 2 sct_ptr ptr, /* (44) pointer to System Condition Table */ 4 56 2 unwinder_ptr ptr, /* (46) pointer to unwinder for current ring */ 4 57 2 sys_link_info_ptr ptr, /* (48) pointer to *system link name table */ 4 58 2 rnt_ptr ptr, /* (50) pointer to Reference Name Table */ 4 59 2 ect_ptr ptr, /* (52) pointer to event channel table */ 4 60 2 assign_linkage_ptr ptr, /* (54) pointer to storage for (obsolete) hcs_$assign_linkage */ 4 61 2 heap_header_ptr ptr, /* (56) pointer to the heap header for this ring */ 4 62 2 trace, 4 63 3 frames, 4 64 4 count fixed bin, /* (58) number of trace frames */ 4 65 4 top_ptr ptr unal, /* (59) pointer to last trace frame */ 4 66 3 in_trace bit (36) aligned, /* (60) trace antirecursion flag */ 4 67 2 pad2 bit (36), /* (61) */ 4 68 2 pad5 pointer; /* (62) pointer to future stuff */ 4 69 4 70 /* The following offset refers to a table within the pl1 operator table. */ 4 71 4 72 dcl tv_offset fixed bin init (361) internal static; 4 73 /* (551) octal */ 4 74 4 75 4 76 /* The following constants are offsets within this transfer vector table. */ 4 77 4 78 dcl ( 4 79 call_offset fixed bin init (271), 4 80 push_offset fixed bin init (272), 4 81 return_offset fixed bin init (273), 4 82 return_no_pop_offset fixed bin init (274), 4 83 entry_offset fixed bin init (275) 4 84 ) internal static; 4 85 4 86 4 87 4 88 4 89 4 90 /* The following declaration is an overlay of the whole stack header. Procedures which 4 91* move the whole stack header should use this overlay. 4 92**/ 4 93 4 94 dcl stack_header_overlay (size (stack_header)) fixed bin based (sb); 4 95 4 96 4 97 4 98 /* END INCLUDE FILE ... stack_header.incl.pl1 */ 216 217 218 end copy_on_write_handler_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0804.8 copy_on_write_handler_.pl1 >spec>install>1110>copy_on_write_handler_.pl1 213 1 04/29/76 1139.2 status_info.incl.pl1 >ldd>include>status_info.incl.pl1 214 2 12/15/83 1100.4 mc.incl.pl1 >ldd>include>mc.incl.pl1 215 3 08/05/77 1022.4 lot.incl.pl1 >ldd>include>lot.incl.pl1 216 4 11/07/86 1550.3 stack_header.incl.pl1 >ldd>include>stack_header.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 97 ref 105 125 125 baseno builtin function dcl 97 ref 174 174 baseptr builtin function dcl 97 ref 121 binary builtin function dcl 97 ref 106 107 111 131 156 158 158 166 174 174 bit_count 7(12) 000100 automatic bit(24) level 2 packed packed unaligned dcl 30 set ref 158 158 branch based structure level 1 dcl 1-2 cleanup 000436 stack reference condition dcl 99 ref 114 cname parameter char packed unaligned dcl 24 ref 14 code 000422 automatic fixed bin(35,0) dcl 46 set ref 122* 124 125* 127 127 129* 130 130 158* 160 161* 164* 165 174* 175 176* 178 179* 182 185* 186 187 188* 193* 194 195* 197 201* copy_switch 10(08) 000100 automatic bit(1) level 2 packed packed unaligned dcl 30 set ref 128 current_length 7 000100 automatic bit(12) level 2 packed packed unaligned dcl 30 set ref 166 dummy1 parameter pointer dcl 25 ref 14 dummy2 parameter pointer dcl 25 ref 14 error_table_$no_s_permission 000056 external static fixed bin(35,0) dcl 92 ref 127 130 get_group_id_ 000036 constant entry external dcl 77 ref 149 get_pdir_ 000040 constant entry external dcl 78 ref 148 get_ring_ 000042 constant entry external dcl 79 ref 109 group_id 000271 automatic char(32) packed unaligned dcl 43 set ref 142* 149* 158* hcs_$append_branchx 000014 constant entry external dcl 62 ref 158 hcs_$fs_get_path_name 000016 constant entry external dcl 65 ref 122 hcs_$fs_get_ref_name 000020 constant entry external dcl 67 ref 188 hcs_$get_max_length 000024 constant entry external dcl 69 ref 129 hcs_$initiate 000032 constant entry external dcl 72 ref 161 192 201 hcs_$level_get 000010 constant entry external dcl 60 ref 108 hcs_$level_set 000012 constant entry external dcl 61 ref 117 119 135 205 208 hcs_$set_max_length_seg 000026 constant entry external dcl 70 ref 164 hcs_$status_long 000022 constant entry external dcl 68 ref 125 hcs_$terminate_seg 000030 constant entry external dcl 71 ref 185 193 i 000423 automatic fixed bin(17,0) dcl 47 set ref 155* 156 156* 187* 188* 188* 200* 200* 201* initiate 000046 constant entry external dcl 84 ref 179 initiate_entry 000424 automatic entry variable dcl 48 set ref 192* 195 lot based structure level 1 dcl 3-6 lot_ptr 26 based pointer level 2 dcl 4-26 ref 190 198 lp based pointer array level 2 packed packed unaligned dcl 3-6 set ref 190 198* makeunknown_ 000044 constant entry external dcl 83 ref 174 176 max builtin function dcl 97 ref 131 156 maxlength 000264 automatic fixed bin(19,0) dcl 40 set ref 129* 164* mc based structure level 1 dcl 2-12 mcptr parameter pointer dcl 26 ref 14 105 147 move based char dcl 103 set ref 167* 167 my_ring 000431 automatic fixed bin(3,0) dcl 50 set ref 109* 110 112 116 133 139 173 210 new_dirname 000202 automatic char(168) packed unaligned dcl 37 set ref 141* 148* 158* 161* 179* 195* 201* new_ename 000254 automatic char(32) packed unaligned dcl 38 set ref 154* 158* 161* 179* 195* 201* new_ptr 000200 automatic pointer dcl 36 set ref 161* 163 164* 167 174 174 185* null builtin function dcl 97 ref 125 125 163 old_dirname 000116 automatic char(168) packed unaligned dcl 33 set ref 122* 125* 129* old_ename 000170 automatic char(32) packed unaligned dcl 34 set ref 122* 125* 129* 154 old_ptr 000114 automatic pointer dcl 32 set ref 121* 122* 167 179* 188* 193* 195* 201* old_segno 000112 automatic fixed bin(15,0) dcl 31 set ref 106* 121 176* 190 198 old_status 000100 automatic structure level 1 packed packed unaligned dcl 30 set ref 125 125 pds$process_dir_name 000050 external static char(32) packed unaligned dcl 86 ref 141 pds$process_group_id 000052 external static char(32) packed unaligned dcl 87 ref 142 pds$useable_lot 000054 external static bit(1) array packed unaligned dcl 88 set ref 112 116* 133 140* 181* 210* pointer builtin function dcl 97 ref 147 ppr based structure level 2 packed packed unaligned dcl 2-56 prr based bit(3) level 3 packed packed unaligned dcl 2-56 ref 107 prs based pointer array level 2 dcl 2-12 ref 147 rb 000266 automatic fixed bin(6,0) array dcl 42 set ref 156* 158* ref_names 000301 automatic char(32) array packed unaligned dcl 44 set ref 188* 201* ring_brackets 10(18) 000100 automatic bit(6) array level 2 packed packed unaligned dcl 30 set ref 131 156 saved_lote 000421 automatic bit(36) dcl 45 set ref 190* 198 saved_useable_lot 000434 automatic bit(1) dcl 56 set ref 112* 116 133* 181 210 sb 000446 automatic pointer dcl 4-24 set ref 147* 190 198 scu 30 based bit(36) array level 2 in structure "mc" packed packed unaligned dcl 2-12 in procedure "copy_on_write_handler_" set ref 105 scu based structure level 1 dcl 2-56 in procedure "copy_on_write_handler_" scup 000444 automatic pointer dcl 2-54 set ref 105* 106 107 111 size 000265 automatic fixed bin(21,0) dcl 41 set ref 166* 167 167 stack_header based structure level 1 dcl 4-26 sys_info$page_size 000060 external static fixed bin(17,0) dcl 93 ref 166 t_ring 000433 automatic fixed bin(3,0) dcl 50 set ref 111* 112 116 119* 131* 131 133 135* 140 144 156 181 210 tpr 2 based structure level 2 packed packed unaligned dcl 2-56 trr 2 based bit(3) level 3 packed packed unaligned dcl 2-56 ref 111 tsr 2(03) based bit(15) level 3 packed packed unaligned dcl 2-56 ref 106 unique_chars_ 000034 constant entry external dcl 76 ref 154 unspec builtin function dcl 97 set ref 190 198* val_ring 000430 automatic fixed bin(3,0) dcl 50 set ref 108* 117* 205* 208* x_ring 000432 automatic fixed bin(3,0) dcl 50 set ref 107* 110 144 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. abx internal static fixed bin(17,0) initial dcl 2-42 apx internal static fixed bin(17,0) initial dcl 2-42 area_pointer automatic pointer dcl 1-2 bbx internal static fixed bin(17,0) initial dcl 2-42 bpx internal static fixed bin(17,0) initial dcl 2-42 call_offset internal static fixed bin(17,0) initial dcl 4-78 entry_names based char(32) array dcl 1-2 entry_offset internal static fixed bin(17,0) initial dcl 4-78 hcs_$set_bc_seg 000000 constant entry external dcl 66 info_ptr automatic pointer dcl 1-2 isot based structure level 1 dcl 3-13 isot1 based structure array level 1 dcl 3-16 isotp automatic pointer dcl 3-12 lbx internal static fixed bin(17,0) initial dcl 2-42 link based structure level 1 dcl 1-2 lot_fault internal static bit(36) initial dcl 3-9 lotp automatic pointer dcl 3-4 lpx internal static fixed bin(17,0) initial dcl 2-42 mcp automatic pointer dcl 2-10 pathname based char dcl 1-2 push_offset internal static fixed bin(17,0) initial dcl 4-78 return_no_pop_offset internal static fixed bin(17,0) initial dcl 4-78 return_offset internal static fixed bin(17,0) initial dcl 4-78 sbx internal static fixed bin(17,0) initial dcl 2-42 scux based structure level 1 dcl 2-207 spx internal static fixed bin(17,0) initial dcl 2-42 stack_header_overlay based fixed bin(17,0) array dcl 4-94 tv_offset internal static fixed bin(17,0) initial dcl 4-72 NAMES DECLARED BY EXPLICIT CONTEXT. copy_on_write_handler_ 000035 constant entry external dcl 14 error 001271 constant label dcl 208 ref 124 127 128 130 144 160 163 165 175 178 182 186 194 197 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1600 1662 1316 1610 Length 2162 1316 62 263 262 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME copy_on_write_handler_ 396 external procedure is an external procedure. on unit on line 114 68 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME copy_on_write_handler_ 000100 old_status copy_on_write_handler_ 000112 old_segno copy_on_write_handler_ 000114 old_ptr copy_on_write_handler_ 000116 old_dirname copy_on_write_handler_ 000170 old_ename copy_on_write_handler_ 000200 new_ptr copy_on_write_handler_ 000202 new_dirname copy_on_write_handler_ 000254 new_ename copy_on_write_handler_ 000264 maxlength copy_on_write_handler_ 000265 size copy_on_write_handler_ 000266 rb copy_on_write_handler_ 000271 group_id copy_on_write_handler_ 000301 ref_names copy_on_write_handler_ 000421 saved_lote copy_on_write_handler_ 000422 code copy_on_write_handler_ 000423 i copy_on_write_handler_ 000424 initiate_entry copy_on_write_handler_ 000430 val_ring copy_on_write_handler_ 000431 my_ring copy_on_write_handler_ 000432 x_ring copy_on_write_handler_ 000433 t_ring copy_on_write_handler_ 000434 saved_useable_lot copy_on_write_handler_ 000444 scup copy_on_write_handler_ 000446 sb copy_on_write_handler_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ent_var_desc call_ext_out_desc call_ext_out return_mac enable_op shorten_stack ext_entry_desc int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_group_id_ get_pdir_ get_ring_ hcs_$append_branchx hcs_$fs_get_path_name hcs_$fs_get_ref_name hcs_$get_max_length hcs_$initiate hcs_$level_get hcs_$level_set hcs_$set_max_length_seg hcs_$status_long hcs_$terminate_seg initiate makeunknown_ unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$no_s_permission pds$process_dir_name pds$process_group_id pds$useable_lot sys_info$page_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000030 105 000050 106 000055 107 000061 108 000064 109 000072 110 000101 111 000110 112 000114 114 000125 116 000141 117 000151 118 000157 119 000160 121 000167 122 000173 124 000225 125 000227 127 000271 128 000276 129 000301 130 000326 131 000333 133 000342 135 000353 139 000362 140 000364 141 000372 142 000376 143 000402 144 000403 147 000406 148 000413 149 000422 154 000431 155 000470 156 000477 157 000512 158 000514 160 000572 161 000574 163 000637 164 000643 165 000656 166 000660 167 000666 173 000673 174 000675 175 000721 176 000723 178 000744 179 000746 181 001012 182 001020 183 001022 185 001023 186 001036 187 001040 188 001047 189 001076 190 001100 192 001104 193 001111 194 001125 195 001127 197 001172 198 001174 200 001200 201 001211 202 001255 205 001257 206 001266 208 001271 210 001300 211 001310 ----------------------------------------------------------- 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