" *********************************************************** " * * " * Copyright, (C) Honeywell Bull Inc., 1987 * " * * " * Copyright, (C) Honeywell Information Systems Inc., 1984 * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " *********************************************************** " " EMERGENCY_SHUTDOWN name emergency_shutdown " " This module is designed to be entered from BOS after a crash, " It will attempt to salvage the contents of core by " 1. set up an initial environment to clear I/O devices, " 2. flushing out all unwired pages " 3. deactivating all segments " " Last Modified: (Date and Reason) " " 10/11/83, Keith Loepere for paged unpaged stacks. " 09/18/83, E. A. Ranzenbach to call syserr_real$syserr_reset before ocdcm_$esd_reset " 06/20/83, E. A. Ranzenbach, for new ocdcm_$esd_reset call " 09/28/82, J. Bongiovanni, to run on any CPU " 03/01/81, W. Olin Sibert, for ADP conversion (Phase One) " 01/20/81 by C. Hornig for io_manager " 05/10/79 by B. Greenberg for shared stack_0's " 03/10/76 by S. Webber " 08/31/73 by R.B.Snyder to remove tra 0 at entry. " 07/21/71 by Richard H. Gumpertz to get rid of prds$+, etc. " Redesigned: N. I. Morris, 5/71 " Modified for new file system: S. H. Webber, 4/69 " Initial coding: T. H. Van Vleck, 2/69 " Design: N. I. Morris, 11/68 " iftarget adp warn (This has not been converted yet for the ADP. Beware.) ifend segdef entry,lp,pp include sdw include ptw include scs include stack_header include apte include state_equs include stack_frame include sst include unpaged_page_tables equ bsmbx,0 tempd arglist(2) argument list tempd temp_ptr temporary pointer " " inhibit on <+><+><+><+><+><+><+><+><+><+><+><+> entry: epplp lp-*,ic* get linkage pointer epbpap pp-*,ic* get procedure segno tra ap|*+1 enter appending mode " Disable the traffic controller and indicate " system is in the throes of a shutdown. stz tc_data$wait_enable turn OFF multiprogramming lca 1,dl sta tc_data$apt_lock unlock the APT stc1 tc_data$metering_lock unlock metering lock eppbp tc_data$apt unlock APTEs lxl1 tc_data$apt_size ul_apte: eax1 -1,1 tmi ul_apte_done stc1 bp|apte.lock eppbp bp|size_of_apt_entry tra ul_apte ul_apte_done: stc1 tc_data$system_shutdown for simplified actions " We have only one processor running (we hope!) so " must tell the system before any page faults cause connect lda prds$processor_pattern use the processor we were returned on sta scs$processor and no others stz scs$connect_lock undo connect lock stz scs$cam_wait undo cam wait flags stz scs$sys_trouble_pending undo sys trouble cells stz scs$trouble_flags .. stz scs$bos_restart_flags .. " Set this processor as the BOS processor, and set up the SCS appropriately " Since BOS came here, we have an interrupt mask. lxl1 prds$processor_tag needed for masking, etc. sxl1 scs$bos_processor_tag We can now RTB lxl0 scs$interrupt_controller Bootload SCU number eppab scs$port_addressing_word,x0 ab -> word containing port number for Bootload SCU sprpab scs$mask_ptr,x1 Set mask pointer this CPU lda rmcm_instruction sta scs$read_mask,x1 Set RMCM instruction lda smcm_instruction sta scs$set_mask,x1 Set SMCM instruction " Mask down to sys_level. No interrupts may be taken now. ldaq scs$sys_level mask down lprpab scs$mask_ptr,1 xec scs$set_mask,1 " " Now switch to the idle process for this processor lprpbp scs$idle_aptep,1 ldbr bp|apte.dbr note that prds is already good " Now turn ON delete_cpu for all other processor in case they start up lda 3,dl start with last CPU tag ldq processor_data.delete_cpu,du on_loop: cmpa prds$processor_tag skip our own tze skip_ours orsq scs$processor_data,al turn ON bit skip_ours:sbla 1,dl tpl on_loop " " Establish stack frame at base of PRDS. eppsp prds$+stack_header.stack_begin_ptr,* epbpsb sp|0 generate pointer to base of stack ldx7 push get size of stack frame in X7 eppap sp|0,7 next SP spriap sp|stack_frame.next_sp spriap sb|stack_header.stack_end_ptr ldaq null null last SP staq sp|stack_frame.prev_sp " Reset locks and switches to allow smooth shutdown. stz sst_seg$+sst.astl unlock the global AST lock stz scs$reconfig_lock undo the reconfiguration lock " Call ocdcm_$esd_reset to reset the oc_data and syserr_real$syserr_reset to " reset the log_data. eppbp syserr_real$syserr_reset stz arglist stz arglist+1 tsx7 call_out eppbp ocdcm_$esd_reset tsx7 call_out " RESET IOM_MANAGER. Clear out any pending iom status. eppbp =1 bp -> constant 1 spribp arglist+2 set argument list fld =1b24,dl set argument list header ora =o4,dl .. staq arglist .. eppbp io_manager$reset bp -> iom_manager$iom_reset entry tsx7 call_out make the call eppbp page$esd_reset reset paging dims tsx7 call_out eppbp pc_recover_sst$pc_recover_sst recompute page control state. tsx7 call_out eppbp page$time_out tsx7 call_out eppbp disk_emergency$test_all_drives_masked tsx7 call_out " " Abandon the prds and use some reasonable stack. ldaq prds$+stack_header.stack_begin_ptr staq prds$+stack_header.stack_end_ptr eppsp =its(-1,1),* This just keeps page faults from crashing " Now get ourselves a PDS to work with. We will use the template_pds by copying " our header into it, wiring the first page, and then placing the SDW for template_pds " in the slot for PDS. epaq template_pds$+0 get segno of template_pds als 1 times 2 for DSEG index eax0 0,au save for later lda dseg$+0,au pick up SDW for template_pds arl sdw.add_shift adjust page table address sbla sst$+sst.ptwbase convert to SST offset ldq ptw.wired,dl turn wired bit ON in the first PTW orsq sst$+0,al .. " Now touch the page, causing a page fault (probably) szn template_pds$+0 PAGE FAULT (I HOPE IT WORKS) epaq pds$+0 get segment number of PDS als 1 times 2 for DSEG index eax1 0,au save for later lda dseg$+sdw.bound_word,x1 " Get bound from SDW arl sdw.bound_shift ana sdw.bound_mask,dl " Mask it off adla 1,dl " Add one to convert to 16 word blocks als 18+4+2 " And convert to a character count, in AU eppbp pds$ get pointers to data to move eppbb template_pds$+0 .. mlr (pr,rl),(pr,rl),fill(0) desc9a bp|0,au desc9a bb|0,au ldaq dseg$,0 now move the SDW staq dseg$,1 .. cams camp " " Use initialization stack. " " "From dust to dust.... " eppsb inzr_stk0$ epaq sb|0 als 1 sprisb pds$stack_0_ptr eppbp dseg$,au spribp pds$stack_0_sdwp " Re-init the stack end pointer. " eppsp sb|128 sprisp sb|stack_header.stack_begin_ptr sprisp sb|stack_header.stack_end_ptr " Make sure none of the pages of the stack are wired now, " just so pmut will understand the starting state. lda bp|0 get the first word of the SDW arl sdw.add_shift shift to leave the address cmpa unpaged_page_tables$0+upt.sst_last_loc page table out of sst tpnz unpaged => unpaged sbla unpaged_page_tables$0+upt.sst_absloc offset SDW addr in SST tmi unpaged eppbb sst$ get ptr to SST eppbb bb|0,al bb -> PTW's of stack lca ptw.wired+1,dl form mask to reset wired bits ldq bp|1 get bound field from stack SDW qrl 9 shift to get number of PTW's - 1 eax0 0,qu put into X0 for loop count uw_loop: ansa bb|0,0 mask out ptw.wired eax0 -1,0 count tpl uw_loop process all PTW's (about 16?) unpaged: tra wired_shutdown$wired_emergency " " All calls out are made by this subroutine. call_out: call bp|0(arglist) make the call tra 0,7 and return to caller " " Storage & constants. even lp: its 0,0 somebody must set these. pp: its 0,0 null: its -1,1 push: push " to get stack frame size inhibit on <+><+><+><+><+><+><+><+><+><+><+><+><+><+><+> rmcm_instruction: rmcm ab|0,* smcm_instruction: smcm ab|0,* inhibit off <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-> 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 " "