1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: mach_host.defs,v $
29 * Revision 2.10 92/03/10 16:26:54 jsb
30 * From durriya@ri.osf.org: added host_get_boot_info.
31 * [92/01/08 15:01:12 jsb]
32 *
33 * Revision 2.9 92/02/19 16:07:19 elf
34 * Reenable thread_depress_abort.
35 * [92/01/20 rwd]
36 *
37 * Revision 2.8 92/01/03 20:21:13 dbg
38 * Add 'CountInOut' tag to routines returning variable-length
39 * inline arrays. Remove 'IsLong' tag from routines passing or
40 * returning variable-length arrays. Old routines left under
41 * 'xxx_' names. REMOVE THESE SOON!
42 * [91/11/26 dbg]
43 *
44 * Revision 2.7 91/07/31 17:53:39 dbg
45 * Add vm_wire and thread_wire.
46 * [91/07/30 17:10:17 dbg]
47 *
48 * Revision 2.6 91/05/14 16:54:32 mrt
49 * Correcting copyright
50 *
51 * Revision 2.5 91/02/05 17:33:20 mrt
52 * Changed to new Mach copyright
53 * [91/02/01 17:17:52 mrt]
54 *
55 * Revision 2.4 90/09/09 14:33:08 rpd
56 * Restored processor_set_create's out arguments.
57 * [90/08/30 rpd]
58 *
59 * Revision 2.3 90/08/07 18:00:21 rpd
60 * Removed thread_depress_abort. Changed host_processor_sets
61 * to use unprivileged ports.
62 * [90/08/06 rpd]
63 *
64 * Revision 2.2 90/06/02 14:58:17 rpd
65 * Created for new host/processor technology.
66 * [90/03/26 23:51:11 rpd]
67 *
68 * Remove KERNEL_SERVER define. Cleanup.
69 * [89/08/02 dlb]
70 * Add IsLong specifiers to variable length arguments to info calls.
71 * [89/08/02 dlb]
72 * Add thread_depress_abort.
73 * [89/06/20 dlb]
74 *
75 * Add processor_set_{tasks,threads}, host_processor_sets,
76 * host_processor_set_priv.
77 * [89/06/08 dlb]
78 *
79 * Add priority and policy calls.
80 * [89/05/12 dlb]
81 *
82 * Move type definitions to mach_types.defs, delete kernel keyword.
83 * [89/01/25 dlb]
84 *
85 * Moved to mach/ from kern/
86 * [89/01/25 dlb]
87 *
88 * Split processor_set_default. Add task_assign_default and
89 * thread_assign_default.
90 * [88/12/21 dlb]
91 *
92 * Minor cleanups, add host_kernel_version.
93 * [88/12/02 dlb]
94 *
95 * Revision 2.4 89/12/22 15:54:26 rpd
96 * Under KERNEL_SERVER, pass the out arguments of
97 * processor_set_create as port_t's. They really are
98 * the appropriate processor set types, but processor_set_create
99 * does the type conversions internally. This isn't pretty.
100 * [89/12/15 dlb]
101 *
102 * Revision 2.3 89/10/15 02:05:40 rpd
103 * Minor cleanups.
104 *
105 * Revision 2.2 89/10/11 14:38:34 dlb
106 * Add IsLong specifiers to variable length arguments to info calls.
107 * Add thread_depress_abort.
108 * Add processor_set_{tasks,threads}, host_processor_sets,
109 * host_processor_set_priv.
110 * Add priority and policy calls.
111 * Split processor_set_default. Add task_assign_default and
112 * thread_assign_default.
113 * Add host_kernel_version.
114 *
115 * Revision 2.1 89/01/30 16:17:06 dlb
116 * Created.
117 *
118 */
119
120 /*
121 * File: mach/mach_host.defs
122 *
123 * Abstract:
124 * Mach host operations support. Includes processor allocation and
125 * control.
126 */
127
128 #ifdef KERNEL
129 simport <kern/compat_xxx_defs.h>; /* for obsolete routines */
130 #endif KERNEL
131
132 subsystem
133 #if KERNEL_SERVER
134 KernelServer
135 #endif KERNEL_SERVER
136 mach_host 2600;
137
138 /*
139 * Basic types
140 */
141
142 #include <mach/std_types.defs>
143 #include <mach/mach_types.defs>
144
145 /*
146 * Get list of processors on this host.
147 */
148
149 routine host_processors(
150 host_priv : host_priv_t;
151 out processor_list : processor_array_t);
152
153 /* obsolete */
154 routine yyy_host_info(
155 host : host_t;
156 flavor : int;
157 out host_info_out : host_info_t, IsLong);
158
159
160 /* obsolete */
161 routine yyy_processor_info(
162 processor : processor_t;
163 flavor : int;
164 out host : host_t;
165 out processor_info_out: processor_info_t, IsLong);
166
167 /*
168 * Start processor.
169 */
170
171 routine processor_start(
172 processor : processor_t);
173
174 /*
175 * Exit processor -- may not be restartable.
176 */
177
178 routine processor_exit(
179 processor : processor_t);
180
181 /* obsolete */
182 routine yyy_processor_control(
183 processor : processor_t;
184 processor_cmd : processor_info_t, IsLong);
185
186 /*
187 * Get default processor set for host.
188 */
189 routine processor_set_default(
190 host : host_t;
191 out default_set : processor_set_name_t);
192
193 /*
194 * Get rights to default processor set for host.
195 * Replaced by host_processor_set_priv.
196 */
197 routine xxx_processor_set_default_priv(
198 host : host_priv_t;
199 out default_set : processor_set_t);
200
201 /*
202 * Create new processor set. Returns real port for manipulations,
203 * and name port for obtaining information.
204 */
205 routine processor_set_create(
206 host : host_t;
207 out new_set : processor_set_t;
208 out new_name : processor_set_name_t);
209
210 /*
211 * Destroy processor set.
212 */
213 routine processor_set_destroy(
214 set : processor_set_t);
215
216 /* obsolete */
217 routine yyy_processor_set_info(
218 set_name : processor_set_name_t;
219 flavor : int;
220 out host : host_t;
221 out info_out : processor_set_info_t, IsLong);
222
223 /*
224 * Assign processor to processor set.
225 */
226 routine processor_assign(
227 processor : processor_t;
228 new_set : processor_set_t;
229 wait : boolean_t);
230
231 /*
232 * Get current assignment for processor.
233 */
234
235 routine processor_get_assignment(
236 processor : processor_t;
237 out assigned_set : processor_set_name_t);
238
239 /*
240 * Assign thread to processor set.
241 */
242 routine thread_assign(
243 thread : thread_t;
244 new_set : processor_set_t);
245
246 /*
247 * Assign thread to default set.
248 */
249 routine thread_assign_default(
250 thread : thread_t);
251
252 /*
253 * Get current assignment for thread.
254 */
255 routine thread_get_assignment(
256 thread : thread_t;
257 out assigned_set : processor_set_name_t);
258
259 /*
260 * Assign task to processor set.
261 */
262 routine task_assign(
263 task : task_t;
264 new_set : processor_set_t;
265 assign_threads : boolean_t);
266 /*
267 * Assign task to default set.
268 */
269 routine task_assign_default(
270 task : task_t;
271 assign_threads : boolean_t);
272
273 /*
274 * Get current assignment for task.
275 */
276 routine task_get_assignment(
277 task : task_t;
278 out assigned_set : processor_set_name_t);
279
280 /*
281 * Get string describing current kernel version.
282 */
283 routine host_kernel_version(
284 host : host_t;
285 out kernel_version : kernel_version_t);
286
287 /*
288 * Set priority for thread.
289 */
290 routine thread_priority(
291 thread : thread_t;
292 priority : int;
293 set_max : boolean_t);
294
295 /*
296 * Set max priority for thread.
297 */
298 routine thread_max_priority(
299 thread : thread_t;
300 processor_set : processor_set_t;
301 max_priority : int);
302
303 /*
304 * Set task priority.
305 */
306 routine task_priority(
307 task : task_t;
308 priority : int;
309 change_threads : boolean_t);
310
311 /*
312 * Set max priority for processor_set.
313 */
314 routine processor_set_max_priority(
315 processor_set : processor_set_t;
316 max_priority : int;
317 change_threads : boolean_t);
318
319 /*
320 * Set policy for thread
321 */
322 routine thread_policy(
323 thread : thread_t;
324 policy : int;
325 data : int);
326
327 /*
328 * Enable policy for processor set
329 */
330 routine processor_set_policy_enable(
331 processor_set : processor_set_t;
332 policy : int);
333
334 /*
335 * Disable policy for processor set
336 */
337 routine processor_set_policy_disable(
338 processor_set : processor_set_t;
339 policy : int;
340 change_threads : boolean_t);
341 /*
342 * List all tasks in processor set.
343 */
344 routine processor_set_tasks(
345 processor_set : processor_set_t;
346 out task_list : task_array_t);
347
348 /*
349 * List all threads in processor set.
350 */
351 routine processor_set_threads(
352 processor_set : processor_set_t;
353 out thread_list : thread_array_t);
354
355 /*
356 * List all processor sets on host.
357 */
358 routine host_processor_sets(
359 host : host_t;
360 out processor_sets : processor_set_name_array_t);
361
362 /*
363 * Get control port for a processor set.
364 */
365 routine host_processor_set_priv(
366 host_priv : host_priv_t;
367 set_name : processor_set_name_t;
368 out set : processor_set_t);
369
370 routine thread_depress_abort(
371 thread : thread_t);
372
373 /*
374 * Set the time on this host.
375 * Only available to privileged users.
376 */
377 routine host_set_time(
378 host_priv : host_priv_t;
379 new_time : time_value_t);
380
381 /*
382 * Arrange for the time on this host to be gradually changed
383 * by an adjustment value, and return the old value.
384 * Only available to privileged users.
385 */
386 routine host_adjust_time(
387 host_priv : host_priv_t;
388 in new_adjustment : time_value_t;
389 out old_adjustment : time_value_t);
390
391 /*
392 * Get the time on this host.
393 * Available to all.
394 */
395 routine host_get_time(
396 host : host_t;
397 out current_time : time_value_t);
398
399 /*
400 * Reboot this host.
401 * Only available to privileged users.
402 */
403 routine host_reboot(
404 host_priv : host_priv_t;
405 options : int);
406
407 /*
408 * Specify that the range of the virtual address space
409 * of the target task must not cause page faults for
410 * the indicated accesses.
411 *
412 * [ To unwire the pages, specify VM_PROT_NONE. ]
413 */
414 routine vm_wire(
415 host_priv : host_priv_t;
416 task : vm_task_t;
417 address : vm_address_t;
418 size : vm_size_t;
419 access : vm_prot_t);
420
421 /*
422 * Specify that the target thread must always be able
423 * to run and to allocate memory.
424 */
425 routine thread_wire(
426 host_priv : host_priv_t;
427 thread : thread_t;
428 wired : boolean_t);
429
430 /*
431 * Return information about this host.
432 */
433
434 routine host_info(
435 host : host_t;
436 flavor : int;
437 out host_info_out : host_info_t, CountInOut);
438
439
440 /*
441 * Return information about this processor.
442 */
443 routine processor_info(
444 processor : processor_t;
445 flavor : int;
446 out host : host_t;
447 out processor_info_out: processor_info_t, CountInOut);
448
449 /*
450 * Get information about processor set.
451 */
452 routine processor_set_info(
453 set_name : processor_set_name_t;
454 flavor : int;
455 out host : host_t;
456 out info_out : processor_set_info_t, CountInOut);
457
458 /*
459 * Do something machine-dependent to processor.
460 */
461 routine processor_control(
462 processor : processor_t;
463 processor_cmd : processor_info_t);
464
465 /*
466 * Get boot configuration information from kernel.
467 */
468 routine host_get_boot_info(
469 host_priv : host_priv_t;
470 out boot_info : kernel_boot_info_t);
Cache object: 99785593e8092e0c1e168fba61a3a9e2
|