]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/mach_host.defs
xnu-792.13.8.tar.gz
[apple/xnu.git] / osfmk / mach / mach_host.defs
CommitLineData
1c79356b 1/*
91447636 2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
1c79356b 3 *
8ad349bb 4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
1c79356b 5 *
8ad349bb
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
14 * agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
18 * file.
19 *
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
27 *
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
1c79356b
A
29 */
30/*
31 * @OSF_COPYRIGHT@
32 */
33/*
34 * Mach Operating System
35 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
36 * All Rights Reserved.
37 *
38 * Permission to use, copy, modify and distribute this software and its
39 * documentation is hereby granted, provided that both the copyright
40 * notice and this permission notice appear in all copies of the
41 * software, derivative works or modified versions, and any portions
42 * thereof, and that both notices appear in supporting documentation.
43 *
44 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
45 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
46 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
47 *
48 * Carnegie Mellon requests users of this software to return to
49 *
50 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
51 * School of Computer Science
52 * Carnegie Mellon University
53 * Pittsburgh PA 15213-3890
54 *
55 * any improvements or extensions that they make and grant Carnegie Mellon
56 * the rights to redistribute these changes.
57 */
58/*
59 */
60
61/*
62 * File: mach/mach_host.defs
63 *
64 * Abstract:
65 * Mach host operations support. Includes processor allocation and
66 * control.
67 */
68
69#ifdef MACH_KERNEL
70#include <mach_prof.h>
71#include <advisory_pageout.h>
72#endif /* MACH_KERNEL */
73
74subsystem
75#if KERNEL_SERVER
76 KernelServer
77#endif /* KERNEL_SERVER */
78 mach_host 200;
79
80/*
81 * Basic types
82 */
83
84#include <mach/std_types.defs>
85#include <mach/mach_types.defs>
86#include <mach/clock_types.defs>
87#include <mach_debug/mach_debug_types.defs>
88
89/*
90 * References to host objects are returned by:
91 * mach_host_self() - trap
92 */
93
94/*
95 * Return information about this host.
96 */
97routine host_info(
98 host : host_t;
99 flavor : host_flavor_t;
100 out host_info_out : host_info_t, CountInOut);
101
102/*
103 * Get string describing current kernel version.
104 */
105routine host_kernel_version(
106 host : host_t;
107 out kernel_version : kernel_version_t);
108
109/*
110 * Get host page size
111 */
112routine host_page_size(
113 host : host_t;
91447636 114 out out_page_size : vm_size_t);
1c79356b
A
115
116/*
117 * Allow pagers to create named entries that point to un-mapped
118 * abstract memory object. The named entries are generally mappable
119 * and can be subsetted through the mach_make_memory_entry call
120 */
121routine mach_memory_object_memory_entry(
122 host :host_t;
123 internal :boolean_t;
124 size :vm_size_t;
125 permission :vm_prot_t;
126 pager :memory_object_t;
127 out entry_handle :mach_port_move_send_t);
128
129
130/*
131 * Get processor info for all the processors on this host.
132 * The returned data is an OOL array of processor info.
133 */
134routine host_processor_info(
91447636
A
135 host : host_t;
136 flavor : processor_flavor_t;
137 out out_processor_count : natural_t;
138 out out_processor_info : processor_info_array_t);
1c79356b
A
139
140/*
141 * Return host IO master access port
142 */
143routine host_get_io_master(
144 host : host_t;
145 out io_master : io_master_t);
146
147/*
148 * Get service port for a processor set.
149 * Available to all.
150 */
151routine host_get_clock_service(
152 host : host_t;
153 clock_id : clock_id_t;
154 out clock_serv : clock_serv_t);
155
156
157routine kmod_get_info(
158 host : host_t;
159 out modules : kmod_args_t);
160
161/*
162 * Returns information about the memory allocation zones.
163 * Supported in all kernels..
164 */
165routine host_zone_info(
166 host : host_t;
167 out names : zone_name_array_t,
168 Dealloc;
169 out info : zone_info_array_t,
170 Dealloc);
171
172/*
173 * Returns information about the global VP table.
174 * Only supported in MACH_VM_DEBUG kernels,
175 * otherwise returns KERN_FAILURE.
176 */
177routine host_virtual_physical_table_info(
178 host : host_t;
179 out info : hash_info_bucket_array_t,
180 Dealloc);
181
182/*
183 * Returns information about the global reverse hash table.
184 * This call is only valid on MACH_IPC_DEBUG kernels.
185 * Otherwise, KERN_FAILURE is returned.
186 */
187routine host_ipc_hash_info(
188 host : host_t;
189 out info : hash_info_bucket_array_t,
190 Dealloc);
191
192/*
193 * JMM - These routines should be on the host_priv port. We need
194 * to verify the move before putting them there.
195 */
196routine enable_bluebox(
197 host : host_t;
198 in taskID : unsigned;
199 in TWI_TableStart : unsigned;
200 in Desc_TableStart : unsigned);
201
202routine disable_bluebox(
203 host : host_t);
204
205/*
206 * JMM - Keep processor_set related items at the end for easy
207 * removal.
208 */
209/*
210 * Get default processor set for host.
211 */
212routine processor_set_default(
213 host : host_t;
214 out default_set : processor_set_name_t);
215
216/*
217 * Create new processor set. Returns real port for manipulations,
218 * and name port for obtaining information.
219 */
220routine processor_set_create(
221 host : host_t;
222 out new_set : processor_set_t;
223 out new_name : processor_set_name_t);
224
225/*
226 * Temporary interfaces for conversion to 64 bit data path
227 */
228
229routine mach_memory_object_memory_entry_64(
230 host :host_t;
231 internal :boolean_t;
232 size :memory_object_size_t;
233 permission :vm_prot_t;
234 pager :memory_object_t;
235 out entry_handle :mach_port_move_send_t);
236
237/*
238 * Return statistics from this host.
239 */
240routine host_statistics(
241 host_priv : host_t;
242 flavor : host_flavor_t;
243 out host_info_out : host_info_t, CountInOut);
55e303ae
A
244
245routine host_request_notification(
246 host : host_t;
247 notify_type : host_flavor_t;
248 notify_port : mach_port_make_send_once_t);
91447636
A
249
250routine host_lockgroup_info(
251 host : host_t;
252 out lockgroup_info : lockgroup_info_array_t,
253 Dealloc);
254