1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 bce_esd: proc (info_ptr);
21
22
23
24
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);
66 end;