1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 add_scu:
18 proc (tag, errtag, rcode);
19
20 dcl tag fixed bin (3),
21 errtag fixed bin (3),
22 rcode fixed bin (35);
23
24 dcl cdp ptr,
25 i fixed bin (3),
26 enabled bit (1) aligned,
27 base fixed bin (17),
28 size fixed bin (17),
29 interlace fixed bin (3),
30 code fixed bin (35),
31 cpu_mask bit (8) aligned;
32
33
34 dcl init_scu entry (fixed bin (3), fixed bin (3), fixed bin (35)),
35 init_scu$final_scu entry (fixed bin (3)),
36 privileged_mode_ut$clear_cache
37 entry,
38 scr_util$set_mask entry (fixed bin (3), fixed bin (3), bit (72) aligned),
39 scr_util$enable_ports entry (fixed bin (3)),
40 scr_util$disable_ports entry (fixed bin (3)),
41 rsw_util$port_info entry (fixed bin (3), bit (1) aligned, fixed bin (17), fixed bin (17), fixed bin (3)),
42 rsw_util$set_rsw_mask entry (fixed bin (3), bit (1) aligned),
43 set_procs_required entry (bit (8) aligned, fixed bin (35)),
44 config_$find_2 entry (char (4) aligned, fixed bin (3), ptr),
45 config_$update entry (),
46 syserr entry options (variable);
47
48 dcl store condition,
49 op_not_complete condition;
50
51 dcl 1 cdata based (cdp) aligned like scs$controller_data;
52
53
54 dcl (addr, hbound, lbound, substr)
55 builtin;
56 ^L
57
58
59 rcode = 0;
60 cdp = addr (scs$controller_data (tag));
61
62 on condition (store) go to add_fault;
63 on condition (op_not_complete) go to add_fault;
64
65 do i = lbound (scs$processor_data, 1) to hbound (scs$processor_data, 1);
66 if scs$processor_data (i).online then do;
67 cpu_mask = "0"b;
68 substr (cpu_mask, i + 1, 1) = "1"b;
69 call set_procs_required (cpu_mask, code);
70
71 if code ^= 0 then do;
72 rcode = rcerr_sprq_failed;
73 goto add_err;
74 end;
75
76 call rsw_util$port_info (tag, enabled, base, size, interlace);
77
78 if ^enabled then do;
79 rcode = rcerr_addscu_enable;
80 go to add_err;
81 end;
82 if (base ^= cdata.base) |
83 (size ^= cdata.size) | ((interlace ^= 0) ^= cdata.ext_interlaced)
84 | ((interlace ^= 0) & ((interlace = 4) ^= cdata.four_word)) then do;
85 rcode = rcerr_addscu_switches;
86 go to add_err;
87 end;
88
89 call init_scu (tag, errtag, rcode);
90 call privileged_mode_ut$clear_cache;
91
92 call set_procs_required ("0"b, code);
93
94 if rcode ^= 0 then
95 return;
96 end;
97 end;
98
99 do i = 1 to 4;
100 if cdata.eima_data (i).mask_assigned then
101 call scr_util$set_mask (tag, (cdata.eima_data (i).mask_assignment), scs$sys_level);
102 end;
103
104 call scr_util$enable_ports (tag);
105
106 cdata.online = "1"b;
107 cdata.offline = "0"b;
108
109 call config_$find_2 (MEM_CARD_WORD, tag + 1, mem_cardp);
110
111 mem_card.state = "on ";
112
113 call rsw_util$set_rsw_mask (tag, "1"b);
114
115 call config_$update ();
116 call syserr (ANNOUNCE, "addmem: Added MEM ^a.", substr ("ABCDEFGH", tag + 1, 1));
117
118 return;
119 ^L
120
121 add_fault:
122 call init_scu$final_scu (tag);
123 rcode = rcerr_addscu_fault;
124
125 add_err:
126 call set_procs_required ("0"b, code);
127
128 errtag = i;
129
130 return;
131 ^L
132
133
134
135 remove_scu:
136 entry (tag);
137
138
139 cdp = addr (scs$controller_data (tag));
140
141 call scr_util$disable_ports (tag);
142
143 call init_scu$final_scu (tag);
144
145 cdata.offline = "1"b;
146 cdata.online = "0"b;
147
148 call config_$find_2 (MEM_CARD_WORD, tag + 1, mem_cardp);
149
150 mem_card.state = "off ";
151
152 call rsw_util$set_rsw_mask (tag, "0"b);
153
154 call config_$update ();
155 call syserr (ANNOUNCE, "delmem: Removed MEM ^a.", substr ("ABCDEFGH", tag + 1, 1));
156
157 return;
158 ^L
159 %include rcerr;
160 %page;
161 %include config_mem_card;
162 %page;
163 %include scs;
164 %page;
165 %include syserr_constants;
166 ^L
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196 end add_scu;