1 /****^  ***********************************************************
 2         *                                                         *
 3         * Copyright, (C) Honeywell Bull Inc., 1987                *
 4         *                                                         *
 5         * Copyright, (C) Honeywell Information Systems Inc., 1984 *
 6         *                                                         *
 7         *********************************************************** */
 8 
 9 
10 /****^  HISTORY COMMENTS:
11   1) change(87-02-26,Farley), approve(87-04-15,MCR7661),
12      audit(87-04-21,Fawcett), install(87-04-28,MR12.1-1028):
13      Added check for fgbx.io_reconfig that is turned on whenever an I/O
14      reconfiguration can cause memory to be corrupted.  Thus no emergency
15      shutdown should be attempted, because it would only propagate the
16      corruption.
17                                                    END HISTORY COMMENTS */
18 
19 
20 bce_esd: proc (info_ptr);
21 
22 /* Routine to modify machine conditions so as to invoke esd.
23 Written August 1983 by Keith Loepere. */
24 /* format: style4,indattr,ifthenstmt,ifthen,idind33,^indcomtxt */
25 
26 dcl  bce_continue                     entry (ptr);
27 dcl  com_err_                         entry options (variable);
28 dcl  emergency_shutdown$              entry;
29 dcl  info_ptr                         ptr parameter;
30 dcl  1 toehold$                       aligned external like toe_hold;
31 dcl  (addr, bin, bit, codeptr, segno, string, wordno) builtin;
32 %page; %include collection_1_phases;
33 %page; %include flagbox;
34 %page; %include toe_hold;
35 
36           fgbxp = addr (flagbox$);
37           if ^fgbx.ssenb then do;
38                call com_err_ (0, "esd", "Storage system not enabled.  esd not performed.");
39                return;
40           end;
41 
42           if fgbx.io_reconfig then do;
43                call com_err_ (0, "esd", "Emergency shutdown is prohibited due to possible memory corruption.");
44                sys_info$collection_1_phase = BOOT_INITIALIZATION;
45                toehold$.memory_state = At_bce__boot;
46                return;
47           end;
48 
49           mc_state_ptr = addr (toehold$.multics_state);
50           mcp = addr (mc_state.mc_);
51           scup = addr (mc.scu);
52           scu.ppr.prr = "000"b;
53           scu.ppr.psr = bit (bin (segno (codeptr (emergency_shutdown$)), 15), 15);
54           scu.ppr.p = "1"b;
55           string (scu.apu) = "0"b;
56           scu.fault_cntr = "0"b;
57 
58           scu.ilc = bit (bin (wordno (codeptr (emergency_shutdown$)), 18), 18);
59           string (scu.ir) = "0"b;
60           scu.ir.bm = "1"b;
61 
62           mc_state.interrupt = "0"b;
63           mc_state.cfg = "0"b;
64 
65           call bce_continue (info_ptr);                     /* won't return */
66      end;