1 " ***********************************************************
2 " * *
3 " * Copyright, C Honeywell Bull Inc., 1987 *
4 " * *
5 " * Copyright, C Honeywell Information Systems Inc., 1982 *
6 " * *
7 " * Copyright c 1972 by Massachusetts Institute of *
8 " * Technology and Honeywell Information Systems, Inc. *
9 " * *
10 " ***********************************************************
11
12
13 " HISTORY COMMENTS:
14 " 1) change87-01-12Lippard, approve87-02-09MCR7616,
15 " audit87-06-03Farley, install87-08-06MR12.1-1063:
16 " Added set_procs_required.
17 " 2) change87-08-07Lippard, approve87-02-09PBF7616,
18 " audit87-08-11Farley, install87-08-18MR12.1-1090:
19 " Added get_procs_required.
20 " END HISTORY COMMENTS
21
22
23 " Added $get_segment_ptr_path 09/21/84 Steve Herbst
24 " Renamed makeunknown, terminate to terminate_, 11/05/84 Keith Loepere.
25 " Modified 1984-11-20 by E. Swenson to remove hcs_$sfblock.
26 " Removed pd_page_faults, 01/08/85 Keith Loepere.
27 " Modified 1985-02-21 by E. Swenson to add get_user_access_modes_seg
28 " and get_ring_brackets_seg entries.
29 " Modified 1985-03-04 by M. Weaver to remove rest_of_datmk_ and fs_get_call_name.
30 " Modified 1985-03-29 by M. Pandolf to add get_access_info info_seg.
31
32 include gate_macros
33
34
35 hardcore_gate_info hcs_
36
37 hgate acl_add,acl,aadd,5,bad_dir_trap
38 hgate acl_add1,acl,a1add,6,bad_dir_trap
39 hgate acl_delete,acl,adelete,5,bad_dir_trap
40 hgate acl_list,acl,alist,6,bad_dir_trap
41 hgate acl_replace,acl,areplace,5,bad_dir_trap
42 hgate add_acl_entries,asd_,add_sentries,5,bad_dir_trap
43 hgate add_dir_acl_entries,asd_,add_dentries,5,bad_dir_trap
44 hgate add_dir_inacl_entries,asd_,add_identries,6,bad_dir_trap
45 hgate add_inacl_entries,asd_,add_isentries,6,bad_dir_trap
46 hgate append_branch,append,branch,4,bad_dir_trap
47 hgate append_branchx,append,branchx,9,bad_dir_trap
48 hgate append_link,append,link,4,bad_dir_trap
49 hgate appendl,append,link,4,bad_dir_trap
50 hgate assign_channel,hc_ipc,assign_channel,2
51 hgate assign_linkage,link_man,assign_linkage,3
52 fgate block,fast_hc_ipc,ipc_block,0
53 hgate change_bc,set,change_bc_path,6,bad_dir_trap
54 hgate change_bc_seg,set,change_bc_ptr,5,bad_dir_trap
55 hgate chname,chname,cfile,5,bad_dir_trap
56 hgate chname_file,chname,cfile,5,bad_dir_trap
57 hgate chname_seg,chname,cseg,4,bad_dir_trap
58 hgate combine_linkage,link_man,combine_linkage,3
59 hgate create_branch_,append,create_branch_,4,bad_dir_trap
60 hgate del_dir_tree,del_dir_tree,del_dir_tree,3,bad_dir_trap
61 hgate delentry_file,delentry,dfile,3,bad_dir_trap
62 hgate delentry_seg,delentry,dseg,2,bad_dir_trap
63 hgate delete_acl_entries,asd_,del_sentries,5,bad_dir_trap
64 hgate delete_channel,hc_ipc,delete_channel,2
65 hgate delete_dir_acl_entries,asd_,del_dentries,5,bad_dir_trap
66 hgate delete_dir_inacl_entries,asd_,del_identries,6,bad_dir_trap
67 hgate delete_inacl_entries,asd_,del_isentries,6,bad_dir_trap
68 hgate dir_quota_read,quota,dqread,8,bad_dir_trap
69 hgate dir_quota_move,quota,dqmove,4,bad_dir_trap
70 hgate echo_negotiate_get_chars,tty_read,echo_negotiate_get_chars,9
71 fgate fblock,fast_hc_ipc,ipc_f_block,2
72 hgate flush_consecutive_pages,force_write,consecutive,2
73 hgate flush_pages,force_write,list,2
74 hgate force_write,force_write,force_write,3
75 hgate fs_get_access_modes,fs_get,access_modes,4
76 hgate fs_get_brackets,fs_get,brackets,4,bad_dir_trap
77 hgate fs_get_dir_name,fs_get,dir_name,4
78 hgate fs_get_mode,fs_get,mode,3
79 hgate fs_get_path_name,fs_get,path_name,5
80 hgate fs_get_ref_name,fs_get,ref_name,4
81 hgate fs_get_seg_ptr,fs_get,seg_ptr,3
82 hgate fs_move_file,fs_move,ffile,6,bad_dir_trap
83 hgate fs_move_seg,fs_move,fseg,4,bad_dir_trap
84 hgate fs_search_get_wdir,fs_search,get_wdir,2
85 hgate fs_search_set_wdir,fs_search,set_wdir,2
86 hgate get_access_class,status_,get_access_class,4,bad_dir_trap
87 hgate get_access_class_seg,status_,get_access_class_ptr,3,bad_dir_trap
88 hgate get_access_info,status_,get_access_info,5,bad_dir_trap
89 hgate get_access_info_seg,status_,get_access_info_seg,3,bad_dir_trap
90 hgate get_alarm_timer,set_alarm_timer,get_alarm_timer,2
91 hgate get_author,status_,get_author,5,bad_dir_trap
92 hgate get_authorization,proc_info,authorization,2
93 hgate get_bc_author,status_,get_bc_author,4,bad_dir_trap
94 hgate get_dates,status_,get_dates,4,bad_dir_trap
95 hgate get_dates_ptr,status_,get_dates_ptr,3,bad_dir_trap
96 hgate get_defname_,get_defname_,get_defname_,6
97 hgate get_dir_ring_brackets,ringbr_,get_dir,4,bad_dir_trap
98 hgate get_exponent_control,hc_exponent_control,exponent_control_get,3
99 hgate get_hex_exponent_control,hc_exponent_control,hex_exponent_control_get,3
100 hgate get_initial_ring,proc_info,get_initial_ring,1
101 hgate get_ipc_operands,tc_util,get_ipc_operands,2
102 fgate get_ips_mask,ips_,get_ips_mask,1
103 hgate get_link_target,fs_get,get_link_target,5
104 hgate get_lp,link_man,get_lp,2
105 hgate get_max_length,status_,get_max_length,4,bad_dir_trap
106 hgate get_max_length_seg,status_,get_max_length_ptr,3,bad_dir_trap
107 hgate get_page_trace,hc_page_trace,get_page_trace,1
108 hgate get_page_trace_signal,hc_page_trace,get_signal,2
109 hgate get_process_usage,get_process_usage,get_process_usage,2
110 hgate get_procs_required,set_procs_required,get_procs_required,3
111 hgate get_ring_brackets,ringbr_,get,4,bad_dir_trap
112 hgate get_ring_brackets_seg,ringbr_,get_ring_brackets_seg,3,bad_dir_trap
113 hgate get_safety_sw,status_,get_safety_sw,4,bad_dir_trap
114 hgate get_safety_sw_seg,status_,get_safety_sw_ptr,3,bad_dir_trap
115 hgate get_search_rules,fs_get,search_rules,1
116 hgate get_segment_ptr_path,initiate_,get_segment_ptr_path,5
117 hgate get_system_search_rules,initiate_search_rules,get_system_rules,2
118 hgate get_uid_file,status_,get_uid_file,4,bad_dir_trap
119 hgate get_uid_seg,kst_info,get_uid,3
120 hgate get_user_access_modes,status_,get_user_access_modes,7,bad_dir_trap
121 hgate get_user_access_modes_seg,status_,get_user_access_modes_seg,6,bad_dir_trap
122 hgate get_user_effmode,status_,get_user_effmode,6,bad_dir_trap
123 hgate get_user_raw_mode,status_,get_user_raw_mode,5,bad_dir_trap
124 hgate get_volume_dump_switches,status_,get_volume_dump_switches,5,bad_dir_trap
125 hgate grow_lot,link_man,grow_lot,1
126 hgate high_low_seg_count,kst_info,high_low_seg_count,2
127 hgate history_regs_get,history_reg_save,per_proc_get,1
128 hgate history_regs_set,history_reg_save,per_proc_set,1
129 hgate initiate,initiate,initiate,7,bad_dir_trap
130 hgate initiate_count,initiate,initiate_count,7,bad_dir_trap
131 hgate initiate_search_rules,initiate_search_rules,initiate_search_rules,2
132 fgate level_get,level,get,1
133 fgate level_set,level,set_gate,1
134 hgate link_force,link_snap,link_force,3
135 hgate list_acl,asd_,list_sall,7,bad_dir_trap
136 hgate list_dir,star_,list_dir,7,bad_dir_trap
137 hgate list_dir_fast,star_,list_dir_fast,7,bad_dir_trap
138 hgate list_dir_acl,asd_,list_dall,7,bad_dir_trap
139 hgate list_dir_inacl,asd_,list_idall,8,bad_dir_trap
140 hgate list_inacl,asd_,list_isall,8,bad_dir_trap
141 hgate list_inacl_all,list_inacl_all,list_inacl_all,5,bad_dir_trap
142 hgate lv_attached,mountedp,mountedp,2
143 hgate make_entry,link_snap,make_entry,5
144 hgate make_ptr,link_snap,make_ptr,5
145 hgate make_seg,make_seg,make_seg,6,bad_dir_trap
146 hgate makeunknown,terminate_,terminate_,3
147 fgate mask_ips,ips_,mask_ips,2
148 hgate pre_page_info,page,pre_page_info,4
149 hgate proc_info,proc_info,proc_info,4
150 hgate quota_get,quota,qget,8,bad_dir_trap
151 hgate quota_read,quota,qread,8,bad_dir_trap
152 hgate quota_move,quota,qmove,4,bad_dir_trap
153 hgate read_events,fast_hc_ipc,read_events,2
154 hgate release_segment_numbers,kst_util,free_range,3
155 hgate replace_acl,asd_,replace_sall,6,bad_dir_trap
156 hgate replace_dir_acl,asd_,replace_dall,6,bad_dir_trap
157 hgate replace_dir_inacl,asd_,replace_idall,7,bad_dir_trap
158 hgate replace_inacl,asd_,replace_isall,7,bad_dir_trap
159 hgate reserve_segment_numbers,kst_util,get_range,3
160 fgate reset_ips_mask,ips_,reset_ips_mask,2
161 hgate reset_working_set,page,reset_working_set,0
162 hgate set_256K_switch,kst_util,set_256K_switch,3
163 hgate set_alarm,set_alarm_timer,set_alarm,2
164 hgate set_alarm_timer,set_alarm_timer,set_alarm_timer,3
165 fgate set_automatic_ips_mask,ips_,set_automatic_ips_mask,2
166 hgate set_bc,set,bc,4,bad_dir_trap
167 hgate set_bc_seg,set,bc_seg,3,bad_dir_trap
168 hgate set_copysw,set,copysw,4,bad_dir_trap
169 hgate set_cpu_timer,pxss,set_cpu_timer,3
170 hgate set_damaged_sw,set,damaged_sw_path,4,bad_dir_trap
171 hgate set_damaged_sw_seg,set,damaged_sw_ptr,3,bad_dir_trap
172 hgate set_dir_ring_brackets,ringbr_,set_dir,4,bad_dir_trap
173 hgate set_dnzp_sw,set,dnzp_sw_path,4,bad_dir_trap
174 hgate set_dnzp_sw_seg,set,dnzp_sw_ptr,3,bad_dir_trap
175 hgate set_entry_bound,set,entry_bound_path,4,bad_dir_trap
176 hgate set_entry_bound_seg,set,entry_bound_ptr,3,bad_dir_trap
177 hgate set_exponent_control,hc_exponent_control,exponent_control_set,4
178 hgate set_hex_exponent_control,hc_exponent_control,hex_exponent_control_set,4
179 hgate set_hexfp_control,hc_exponent_control,set_hexfp_control,3
180 fgate set_ips_mask,ips_,set_ips_mask,2
181 hgate set_max_length,set,max_length_path,4,bad_dir_trap
182 hgate set_max_length_seg,set,max_length_ptr,3,bad_dir_trap
183 hgate set_page_trace_signal,hc_page_trace,set_signal,6
184 hgate set_pl1_machine_mode,illegal_procedure,set_pl1_machine_mode,2
185 hgate set_procs_required,set_procs_required,set_procs_required,2
186 hgate set_ring_brackets,ringbr_,set,4,bad_dir_trap
187 hgate set_safety_sw,set,safety_sw_path,4,bad_dir_trap
188 hgate set_safety_sw_seg,set,safety_sw_ptr,3,bad_dir_trap
189 fgate set_stack_ptr,set_stack_ptr,set_stack_ptr,1
190 hgate set_synchronized_sw,set,synchronized_sw,4
191 hgate set_timer,pxss,set_timer,2
192 hgate set_volume_dump_switches,set,volume_dump_switches,5,bad_dir_trap
193 hgate star_,star_,star_,8,bad_dir_trap
194 hgate star_dir_list_,star_,dir_list_,9,bad_dir_trap
195 hgate star_list_,star_,list_,9,bad_dir_trap
196 hgate status_,status_,status_,6,bad_dir_trap
197 hgate status_for_backup,status_,status_for_backup,4,bad_dir_trap
198 hgate status_long,status_,long,6,bad_dir_trap
199 hgate status_minf,status_,minf,6,bad_dir_trap
200 hgate status_mins,status_,mins,4,bad_dir_trap
201 hgate stop_process,stop_process,stop_process,1
202 hgate terminate_file,terminate_,tefile,4
203 hgate terminate_name,terminate_,name,2
204 hgate terminate_noname,terminate_,noname,2
205 hgate terminate_seg,terminate_,teseg,3
206 hgate trace_marker,page,trace_marker,1
207 hgate truncate_file,truncate,trfile,4,bad_dir_trap
208 hgate truncate_seg,truncate,trseg,3,bad_dir_trap
209 hgate try_to_unlock_lock,try_to_unlock_lock,try_to_unlock_lock,2
210 hgate tty_abort,tty_abort,tty_abort,4
211 hgate tty_attach,tty_attach,tty_attach,5
212 hgate tty_detach,tty_detach,tty_detach,4
213 hgate tty_detach_new_proc,tty_detach,new_proc,4
214 hgate tty_get_line,tty_read,tty_get_line,8
215 hgate tty_event,tty_index,tty_event,4
216 hgate tty_get_name,tty_index,tty_get_name,4
217 hgate tty_index,tty_index,tty_index,4
218 hgate tty_order,tty_order,tty_order,5
219 hgate tty_read,tty_read,tty_read,7
220 hgate tty_read_with_mark,tty_read,tty_read_with_mark,6
221 hgate tty_read_echoed,tty_read,tty_read_echoed,9
222 hgate tty_state,tty_state,tty_state,3
223 hgate tty_write,tty_write,tty_write,7
224 hgate tty_write_set_mark,tty_write,tty_write_set_mark,5
225 hgate tty_write_whole_string,tty_write,tty_write_whole_string,6
226 fgate unmask_ips,ips_,unmask_ips,2
227 fgate usage_values,usage_values,usage_values,2
228 hgate validate_processid,tc_util,validate_processid,2
229 hgate wakeup,hc_ipc,ipc_wakeup,4
230
231 " " " " " " " " " " " " " " " " " " " " " " " " " " "
232 "
233 " The following code is in hcs_ for efficiency.
234 "
235 "
236 " The following entries are implemented here:
237 " cpu_time_and_paging_
238 " cpu_time_and_paging_op_
239 " virtual_cpu_time_
240 " virtual_cpu_time_op_
241 " total_cpu_time_
242 "
243 " Modified 741214 by PG to be inhibited while doing calculations.
244 " Modified: 80/07/16 by PCK to move the code for these entries
245 " out of the transfer vector so that meter_gate does
246 " not get confused and to make the system more secure
247 "
248 " " " " " " " " " " " " " " " " " " " " " " " " " " "
249
250 "
251 use transfer_vector
252 segdef cpu_time_and_paging_
253 segdef get_usage_values
254 cpu_time_and_paging_:
255 get_usage_values:
256 tra cpu_time_and_paging_.e
257 use main
258 zero 0,0
259 cpu_time_and_paging_.e:
260 epplp .my_lp,*
261 inhibit on <+><+><+><+><+>
262 rccl sys_info$clock_,* read the clock
263 sbaq pds$cpu_time convert to cpu time
264 sbaq pds$virtual_delta convert to virtual CPU time
265 inhibit off <-><-><-><-><->
266 staq ap|4,* return to caller
267
268 lda pds$page_waits get the page faults for the process
269 sta ap|2,* return to caller
270
271 stz ap|6,* paging device page faults return to caller
272 short_return
273 "
274 use transfer_vector
275 segdef total_cpu_time_
276 total_cpu_time_:
277 tra total_cpu_time_.e
278 use main
279 zero 0,0
280 total_cpu_time_.e:
281 epplp .my_lp,*
282 inhibit on <+><+><+><+><+>
283 rccl sys_info$clock_,* read the clock
284 sbaq pds$cpu_time convert to cpu time
285 inhibit off <-><-><-><-><->
286 staq ap|2,* return to caller
287 short_return
288 "
289 use transfer_vector
290 segdef virtual_cpu_time_
291 virtual_cpu_time_:
292 tra virtual_cpu_time_.e
293 use main
294 zero 0,0
295 virtual_cpu_time_.e:
296 epplp .my_lp,*
297 inhibit on <+><+><+><+><+>
298 rccl sys_info$clock_,* read the clock
299 sbaq pds$cpu_time convert to cpu time
300 sbaq pds$virtual_delta convert to virtual CPU time
301 inhibit off <-><-><-><-><->
302 staq ap|2,* return to caller
303 short_return
304 "
305 " This operator is an internal interface for the convenience
306 " of pl1_operators_. It returns the virtual cpu time of the calling
307 " process in the AQ, with the indicators properly set. Note that
308 " this operator does not follow normal system conventions for
309 " argument passing.
310 "
311 " NOTE WELL: pl1_operators_ and compiled pl1 programs
312 " depend on the fact that this operator modifies only PR4, PR7,
313 " the AQ, and the indicators. If the register usage of this
314 " operator must be changed, pl1_operators_ must also be changed
315 " to save and restore the affected registers.
316 "
317 use transfer_vector
318 segdef virtual_cpu_time_op_
319 virtual_cpu_time_op_:
320 tra virtual_cpu_time_op_.e
321 use main
322 zero 0,0
323 virtual_cpu_time_op_.e:
324 epplp .my_lp,*
325 inhibit on <+><+><+><+><+><+><+><+><+><+><+><+><+>
326 rccl sys_info$clock_,* read the calendar clock
327 sbaq pds$cpu_time adjust to real cpu time
328 sbaq pds$virtual_delta adjust to virtual cpu time
329 inhibit off <-><-><-><-><-><-><-><-><-><-><-><-><->
330 rtcd sp|stack_frame.return_ptr return to user program
331 "
332 " This operator returns the virtual cpu time of the calling
333 " process in the AQ. The indicators are not guaranteed.
334 " The number of page faults taken by the calling process
335 " is returned in X0 and X1 upper 18 bits and lower 18 bits
336 " respectively. Note that this operator does not follow
337 " normal system conventions for argument passing.
338 "
339 use transfer_vector
340 segdef cpu_time_and_paging_op_
341 cpu_time_and_paging_op_:
342 tra cpu_time_and_paging_op_.e
343 use main
344 zero 0,0
345 cpu_time_and_paging_op_.e:
346 epplp .my_lp,*
347 inhibit on <+><+><+><+><+><+><+><+><+><+><+><+><+>
348 rccl sys_info$clock_,* read the calendar clock
349 sbaq pds$cpu_time adjust to real cpu time
350 sbaq pds$virtual_delta adjust to virtual cpu time
351 ldx0 pds$page_waits get upper 18 bits of page faults
352 lxl1 pds$page_waits get lower 18 bits of page faults
353 inhibit off <-><-><-><-><-><-><-><-><-><-><-><-><->
354 rtcd sp|stack_frame.return_ptr
355
356 bad_dir_handler
357
358 end