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