COMPILATION LISTING OF SEGMENT stack_oob_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 1041.8 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 /* format: style2 */ 15 16 stack_oob_handler: 17 procedure (mcptr); 18 19 /* This procedure is called by the fim when an out_of_bounds fault 20* has occurred on the stack. It either extends the stack by 48K 21* and returns to the fim to signal storage or it terminates the process. */ 22 /* coded by M. Weaver 5/29/74 */ 23 /* re-coded by Mike Grady 8/79 to improve algorithim */ 24 /* re-re-coded by Benson I. Margulies 1/82 to further improve algorithm */ 25 26 /* Automatic */ 27 28 dcl mcptr ptr; 29 dcl max_lng fixed bin (19); 30 dcl ca fixed bin (19); 31 dcl code fixed bin (35); 32 dcl e_code fixed bin (35); 33 dcl extend bit (1) aligned; 34 dcl extend_to fixed bin (19); 35 dcl signal_storage bit (1) aligned; 36 dcl signal_oob bit (1) aligned; 37 38 /* Constants */ 39 40 dcl INCREMENT fixed bin int static init (49152) options (constant); 41 /* 48K */ 42 43 /* Externals */ 44 45 dcl sys_info$max_seg_size ext fixed bin (19); 46 dcl error_table_$stack_overflow 47 fixed bin (35) ext; 48 dcl error_table_$oob_stack fixed bin (35) ext; 49 dcl error_table_$oob_stack_ref 50 fixed bin (35) ext; 51 52 /* Builtins */ 53 54 dcl (addr, binary, bit, min, pointer, rel) 55 builtin; 56 57 /* Entries */ 58 59 dcl status_$get_max_length_ptr 60 entry (ptr, fixed bin (19), fixed bin (35)); 61 dcl set$max_length_ptr entry (ptr, fixed bin (19), fixed bin (35)); 62 dcl terminate_proc entry (fixed bin (35)); 63 dcl boundfault entry (ptr); 64 65 1 1 /* BEGIN INCLUDE FILE ... stack_header.incl.pl1 .. 3/72 Bill Silver */ 1 2 /* modified 7/76 by M. Weaver for *system links and more system use of areas */ 1 3 /* modified 3/77 by M. Weaver to add rnt_ptr */ 1 4 /* Modified April 1983 by C. Hornig for tasking */ 1 5 1 6 /****^ HISTORY COMMENTS: 1 7* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), 1 8* audit(86-08-05,Schroth), install(86-11-03,MR12.0-1206): 1 9* added the heap_header_ptr definition. 1 10* 2) change(86-08-12,Kissel), approve(86-08-12,MCR7473), 1 11* audit(86-10-10,Fawcett), install(86-11-03,MR12.0-1206): 1 12* Modified to support control point management. These changes were actually 1 13* made in February 1985 by G. Palter. 1 14* 3) change(86-10-22,Fawcett), approve(86-10-22,MCR7473), 1 15* audit(86-10-22,Farley), install(86-11-03,MR12.0-1206): 1 16* Remove the old_lot pointer and replace it with cpm_data_ptr. Use the 18 1 17* bit pad after cur_lot_size for the cpm_enabled. This was done to save some 1 18* space int the stack header and change the cpd_ptr unal to cpm_data_ptr 1 19* (ITS pair). 1 20* END HISTORY COMMENTS */ 1 21 1 22 /* format: style2 */ 1 23 1 24 dcl sb ptr; /* the main pointer to the stack header */ 1 25 1 26 dcl 1 stack_header based (sb) aligned, 1 27 2 pad1 (4) fixed bin, /* (0) also used as arg list by outward_call_handler */ 1 28 2 cpm_data_ptr ptr, /* (4) pointer to control point which owns this stack */ 1 29 2 combined_stat_ptr ptr, /* (6) pointer to area containing separate static */ 1 30 2 clr_ptr ptr, /* (8) pointer to area containing linkage sections */ 1 31 2 max_lot_size fixed bin (17) unal, /* (10) DU number of words allowed in lot */ 1 32 2 main_proc_invoked fixed bin (11) unal, /* (10) DL nonzero if main procedure invoked in run unit */ 1 33 2 have_static_vlas bit (1) unal, /* (10) DL "1"b if (very) large arrays are being used in static */ 1 34 2 pad4 bit (2) unal, 1 35 2 run_unit_depth fixed bin (2) unal, /* (10) DL number of active run units stacked */ 1 36 2 cur_lot_size fixed bin (17) unal, /* (11) DU number of words (entries) in lot */ 1 37 2 cpm_enabled bit (18) unal, /* (11) DL non-zero if control point management is enabled */ 1 38 2 system_free_ptr ptr, /* (12) pointer to system storage area */ 1 39 2 user_free_ptr ptr, /* (14) pointer to user storage area */ 1 40 2 null_ptr ptr, /* (16) */ 1 41 2 stack_begin_ptr ptr, /* (18) pointer to first stack frame on the stack */ 1 42 2 stack_end_ptr ptr, /* (20) pointer to next useable stack frame */ 1 43 2 lot_ptr ptr, /* (22) pointer to the lot for the current ring */ 1 44 2 signal_ptr ptr, /* (24) pointer to signal procedure for current ring */ 1 45 2 bar_mode_sp ptr, /* (26) value of sp before entering bar mode */ 1 46 2 pl1_operators_ptr ptr, /* (28) pointer to pl1_operators_$operator_table */ 1 47 2 call_op_ptr ptr, /* (30) pointer to standard call operator */ 1 48 2 push_op_ptr ptr, /* (32) pointer to standard push operator */ 1 49 2 return_op_ptr ptr, /* (34) pointer to standard return operator */ 1 50 2 return_no_pop_op_ptr 1 51 ptr, /* (36) pointer to standard return / no pop operator */ 1 52 2 entry_op_ptr ptr, /* (38) pointer to standard entry operator */ 1 53 2 trans_op_tv_ptr ptr, /* (40) pointer to translator operator ptrs */ 1 54 2 isot_ptr ptr, /* (42) pointer to ISOT */ 1 55 2 sct_ptr ptr, /* (44) pointer to System Condition Table */ 1 56 2 unwinder_ptr ptr, /* (46) pointer to unwinder for current ring */ 1 57 2 sys_link_info_ptr ptr, /* (48) pointer to *system link name table */ 1 58 2 rnt_ptr ptr, /* (50) pointer to Reference Name Table */ 1 59 2 ect_ptr ptr, /* (52) pointer to event channel table */ 1 60 2 assign_linkage_ptr ptr, /* (54) pointer to storage for (obsolete) hcs_$assign_linkage */ 1 61 2 heap_header_ptr ptr, /* (56) pointer to the heap header for this ring */ 1 62 2 trace, 1 63 3 frames, 1 64 4 count fixed bin, /* (58) number of trace frames */ 1 65 4 top_ptr ptr unal, /* (59) pointer to last trace frame */ 1 66 3 in_trace bit (36) aligned, /* (60) trace antirecursion flag */ 1 67 2 pad2 bit (36), /* (61) */ 1 68 2 pad5 pointer; /* (62) pointer to future stuff */ 1 69 1 70 /* The following offset refers to a table within the pl1 operator table. */ 1 71 1 72 dcl tv_offset fixed bin init (361) internal static; 1 73 /* (551) octal */ 1 74 1 75 1 76 /* The following constants are offsets within this transfer vector table. */ 1 77 1 78 dcl ( 1 79 call_offset fixed bin init (271), 1 80 push_offset fixed bin init (272), 1 81 return_offset fixed bin init (273), 1 82 return_no_pop_offset fixed bin init (274), 1 83 entry_offset fixed bin init (275) 1 84 ) internal static; 1 85 1 86 1 87 1 88 1 89 1 90 /* The following declaration is an overlay of the whole stack header. Procedures which 1 91* move the whole stack header should use this overlay. 1 92**/ 1 93 1 94 dcl stack_header_overlay (size (stack_header)) fixed bin based (sb); 1 95 1 96 1 97 1 98 /* END INCLUDE FILE ... stack_header.incl.pl1 */ 66 67 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 */ 68 69 3 1 /* BEGIN INCLUDE FILE static_handlers.incl.pl1 */ 3 2 3 3 /* format: style4,indattr,ifthenstmt,ifthen,idind33,^indcomtxt */ 3 4 3 5 /* HISTORY: 3 6*Written by S. H. Webber, 06/20/75. 3 7*Modified: 3 8*12/15/83 by Benson Margulies: added undefined_pointer_sct_index and 3 9* pgt_sct_index. 3 10*06/11/84 by Lee A. Newcomb: added dm_shutdown_warning_sct_index and 3 11* dm_user_shutdown_sct_index for handling of Data Management 3 12* shutdown. 3 13*08/22/84 by R. Michael Tague: Removed dm_shutdown_warning_sct_index and 3 14* dm_user_shutdown_sct_index. Added 3 15* system_shutdown_scheduled_sct_index and 3 16* dm_shutdown_scheduled_sct_index. 3 17**/ 3 18 3 19 3 20 /****^ HISTORY COMMENTS: 3 21* 1) change(85-11-13,Herbst), approve(87-07-21,MCR7697), 3 22* audit(87-07-21,GDixon), install(87-08-04,MR12.1-1056): 3 23* Add system_message_sct_index. 3 24* END HISTORY COMMENTS */ 3 25 3 26 3 27 dcl ( 3 28 shutdown_sct_index init (0), 3 29 store_sct_index init (1), 3 30 mme1_sct_index init (2), 3 31 fault_tag_1_sct_index init (3), 3 32 timer_runout_sct_index init (4), 3 33 command_sct_index init (5), 3 34 derail_sct_index init (6), 3 35 lockup_sct_index init (7), 3 36 connect_sct_index init (8), 3 37 parity_sct_index init (9), 3 38 illegal_procedure_sct_index init (10), 3 39 op_not_complete_sct_index init (11), 3 40 startup_sct_index init (12), 3 41 ovrflo_sct_index init (13), 3 42 zerodivide_sct_index init (14), 3 43 execute_sct_index init (15), 3 44 seg_fault_error_sct_index init (16), 3 45 page_fault_error_sct_index init (17), 3 46 directed_fault_2_sct_index init (18), 3 47 directed_fault_3_sct_index init (19), 3 48 accessviolation_sct_index init (20), 3 49 mme2_sct_index init (21), 3 50 mme3_sct_index init (22), 3 51 mme4_sct_index init (23), 3 52 linkage_error_sct_index init (24), 3 53 fault_tag_3_sct_index init (25), 3 54 undefined_fault_sct_index init (26), 3 55 trouble_sct_index init (31), 3 56 illegal_opcode_sct_index init (32), 3 57 simfault_000000_sct_index init (33), 3 58 illegal_modifier_sct_index init (34), 3 59 illegal_ring_order_sct_index init (35), 3 60 not_in_execute_bracket_sct_index init (36), 3 61 no_execute_permission_sct_index init (37), 3 62 not_in_read_bracket_sct_index init (38), 3 63 no_read_permission_sct_index init (39), 3 64 not_in_write_bracket_sct_index init (40), 3 65 no_write_permission_sct_index init (41), 3 66 not_a_gate_sct_index init (42), 3 67 not_in_call_bracket_sct_index init (43), 3 68 outward_call_sct_index init (44), 3 69 bad_outward_call_sct_index init (45), 3 70 inward_return_sct_index init (46), 3 71 cross_ring_transfer_sct_index init (47), 3 72 ring_alarm_fault_sct_index init (48), 3 73 am_fault_sct_index init (49), 3 74 out_of_bounds_sct_index init (50), 3 75 fixedoverflow_sct_index init (51), 3 76 overflow_sct_index init (52), 3 77 underflow_sct_index init (53), 3 78 stringsize_sct_index init (54), 3 79 other_illegal_proc_sct_index init (55), 3 80 storage_sct_index init (56), 3 81 packed_pointer_fault_sct_index init (57), 3 82 lot_fault_sct_index init (58), 3 83 isot_fault_sct_index init (59), 3 84 system_packed_pointer_sct_index init (60), 3 85 quit_sct_index init (61), 3 86 alrm_sct_index init (62), 3 87 cput_sct_index init (63), 3 88 record_quota_overflow_sct_index init (64), 3 89 size_sct_index init (65), 3 90 neti_sct_index init (66), 3 91 other_command_sct_index init (67), 3 92 susp_sct_index init (68), 3 93 term_sct_index init (69), 3 94 wkp_sct_index init (70), 3 95 undefined_pointer_sct_index init (71), 3 96 pgt_sct_index init (72), 3 97 system_shutdown_scheduled_sct_index 3 98 init (73), 3 99 dm_shutdown_scheduled_sct_index init (74), 3 100 system_message_sct_index init (75) 3 101 ) fixed bin (17) int static options (constant); 3 102 3 103 /* END INCLUDE FILE static_handlers.incl.pl1 */ 70 71 72 73 mcp = mcptr; 74 sb = pointer (mc.prs (6), 0); /* get ptr to stack at time of fault */ 75 call status_$get_max_length_ptr (sb, max_lng, code); 76 /* get current max length of stack */ 77 if code ^= 0 78 then /* can't imagine this would ever happen */ 79 call term_proc; 80 81 e_code = 0; /* code will be reset if signalling proves appropriate */ 82 83 scup = addr (mc.scu (0)); /* get addr of SCU data */ 84 ca = bin (scu.ca, 18); /* pull out computed address */ 85 signal_storage = "0"b; 86 signal_oob = "0"b; 87 extend = "0"b; 88 89 /* If the reference is beyond the end of the pl1 stack, then */ 90 /* extending is unneccessary. If, by coincidence, the end_ptr */ 91 /* is also beyond the end, we will take another fault when the error */ 92 /* handlers push, and then entend. The 64 words is slop for programs */ 93 /* that authentically stash data off of the end. */ 94 95 96 if ca < max_lng 97 then do; 98 call boundfault (mcptr); /* ordinary aste problem */ 99 e_code = mcptr -> mc.errcode; /* preserve any code from boundfault */ 100 if e_code ^= 0 101 then signal_oob = "1"b; 102 end; 103 104 else if ca > (binrel (stack_header.stack_end_ptr) + 64) 105 /* past the end */ 106 then do; 107 signal_oob = "1"b; /* no need to extend */ 108 e_code = error_table_$oob_stack_ref; 109 end; 110 111 else if ca > (240 * 1024) /* leave space for pl1 snap and all that */ 112 then do; 113 signal_storage = "1"b; 114 extend = "1"b; 115 e_code = error_table_$stack_overflow; 116 extend_to = sys_info$max_seg_size; /* go for it */ 117 end; 118 119 else do; /* extend silently, the max length is just < stack_end, and there is plenty of space */ 120 /** code stays zero */ 121 extend = "1"b; 122 extend_to = binrel (stack_header.stack_end_ptr) + 64; 123 end; 124 125 /* Now do the extension if it was mandated. */ 126 127 128 if extend & (extend_to > (max_lng - 1)) /* needed */ 129 then do; 130 if max_lng = sys_info$max_seg_size /* see if we have extended all the way already */ 131 then call term_proc; /* noplace to go */ 132 133 extend_to = min (extend_to, sys_info$max_seg_size); 134 135 do while (max_lng <= extend_to); /* move upto desired size */ 136 max_lng = max_lng + INCREMENT; 137 end; 138 139 if max_lng > (240 * 1024) 140 then do; /* equivalent to storage condition case */ 141 signal_storage = "1"b; 142 e_code = error_table_$stack_overflow; 143 max_lng = sys_info$max_seg_size; 144 end; 145 146 call set$max_length_ptr (sb, max_lng, code); 147 /* extend the stack */ 148 if code ^= 0 149 then call term_proc; 150 151 /* If we extended the stack, then we may need a bigger aste. So we might */ 152 /* as well call boundfault to do that, instead of taking another fault. */ 153 154 call boundfault (mcptr); 155 if mcptr -> mc.errcode ^= 0 156 then do; 157 signal_oob = "1"b; 158 e_code = mcptr -> mc.errcode; 159 end; 160 end; 161 162 /* if mc.errcode is zero, the fim will restart the fault. So for the */ 163 /* silent extension, it will be zero. */ 164 165 mc.errcode = e_code; 166 if signal_oob 167 then do; 168 mc.fim_temp.resignal = "1"b; 169 mc.fim_temp.fcode = bit (out_of_bounds_sct_index, 17); 170 end; 171 else if signal_storage 172 then do; 173 mc.fim_temp.resignal = "1"b; 174 mc.fim_temp.fcode = bit (storage_sct_index, 17); 175 end; 176 177 return; 178 179 term_proc: 180 procedure; 181 182 call terminate_proc (error_table_$oob_stack); /* terminate the process */ 183 184 end term_proc; 185 186 binrel: 187 procedure (ptr_to_rel) returns (fixed bin (18) unsigned); 188 189 dcl ptr_to_rel pointer; 190 191 return (binary (rel (ptr_to_rel), 18)); 192 end binrel; 193 194 end stack_oob_handler; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0800.6 stack_oob_handler.pl1 >spec>install>1110>stack_oob_handler.pl1 66 1 11/07/86 1550.3 stack_header.incl.pl1 >ldd>include>stack_header.incl.pl1 68 2 12/15/83 1100.4 mc.incl.pl1 >ldd>include>mc.incl.pl1 70 3 08/06/87 0913.5 static_handlers.incl.pl1 >ldd>include>static_handlers.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. INCREMENT constant fixed bin(17,0) initial dcl 40 ref 136 addr builtin function dcl 54 ref 83 binary builtin function dcl 54 ref 191 bit builtin function dcl 54 ref 169 174 boundfault 000026 constant entry external dcl 63 ref 98 154 ca 5 based bit(18) level 2 in structure "scu" packed packed unaligned dcl 2-56 in procedure "stack_oob_handler" ref 84 ca 000101 automatic fixed bin(19,0) dcl 30 in procedure "stack_oob_handler" set ref 84* 96 104 111 code 000102 automatic fixed bin(35,0) dcl 31 set ref 75* 77 146* 148 e_code 000103 automatic fixed bin(35,0) dcl 32 set ref 81* 99* 100 108* 115* 142* 158* 165 errcode 43 based fixed bin(35,0) level 2 packed packed unaligned dcl 2-12 set ref 99 155 158 165* error_table_$oob_stack 000014 external static fixed bin(35,0) dcl 48 set ref 182* error_table_$oob_stack_ref 000016 external static fixed bin(35,0) dcl 49 ref 108 error_table_$stack_overflow 000012 external static fixed bin(35,0) dcl 46 ref 115 142 extend 000104 automatic bit(1) dcl 33 set ref 87* 114* 121* 128 extend_to 000105 automatic fixed bin(19,0) dcl 34 set ref 116* 122* 128 133* 133 135 fcode 44(19) based bit(17) level 3 packed packed unaligned dcl 2-12 set ref 169* 174* fim_temp 44 based structure level 2 packed packed unaligned dcl 2-12 max_lng 000100 automatic fixed bin(19,0) dcl 29 set ref 75* 96 128 130 135 136* 136 139 143* 146* mc based structure level 1 dcl 2-12 mcp 000112 automatic pointer dcl 2-10 set ref 73* 74 83 165 168 169 173 174 mcptr parameter pointer dcl 28 set ref 16 73 98* 99 154* 155 158 min builtin function dcl 54 ref 133 out_of_bounds_sct_index constant fixed bin(17,0) initial dcl 3-27 ref 169 pointer builtin function dcl 54 ref 74 prs based pointer array level 2 dcl 2-12 ref 74 ptr_to_rel parameter pointer dcl 189 ref 186 191 rel builtin function dcl 54 ref 191 resignal 44(18) based bit(1) level 3 packed packed unaligned dcl 2-12 set ref 168* 173* sb 000110 automatic pointer dcl 1-24 set ref 74* 75* 104 122 146* scu based structure level 1 dcl 2-56 in procedure "stack_oob_handler" scu 30 based bit(36) array level 2 in structure "mc" packed packed unaligned dcl 2-12 in procedure "stack_oob_handler" set ref 83 scup 000114 automatic pointer dcl 2-54 set ref 83* 84 set$max_length_ptr 000022 constant entry external dcl 61 ref 146 signal_oob 000107 automatic bit(1) dcl 36 set ref 86* 100* 107* 157* 166 signal_storage 000106 automatic bit(1) dcl 35 set ref 85* 113* 141* 171 stack_end_ptr 24 based pointer level 2 dcl 1-26 set ref 104* 122* stack_header based structure level 1 dcl 1-26 status_$get_max_length_ptr 000020 constant entry external dcl 59 ref 75 storage_sct_index constant fixed bin(17,0) initial dcl 3-27 ref 174 sys_info$max_seg_size 000010 external static fixed bin(19,0) dcl 45 ref 116 130 133 143 terminate_proc 000024 constant entry external dcl 62 ref 182 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. abx internal static fixed bin(17,0) initial dcl 2-42 accessviolation_sct_index internal static fixed bin(17,0) initial dcl 3-27 alrm_sct_index internal static fixed bin(17,0) initial dcl 3-27 am_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 apx internal static fixed bin(17,0) initial dcl 2-42 bad_outward_call_sct_index internal static fixed bin(17,0) initial dcl 3-27 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 1-78 command_sct_index internal static fixed bin(17,0) initial dcl 3-27 connect_sct_index internal static fixed bin(17,0) initial dcl 3-27 cput_sct_index internal static fixed bin(17,0) initial dcl 3-27 cross_ring_transfer_sct_index internal static fixed bin(17,0) initial dcl 3-27 derail_sct_index internal static fixed bin(17,0) initial dcl 3-27 directed_fault_2_sct_index internal static fixed bin(17,0) initial dcl 3-27 directed_fault_3_sct_index internal static fixed bin(17,0) initial dcl 3-27 dm_shutdown_scheduled_sct_index internal static fixed bin(17,0) initial dcl 3-27 entry_offset internal static fixed bin(17,0) initial dcl 1-78 execute_sct_index internal static fixed bin(17,0) initial dcl 3-27 fault_tag_1_sct_index internal static fixed bin(17,0) initial dcl 3-27 fault_tag_3_sct_index internal static fixed bin(17,0) initial dcl 3-27 fixedoverflow_sct_index internal static fixed bin(17,0) initial dcl 3-27 illegal_modifier_sct_index internal static fixed bin(17,0) initial dcl 3-27 illegal_opcode_sct_index internal static fixed bin(17,0) initial dcl 3-27 illegal_procedure_sct_index internal static fixed bin(17,0) initial dcl 3-27 illegal_ring_order_sct_index internal static fixed bin(17,0) initial dcl 3-27 inward_return_sct_index internal static fixed bin(17,0) initial dcl 3-27 isot_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 lbx internal static fixed bin(17,0) initial dcl 2-42 linkage_error_sct_index internal static fixed bin(17,0) initial dcl 3-27 lockup_sct_index internal static fixed bin(17,0) initial dcl 3-27 lot_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 lpx internal static fixed bin(17,0) initial dcl 2-42 mme1_sct_index internal static fixed bin(17,0) initial dcl 3-27 mme2_sct_index internal static fixed bin(17,0) initial dcl 3-27 mme3_sct_index internal static fixed bin(17,0) initial dcl 3-27 mme4_sct_index internal static fixed bin(17,0) initial dcl 3-27 neti_sct_index internal static fixed bin(17,0) initial dcl 3-27 no_execute_permission_sct_index internal static fixed bin(17,0) initial dcl 3-27 no_read_permission_sct_index internal static fixed bin(17,0) initial dcl 3-27 no_write_permission_sct_index internal static fixed bin(17,0) initial dcl 3-27 not_a_gate_sct_index internal static fixed bin(17,0) initial dcl 3-27 not_in_call_bracket_sct_index internal static fixed bin(17,0) initial dcl 3-27 not_in_execute_bracket_sct_index internal static fixed bin(17,0) initial dcl 3-27 not_in_read_bracket_sct_index internal static fixed bin(17,0) initial dcl 3-27 not_in_write_bracket_sct_index internal static fixed bin(17,0) initial dcl 3-27 op_not_complete_sct_index internal static fixed bin(17,0) initial dcl 3-27 other_command_sct_index internal static fixed bin(17,0) initial dcl 3-27 other_illegal_proc_sct_index internal static fixed bin(17,0) initial dcl 3-27 outward_call_sct_index internal static fixed bin(17,0) initial dcl 3-27 overflow_sct_index internal static fixed bin(17,0) initial dcl 3-27 ovrflo_sct_index internal static fixed bin(17,0) initial dcl 3-27 packed_pointer_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 page_fault_error_sct_index internal static fixed bin(17,0) initial dcl 3-27 parity_sct_index internal static fixed bin(17,0) initial dcl 3-27 pgt_sct_index internal static fixed bin(17,0) initial dcl 3-27 push_offset internal static fixed bin(17,0) initial dcl 1-78 quit_sct_index internal static fixed bin(17,0) initial dcl 3-27 record_quota_overflow_sct_index internal static fixed bin(17,0) initial dcl 3-27 return_no_pop_offset internal static fixed bin(17,0) initial dcl 1-78 return_offset internal static fixed bin(17,0) initial dcl 1-78 ring_alarm_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 sbx internal static fixed bin(17,0) initial dcl 2-42 scux based structure level 1 dcl 2-207 seg_fault_error_sct_index internal static fixed bin(17,0) initial dcl 3-27 shutdown_sct_index internal static fixed bin(17,0) initial dcl 3-27 simfault_000000_sct_index internal static fixed bin(17,0) initial dcl 3-27 size_sct_index internal static fixed bin(17,0) initial dcl 3-27 spx internal static fixed bin(17,0) initial dcl 2-42 stack_header_overlay based fixed bin(17,0) array dcl 1-94 startup_sct_index internal static fixed bin(17,0) initial dcl 3-27 store_sct_index internal static fixed bin(17,0) initial dcl 3-27 stringsize_sct_index internal static fixed bin(17,0) initial dcl 3-27 susp_sct_index internal static fixed bin(17,0) initial dcl 3-27 system_message_sct_index internal static fixed bin(17,0) initial dcl 3-27 system_packed_pointer_sct_index internal static fixed bin(17,0) initial dcl 3-27 system_shutdown_scheduled_sct_index internal static fixed bin(17,0) initial dcl 3-27 term_sct_index internal static fixed bin(17,0) initial dcl 3-27 timer_runout_sct_index internal static fixed bin(17,0) initial dcl 3-27 trouble_sct_index internal static fixed bin(17,0) initial dcl 3-27 tv_offset internal static fixed bin(17,0) initial dcl 1-72 undefined_fault_sct_index internal static fixed bin(17,0) initial dcl 3-27 undefined_pointer_sct_index internal static fixed bin(17,0) initial dcl 3-27 underflow_sct_index internal static fixed bin(17,0) initial dcl 3-27 wkp_sct_index internal static fixed bin(17,0) initial dcl 3-27 zerodivide_sct_index internal static fixed bin(17,0) initial dcl 3-27 NAMES DECLARED BY EXPLICIT CONTEXT. binrel 000311 constant entry internal dcl 186 ref 104 122 stack_oob_handler 000005 constant entry external dcl 16 term_proc 000300 constant entry internal dcl 179 ref 77 130 148 NAME DECLARED BY CONTEXT OR IMPLICATION. bin builtin function ref 84 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 450 500 321 460 Length 730 321 30 213 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME stack_oob_handler 104 external procedure is an external procedure. term_proc internal procedure shares stack frame of external procedure stack_oob_handler. binrel internal procedure shares stack frame of external procedure stack_oob_handler. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME stack_oob_handler 000100 max_lng stack_oob_handler 000101 ca stack_oob_handler 000102 code stack_oob_handler 000103 e_code stack_oob_handler 000104 extend stack_oob_handler 000105 extend_to stack_oob_handler 000106 signal_storage stack_oob_handler 000107 signal_oob stack_oob_handler 000110 sb stack_oob_handler 000112 mcp stack_oob_handler 000114 scup stack_oob_handler THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. boundfault set$max_length_ptr status_$get_max_length_ptr terminate_proc THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$oob_stack error_table_$oob_stack_ref error_table_$stack_overflow sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 16 000002 73 000012 74 000016 75 000020 77 000032 81 000035 83 000036 84 000041 85 000044 86 000045 87 000046 96 000047 98 000051 99 000061 100 000066 102 000071 104 000072 107 000107 108 000111 109 000114 111 000115 113 000120 114 000122 115 000123 116 000126 117 000130 121 000131 122 000133 128 000147 130 000155 133 000162 135 000170 136 000173 137 000175 139 000176 141 000200 142 000202 143 000205 146 000207 148 000222 154 000225 155 000235 157 000242 158 000244 165 000245 166 000250 168 000252 169 000254 170 000263 171 000264 173 000266 174 000270 177 000277 179 000300 182 000301 184 000310 186 000311 191 000313 ----------------------------------------------------------- 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