" *********************************************************** " * * " * Copyright, (C) Honeywell Bull Inc., 1987 * " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " *********************************************************** " restart_fault " " Original coding (extract of code from signaller) 10/73 SHW. " Last Modified: (date and reason): " " 3/85 by E.D. Schroth (UNCA) to clear all overflow fault related indicators " 3/82 by J. Bongiovanni to allow user-ring restart if SCU data unchanged, ^IPR " 11/81 by E. N. Kittlitz for cleanup null mc_ptr check. " 5/79 by M. Grady for stack 0 sharing. " 11/76 by B. Greenberg for EIS IPR restarts. " 10/75 by R. Bratt to unconditionally allow restarts from ring zero " 8/75 by B. Greenberg to fix bugs restarting ill_rtn mc's " 3/75 by S. Webber to implement more secure restarts " 8/1/74 by S. Webber to fix security bug that didn't check TRR against signalling ring. " 2/74 by Steve Webber to trace restarts of faults in pds trace data " " " This program is the one called by "return_to_ring_0_" when " the latter is returned to in the user ring to restart " a signalled fault (or quit, etc). It can only be transferred " to at location 0 as the entry bound is set to 1 by " init_hardcore_gates. " " The program must validate the machine conditions and if they appear to " be valid, it will restart them. name restart_fault inhibit on <+><+><+><+><+><+><+><+><+><+><+><+> segdef lp,scu segdef .my_lp,.tv_end " include signaller_stack include mc include apte include stack_header include stack_frame include fault_vector equ if_rfi_bits,scu.cu.if+scu.cu.rfi equ allowed_cu_stat_changes,-1-if_rfi_bits " " There are two entries to this program. The first (location 0) is " called to restart a fault. The stack pointer points to the " signaller frame containing the machine conditions to try to " restart. " " The second entry (location 1) is used by the signaller cleanup handler " to discard the ring 0 copy of the set of machine conditions being " "released" or "nonlocal goto'd" around. " tra restart_entry tra cleanup_entry restart_entry: epplp lp,* get our own linkage pointer tsplb page_fault$trace_restart_fault epplp lp,* epbpsb sp|0 get a valid sb as well epaq sp|0 cana -1,dl tze restart_from_ring_zero " The three instructions at the end of restart_fault that return to the " point of the fault must be executed without taking a page fault. Since they " reload the machine condiditons we must place the machine conditions in " a safe wired-down place - the PDS. eppbp pds$signal_data bp -> wired-down m.c. eppap mach_cond ap -> m.c. in stack mlr (pr),(pr) desc9a ap|0,48*4 Copy whole shebang, including desc9a bp|0,48*4 regs, fim_temp. " " Now copy the prs, we must use epp-type instructions in order " to preserve the validation... eax1 8*2 epplb ap|-2,1* copy prs with epplb instructions sprilb bp|-2,1 eax1 -2,1 tpnz *-3 " Now copy the SCU data and pointers and lengths from the " safe store area in the pds (after validating SCU). ldx0 mach_cond+mc.fim_temp get unique code for search tsx7 find_scu_data tra illegal_return error, not found " AP -> good stuff " BP -> stuff handed in. stx0 bp|mc.scu.tsr_stat_word save so CMPC will work " Check for SCU Data Unmodified. This is allowable unless the " MIF is ON and the fault is an IPR cmpc (pr),(pr) desc9a ap|0,8*4 desc9a bp|mc.scu,8*4 tnz check_mif SCU Data Changed lda ap|scu.indicators_word cana scu.ir.mif,dl Is MIF ON tze mc_ok No lda ap|scu.fault_data_word ana scu.fi_num_mask,dl cmpa 2*FAULT_NO_IPR,dl IPR tnz mc_ok No tra illegal_return Yes - don't allow check_mif: lda ap|scu.indicators_word cana scu.ir.mif,dl tze allow_more SCU Data Changed, ^MIF in safe data ldq if_rfi_bits,dl SCU Data Changed, MIF in safe data cnaq bp|mc.scu.cu_stat_word tze allow_more Only allow if both IF and RFI set tra illegal_return Otherwise invalid " make sure certain indicators not changed allow_more: era bp|mc.scu.indicators_word cana scu.ir.parm+scu.ir.abs,dl tnz illegal_return " Those indicators are OK. Check the first 4 words. No change allowed. cmpc (pr),(pr) desc9a ap|0,4*4 desc9a bp|mc.scu,4*4 tnz illegal_return " Check CU stat word. lda ap|scu.cu_stat_word era bp|mc.scu.cu_stat_word ana allowed_cu_stat_changes,dl tnz illegal_return " Now check legal changes to MIF bit. lda if_rfi_bits,dl cnaa bp|mc.scu.cu_stat_word tze has_set_rfi_off_mif " Guy hasn't set RFI/IF, better not have changed " MIF. lda ap|scu.indicators_word era bp|mc.scu.indicators_word cana scu.ir.mif,dl tnz illegal_return tra mc_ok " He did RFI/IF. Force MIF off. has_set_rfi_off_mif: lda scu.ir.mif,dl orsa bp|mc.scu.indicators_word ersa bp|mc.scu.indicators_word " Machine conditions have been validated. If original fault was an " overflow fault, then clear the indicators for fixedoverflow, " exponent overflow and underflow and truncation. " This is to ensure that the next overflow fault starts clean and is " not improperly dissected. mc_ok: lda ap|scu.fault_data_word determine fault type ana scu.fi_num_mask,dl cmpa FAULT_NO_OFL*2,dl was it overflow tnz copy_eis NO, do not clear indicators lca scu.ir.ovfl+scu.ir.eovf+scu.ir.eufl+scu.ir.tru+1,dl indicators affected ansa bp|mc.scu.indicators_word turn them OFF " " Now that the machine conditions have been "validated" we can copy " the EIS stuff into signal_data for restarting copy_eis: mlr (pr),(pr) desc9a ap|8,8*4 desc9a bp|mc.eis_info,8*4 tsx7 pop_scu_data discard SCU data " Now abandon the current stack frame in the signalling ring. This is like a " special "pop" of our stack. We don't need our stack frame any more. " restart: lda sp|stack_frame.prev_sp+1 pick up word offset of prev frame eppap sb|0,au generate pointer to prev frame lda ap|stack_frame.flag_word update the next frame pointer with flag cana fim_frame_flag,dl see if flag is indeed ON tze term7,* no, terminate the process era fim_frame_flag,dl turn OFF fim frame flag sta ap|stack_frame.flag_word and save value in stack frame lda ap|stack_frame.next_sp+1 update next_sp for min_length more words sbla stack_frame.min_length,du .. era fim_frame_flag,dl turn off old fim frame flag sta ap|stack_frame.next_sp+1 sta sb|stack_header.stack_end_ptr+1 eppsp ap|0 set stack pointer to frame being returned to " Reset the ips mask if called for. ldq bp|mc.scu.ppr.prr_word get ring number for index into pds$ips_mask qrl scu.ppr.prr_shift lda bp|mc.ips_temp see if mask should be restored cana =o1,dl by looking at the low order bit tze *+3 no, just restore and RCU era =o1,dl yes, turn off restore-mask bit sta pds$ips_mask,ql and store it in the PDS eppap pds$apt_ptr,* see if any IPS interrupts are ready to go OFF ana ap|apte.ips_message .. tze no_ips lda 1,dl make sure users gets message sta pds$alarm_ring lra pds$alarm_ring no_ips: " Restore machine conditions and exit. lda bp|mc.scu.indicators_word cana scu.ir.mif,dl tze *+2 Leave EIS alone if no MIF lpl bp|mc.eis_info Restore pointers and length lreg bp|mc.regs Restore registers lpri bp|mc.prs and pointer registers. rcu scu,* back to faulting location restart_from_ring_zero: eppbp mach_cond tra restart " " Arrive here if return to signaller was illegal. illegal_return: " " Leave the bad SCU data in signal_data, for signaller to signal with. " User's problem to figure out why it's bad and fix it. Leave scux in " there, to cleanup if unwound, and restart when good. " " Do not pop scu data. Leave good copy for possible restart. " signaller$no_save will not save bad copy. eppsp pds$stack_0_ptr,* epbpsb sp|0 so the entry operator of the signaller will " use the correct stack header. eppap pds$condition_name ap -> PDS place for signal name lda ilrtn_name get length of name arl 27 adla 1,dl for "acc" count character mlr (rl),(pr),fill(0) desc9a ilrtn_name,al desc9a ap|0,32 tra signaller$no_save " " Subroutines for managing copies of SCU data " " find_scu_data is called with x0 containing the unique index " to be searched for. x1 is left pointing to the entry found. " find_scu_data: eppap pds$mc_save_area,* set ap to start of save region ldx1 pds$mc_save_ptr start looking at end of list sbx1 pds$mc_save_area get number of words currently allocated tmoz 0,7 none, error return loop: eax1 -16,1 go back to previous set tmi 0,7 no more, error return cmpx0 ap|scu.tsr_stat_word,1 check this set of SCU data tnz loop eppap ap|0,1 set ap to info of interest tra 1,7 take success exit " pop_scu_data is called with ap pointing to the set of machine " conditions to be discarded. " pop_scu_data: eppab pds$mc_save_ptr,* eppab ab|-16 get pointer to last set of conditions eax1 ap|16 see if this is top of stack cmpx1 pds$mc_save_ptr see if we are restarting the last set tze last_set yes, pop stack mlr (pr),(pr) else move last set to area just restarted from desc9a ab|0,16*4 to condense stack desc9a ap|0,16*4 last_set: eax1 ab|0 set x1 to location just vacated stx1 pds$mc_save_ptr save next mc here tra 0,7 " " " This entry discards the machine conditions associated with a signaller frame " being released around. cleanup_entry: " This entry is called by the signal_ procedure as a result of " finding a cleanup condition. The first argument is the name " "cleanup". This entry must fetch the display pointer from the " argument list in order to find the signaller stack frame. " It must then go to the next stack frame and examine the argument " list pointer found there. The second argument in _t_h_i_s " argument list is a pointer to the machine conditions of interest. " epplp lp,* get own linkage pointer lda ap|0 check for special bit cana =8,dl indicating display pointer present tze short if not there, we're out of luck eppap ap|2,au* get display pointer (return_to_ring_0_ frame) eppap ap|stack_frame.next_sp,* get next frame pointer eppap ap|stack_frame.arg_ptr,* get argument list pointer eppap ap|4,* mc_ptr is second argument eppap ap|0,* it is a pointer... epaq ap|0 now look at the segment number ana =o077777,du just the segno cmpa =o077777,du is it null? tze short yes - nothing can be done ldx0 ap|mc.fim_temp fetch unique index from machine conditions tsx7 find_scu_data tra short IC+1 -> didn't find scu data tsx7 pop_scu_data IC+2 -> ah, found them. now eliminate themx short: short_return " " The following items must be filled in at " system initialization time. even .my_lp: lp: its -1,1 lp value for restart_fault scu: its -1,1 pointer to pds$signal_data+16 " The following item is used by init_hardcore gates to set " the call limiter field for this procedure's SDW. .tv_end: vfd 14/2 term7: its -2,-7 ilrtn_name: acc "illegal_return" end " " " ----------------------------------------------------------- " " " " 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 " "