]>
Commit | Line | Data |
---|---|---|
55e303ae | 1 | /* |
5d5c5d0d A |
2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. |
3 | * | |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
55e303ae | 5 | * |
2d21ac55 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 License | |
10 | * may not be used to create, or enable the creation or redistribution of, | |
11 | * unlawful or unlicensed copies of an Apple operating system, or to | |
12 | * circumvent, violate, or enable the circumvention or violation of, any | |
13 | * terms of an Apple operating system software license agreement. | |
8f6c56a5 | 14 | * |
2d21ac55 A |
15 | * Please obtain a copy of the License at |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | |
17 | * | |
18 | * The Original Code and all software distributed under the License are | |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
8f6c56a5 A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
2d21ac55 A |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
8f6c56a5 | 25 | * |
2d21ac55 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
55e303ae A |
27 | */ |
28 | ||
91447636 | 29 | #include <string.h> |
55e303ae A |
30 | #include <sys/param.h> |
31 | #include <sys/kernel.h> | |
32 | #include <sys/sysctl.h> | |
33 | #include <i386/cpuid.h> | |
593a1d5f | 34 | #include <i386/tsc.h> |
060df5ea | 35 | #include <i386/machine_routines.h> |
6d2010ae A |
36 | #include <i386/ucode.h> |
37 | #include <kern/clock.h> | |
38 | #include <libkern/libkern.h> | |
55e303ae A |
39 | |
40 | static int | |
7e4a7d39 | 41 | _i386_cpu_info SYSCTL_HANDLER_ARGS |
55e303ae | 42 | { |
91447636 | 43 | __unused struct sysctl_oid *unused_oidp = oidp; |
7e4a7d39 | 44 | void *ptr = arg1; |
55e303ae A |
45 | int value; |
46 | ||
91447636 | 47 | if (arg2 == -1) { |
b0d623f7 | 48 | ptr = *(void **)ptr; |
91447636 A |
49 | arg2 = 0; |
50 | } | |
51 | ||
52 | if (arg2 == 0 && ((char *)ptr)[0] == '\0') { | |
53 | return ENOENT; | |
54 | } | |
55e303ae A |
55 | |
56 | if (arg2 == sizeof(uint8_t)) { | |
57 | value = (uint32_t) *(uint8_t *)ptr; | |
58 | ptr = &value; | |
59 | arg2 = sizeof(uint32_t); | |
60 | } | |
91447636 | 61 | return SYSCTL_OUT(req, ptr, arg2 ? (size_t) arg2 : strlen((char *)ptr)+1); |
55e303ae A |
62 | } |
63 | ||
b0d623f7 | 64 | static int |
7e4a7d39 | 65 | i386_cpu_info SYSCTL_HANDLER_ARGS |
b0d623f7 | 66 | { |
7e4a7d39 A |
67 | void *ptr = (uint8_t *)cpuid_info() + (uintptr_t)arg1; |
68 | return _i386_cpu_info(oidp, ptr, arg2, req); | |
69 | } | |
70 | ||
71 | static int | |
72 | i386_cpu_info_nonzero SYSCTL_HANDLER_ARGS | |
73 | { | |
74 | void *ptr = (uint8_t *)cpuid_info() + (uintptr_t)arg1; | |
b0d623f7 A |
75 | int value = *(uint32_t *)ptr; |
76 | ||
77 | if (value == 0) | |
78 | return ENOENT; | |
79 | ||
7e4a7d39 A |
80 | return _i386_cpu_info(oidp, ptr, arg2, req); |
81 | } | |
82 | static int | |
83 | cpu_mwait SYSCTL_HANDLER_ARGS | |
84 | { | |
85 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
86 | void *ptr = (uint8_t *)cpu_info->cpuid_mwait_leafp + (uintptr_t)arg1; | |
87 | if (cpu_info->cpuid_mwait_leafp == NULL) | |
88 | return ENOENT; | |
89 | return _i386_cpu_info(oidp, ptr, arg2, req); | |
90 | } | |
91 | ||
92 | static int | |
93 | cpu_thermal SYSCTL_HANDLER_ARGS | |
94 | { | |
95 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
96 | void *ptr = (uint8_t *)cpu_info->cpuid_thermal_leafp + (uintptr_t)arg1; | |
97 | if (cpu_info->cpuid_thermal_leafp == NULL) | |
98 | return ENOENT; | |
99 | return _i386_cpu_info(oidp, ptr, arg2, req); | |
100 | } | |
101 | ||
102 | static int | |
103 | cpu_arch_perf SYSCTL_HANDLER_ARGS | |
104 | { | |
105 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
106 | void *ptr = (uint8_t *)cpu_info->cpuid_arch_perf_leafp + (uintptr_t)arg1; | |
107 | if (cpu_info->cpuid_arch_perf_leafp == NULL) | |
108 | return ENOENT; | |
109 | return _i386_cpu_info(oidp, ptr, arg2, req); | |
b0d623f7 A |
110 | } |
111 | ||
060df5ea A |
112 | static int |
113 | cpu_xsave SYSCTL_HANDLER_ARGS | |
114 | { | |
115 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
116 | void *ptr = (uint8_t *)cpu_info->cpuid_xsave_leafp + (uintptr_t)arg1; | |
117 | if (cpu_info->cpuid_xsave_leafp == NULL) | |
118 | return ENOENT; | |
119 | return _i386_cpu_info(oidp, ptr, arg2, req); | |
120 | } | |
121 | ||
55e303ae | 122 | static int |
7e4a7d39 | 123 | cpu_features SYSCTL_HANDLER_ARGS |
55e303ae | 124 | { |
91447636 A |
125 | __unused struct sysctl_oid *unused_oidp = oidp; |
126 | __unused void *unused_arg1 = arg1; | |
127 | __unused int unused_arg2 = arg2; | |
060df5ea | 128 | char buf[512]; |
55e303ae | 129 | |
55e303ae | 130 | buf[0] = '\0'; |
91447636 | 131 | cpuid_get_feature_names(cpuid_features(), buf, sizeof(buf)); |
55e303ae A |
132 | |
133 | return SYSCTL_OUT(req, buf, strlen(buf) + 1); | |
134 | } | |
135 | ||
0c530ab8 | 136 | static int |
7e4a7d39 | 137 | cpu_extfeatures SYSCTL_HANDLER_ARGS |
0c530ab8 A |
138 | { |
139 | __unused struct sysctl_oid *unused_oidp = oidp; | |
140 | __unused void *unused_arg1 = arg1; | |
141 | __unused int unused_arg2 = arg2; | |
060df5ea | 142 | char buf[512]; |
0c530ab8 A |
143 | |
144 | buf[0] = '\0'; | |
145 | cpuid_get_extfeature_names(cpuid_extfeatures(), buf, sizeof(buf)); | |
146 | ||
147 | return SYSCTL_OUT(req, buf, strlen(buf) + 1); | |
148 | } | |
149 | ||
2d21ac55 | 150 | static int |
7e4a7d39 | 151 | cpu_logical_per_package SYSCTL_HANDLER_ARGS |
2d21ac55 A |
152 | { |
153 | __unused struct sysctl_oid *unused_oidp = oidp; | |
154 | __unused void *unused_arg1 = arg1; | |
155 | __unused int unused_arg2 = arg2; | |
156 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
157 | ||
158 | if (!(cpuid_features() & CPUID_FEATURE_HTT)) | |
159 | return ENOENT; | |
160 | ||
161 | return SYSCTL_OUT(req, &cpu_info->cpuid_logical_per_package, | |
162 | sizeof(cpu_info->cpuid_logical_per_package)); | |
163 | } | |
164 | ||
c910b4d9 | 165 | static int |
7e4a7d39 | 166 | cpu_flex_ratio_desired SYSCTL_HANDLER_ARGS |
c910b4d9 A |
167 | { |
168 | __unused struct sysctl_oid *unused_oidp = oidp; | |
169 | __unused void *unused_arg1 = arg1; | |
170 | __unused int unused_arg2 = arg2; | |
171 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
172 | ||
173 | if (cpu_info->cpuid_model != 26) | |
174 | return ENOENT; | |
175 | ||
176 | return SYSCTL_OUT(req, &flex_ratio, sizeof(flex_ratio)); | |
177 | } | |
178 | ||
179 | static int | |
7e4a7d39 | 180 | cpu_flex_ratio_min SYSCTL_HANDLER_ARGS |
c910b4d9 A |
181 | { |
182 | __unused struct sysctl_oid *unused_oidp = oidp; | |
183 | __unused void *unused_arg1 = arg1; | |
184 | __unused int unused_arg2 = arg2; | |
185 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
186 | ||
187 | if (cpu_info->cpuid_model != 26) | |
188 | return ENOENT; | |
189 | ||
190 | return SYSCTL_OUT(req, &flex_ratio_min, sizeof(flex_ratio_min)); | |
191 | } | |
192 | ||
193 | static int | |
7e4a7d39 | 194 | cpu_flex_ratio_max SYSCTL_HANDLER_ARGS |
c910b4d9 A |
195 | { |
196 | __unused struct sysctl_oid *unused_oidp = oidp; | |
197 | __unused void *unused_arg1 = arg1; | |
198 | __unused int unused_arg2 = arg2; | |
199 | i386_cpu_info_t *cpu_info = cpuid_info(); | |
200 | ||
201 | if (cpu_info->cpuid_model != 26) | |
202 | return ENOENT; | |
203 | ||
204 | return SYSCTL_OUT(req, &flex_ratio_max, sizeof(flex_ratio_max)); | |
205 | } | |
206 | ||
6d2010ae A |
207 | static int |
208 | cpu_ucode_update SYSCTL_HANDLER_ARGS | |
209 | { | |
210 | __unused struct sysctl_oid *unused_oidp = oidp; | |
211 | __unused void *unused_arg1 = arg1; | |
212 | __unused int unused_arg2 = arg2; | |
213 | uint64_t addr; | |
214 | int error; | |
215 | ||
216 | error = SYSCTL_IN(req, &addr, sizeof(addr)); | |
217 | if (error) | |
218 | return error; | |
219 | ||
220 | int ret = ucode_interface(addr); | |
221 | return ret; | |
222 | } | |
223 | ||
224 | extern uint64_t panic_restart_timeout; | |
225 | static int | |
226 | panic_set_restart_timeout(__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, struct sysctl_req *req) | |
227 | { | |
228 | int new_value = 0, old_value = 0, changed = 0, error; | |
229 | uint64_t nstime; | |
230 | ||
231 | if (panic_restart_timeout) { | |
232 | absolutetime_to_nanoseconds(panic_restart_timeout, &nstime); | |
233 | old_value = nstime / NSEC_PER_SEC; | |
234 | } | |
235 | ||
236 | error = sysctl_io_number(req, old_value, sizeof(int), &new_value, &changed); | |
237 | if (error == 0 && changed) { | |
238 | nanoseconds_to_absolutetime(((uint64_t)new_value) * NSEC_PER_SEC, &panic_restart_timeout); | |
239 | } | |
240 | return error; | |
241 | } | |
242 | ||
060df5ea A |
243 | /* |
244 | * Populates the {CPU, vector, latency} triple for the maximum observed primary | |
245 | * interrupt latency | |
246 | */ | |
247 | static int | |
248 | misc_interrupt_latency_max(__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, struct sysctl_req *req) | |
249 | { | |
250 | int changed = 0, error; | |
251 | char buf[128]; | |
252 | buf[0] = '\0'; | |
253 | ||
254 | interrupt_populate_latency_stats(buf, sizeof(buf)); | |
255 | ||
256 | error = sysctl_io_string(req, buf, sizeof(buf), 0, &changed); | |
257 | ||
258 | if (error == 0 && changed) { | |
259 | interrupt_reset_latency_stats(); | |
260 | } | |
261 | ||
262 | return error; | |
263 | } | |
264 | ||
2d21ac55 | 265 | SYSCTL_NODE(_machdep, OID_AUTO, cpu, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
55e303ae A |
266 | "CPU info"); |
267 | ||
6d2010ae | 268 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, max_basic, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 | 269 | (void *)offsetof(i386_cpu_info_t, cpuid_max_basic),sizeof(uint32_t), |
7e4a7d39 | 270 | i386_cpu_info, "IU", "Max Basic Information value"); |
b0d623f7 | 271 | |
6d2010ae | 272 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, max_ext, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 | 273 | (void *)offsetof(i386_cpu_info_t, cpuid_max_ext), sizeof(uint32_t), |
7e4a7d39 | 274 | i386_cpu_info, "IU", "Max Extended Function Information value"); |
b0d623f7 | 275 | |
6d2010ae | 276 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, vendor, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 277 | (void *)offsetof(i386_cpu_info_t, cpuid_vendor), 0, |
7e4a7d39 | 278 | i386_cpu_info, "A", "CPU vendor"); |
55e303ae | 279 | |
6d2010ae | 280 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, brand_string, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 281 | (void *)offsetof(i386_cpu_info_t, cpuid_brand_string), 0, |
7e4a7d39 | 282 | i386_cpu_info, "A", "CPU brand string"); |
55e303ae | 283 | |
6d2010ae | 284 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, family, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 285 | (void *)offsetof(i386_cpu_info_t, cpuid_family), sizeof(uint8_t), |
7e4a7d39 | 286 | i386_cpu_info, "I", "CPU family"); |
55e303ae | 287 | |
6d2010ae | 288 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, model, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 289 | (void *)offsetof(i386_cpu_info_t, cpuid_model), sizeof(uint8_t), |
7e4a7d39 | 290 | i386_cpu_info, "I", "CPU model"); |
55e303ae | 291 | |
6d2010ae | 292 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, extmodel, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 293 | (void *)offsetof(i386_cpu_info_t, cpuid_extmodel), sizeof(uint8_t), |
7e4a7d39 | 294 | i386_cpu_info, "I", "CPU extended model"); |
55e303ae | 295 | |
6d2010ae | 296 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, extfamily, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 297 | (void *)offsetof(i386_cpu_info_t, cpuid_extfamily), sizeof(uint8_t), |
7e4a7d39 | 298 | i386_cpu_info, "I", "CPU extended family"); |
55e303ae | 299 | |
6d2010ae | 300 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, stepping, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 301 | (void *)offsetof(i386_cpu_info_t, cpuid_stepping), sizeof(uint8_t), |
7e4a7d39 | 302 | i386_cpu_info, "I", "CPU stepping"); |
55e303ae | 303 | |
6d2010ae | 304 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, feature_bits, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_LOCKED, |
0c530ab8 | 305 | (void *)offsetof(i386_cpu_info_t, cpuid_features), sizeof(uint64_t), |
7e4a7d39 | 306 | i386_cpu_info, "IU", "CPU features"); |
55e303ae | 307 | |
6d2010ae | 308 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, extfeature_bits, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_LOCKED, |
0c530ab8 | 309 | (void *)offsetof(i386_cpu_info_t, cpuid_extfeatures), sizeof(uint64_t), |
7e4a7d39 | 310 | i386_cpu_info, "IU", "CPU extended features"); |
0c530ab8 | 311 | |
6d2010ae | 312 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, signature, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 313 | (void *)offsetof(i386_cpu_info_t, cpuid_signature), sizeof(uint32_t), |
7e4a7d39 | 314 | i386_cpu_info, "I", "CPU signature"); |
55e303ae | 315 | |
6d2010ae | 316 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, brand, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 317 | (void *)offsetof(i386_cpu_info_t, cpuid_brand), sizeof(uint8_t), |
7e4a7d39 | 318 | i386_cpu_info, "I", "CPU brand"); |
55e303ae | 319 | |
6d2010ae | 320 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, features, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_LOCKED, |
55e303ae | 321 | 0, 0, |
7e4a7d39 | 322 | cpu_features, "A", "CPU feature names"); |
55e303ae | 323 | |
6d2010ae | 324 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, extfeatures, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_LOCKED, |
0c530ab8 | 325 | 0, 0, |
7e4a7d39 | 326 | cpu_extfeatures, "A", "CPU extended feature names"); |
0c530ab8 A |
327 | |
328 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, logical_per_package, | |
6d2010ae | 329 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 | 330 | 0, 0, |
7e4a7d39 | 331 | cpu_logical_per_package, "I", "CPU logical cpus per package"); |
0c530ab8 A |
332 | |
333 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, cores_per_package, | |
6d2010ae | 334 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
0c530ab8 A |
335 | (void *)offsetof(i386_cpu_info_t, cpuid_cores_per_package), |
336 | sizeof(uint32_t), | |
7e4a7d39 | 337 | i386_cpu_info, "I", "CPU cores per package"); |
0c530ab8 | 338 | |
593a1d5f | 339 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, microcode_version, |
6d2010ae | 340 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
593a1d5f A |
341 | (void *)offsetof(i386_cpu_info_t, cpuid_microcode_version), |
342 | sizeof(uint32_t), | |
7e4a7d39 | 343 | i386_cpu_info, "I", "Microcode version number"); |
593a1d5f | 344 | |
6d2010ae A |
345 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, processor_flag, |
346 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
347 | (void *)offsetof(i386_cpu_info_t, cpuid_processor_flag), | |
348 | sizeof(uint32_t), | |
349 | i386_cpu_info, "I", "CPU processor flag"); | |
350 | ||
55e303ae | 351 | |
2d21ac55 A |
352 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, mwait, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
353 | "mwait"); | |
354 | ||
355 | SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, linesize_min, | |
6d2010ae | 356 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 357 | (void *)offsetof(cpuid_mwait_leaf_t, linesize_min), |
2d21ac55 | 358 | sizeof(uint32_t), |
7e4a7d39 | 359 | cpu_mwait, "I", "Monitor/mwait minimum line size"); |
2d21ac55 A |
360 | |
361 | SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, linesize_max, | |
6d2010ae | 362 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 363 | (void *)offsetof(cpuid_mwait_leaf_t, linesize_max), |
2d21ac55 | 364 | sizeof(uint32_t), |
7e4a7d39 | 365 | cpu_mwait, "I", "Monitor/mwait maximum line size"); |
2d21ac55 A |
366 | |
367 | SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, extensions, | |
6d2010ae | 368 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 369 | (void *)offsetof(cpuid_mwait_leaf_t, extensions), |
2d21ac55 | 370 | sizeof(uint32_t), |
7e4a7d39 | 371 | cpu_mwait, "I", "Monitor/mwait extensions"); |
2d21ac55 A |
372 | |
373 | SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, sub_Cstates, | |
6d2010ae | 374 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 375 | (void *)offsetof(cpuid_mwait_leaf_t, sub_Cstates), |
2d21ac55 | 376 | sizeof(uint32_t), |
7e4a7d39 | 377 | cpu_mwait, "I", "Monitor/mwait sub C-states"); |
2d21ac55 A |
378 | |
379 | ||
380 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, thermal, CTLFLAG_RW|CTLFLAG_LOCKED, 0, | |
381 | "thermal"); | |
382 | ||
383 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, sensor, | |
6d2010ae | 384 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 385 | (void *)offsetof(cpuid_thermal_leaf_t, sensor), |
2d21ac55 | 386 | sizeof(boolean_t), |
7e4a7d39 | 387 | cpu_thermal, "I", "Thermal sensor present"); |
2d21ac55 A |
388 | |
389 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, dynamic_acceleration, | |
6d2010ae | 390 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 391 | (void *)offsetof(cpuid_thermal_leaf_t, dynamic_acceleration), |
2d21ac55 | 392 | sizeof(boolean_t), |
7e4a7d39 | 393 | cpu_thermal, "I", "Dynamic Acceleration Technology (Turbo Mode)"); |
2d21ac55 | 394 | |
b7266188 | 395 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, invariant_APIC_timer, |
6d2010ae | 396 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b7266188 A |
397 | (void *)offsetof(cpuid_thermal_leaf_t, invariant_APIC_timer), |
398 | sizeof(boolean_t), | |
399 | cpu_thermal, "I", "Invariant APIC Timer"); | |
400 | ||
2d21ac55 | 401 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, thresholds, |
6d2010ae | 402 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 403 | (void *)offsetof(cpuid_thermal_leaf_t, thresholds), |
2d21ac55 | 404 | sizeof(uint32_t), |
7e4a7d39 | 405 | cpu_thermal, "I", "Number of interrupt thresholds"); |
2d21ac55 A |
406 | |
407 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, ACNT_MCNT, | |
6d2010ae | 408 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 409 | (void *)offsetof(cpuid_thermal_leaf_t, ACNT_MCNT), |
2d21ac55 | 410 | sizeof(boolean_t), |
7e4a7d39 | 411 | cpu_thermal, "I", "ACNT_MCNT capability"); |
2d21ac55 | 412 | |
060df5ea A |
413 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, core_power_limits, |
414 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
415 | (void *)offsetof(cpuid_thermal_leaf_t, core_power_limits), | |
416 | sizeof(boolean_t), | |
417 | cpu_thermal, "I", "Power Limit Notifications at a Core Level"); | |
418 | ||
419 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, fine_grain_clock_mod, | |
420 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
421 | (void *)offsetof(cpuid_thermal_leaf_t, fine_grain_clock_mod), | |
422 | sizeof(boolean_t), | |
423 | cpu_thermal, "I", "Fine Grain Clock Modulation"); | |
424 | ||
425 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, package_thermal_intr, | |
426 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
427 | (void *)offsetof(cpuid_thermal_leaf_t, package_thermal_intr), | |
428 | sizeof(boolean_t), | |
429 | cpu_thermal, "I", "Packge Thermal interrupt and Status"); | |
430 | ||
431 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, hardware_feedback, | |
432 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
433 | (void *)offsetof(cpuid_thermal_leaf_t, hardware_feedback), | |
434 | sizeof(boolean_t), | |
435 | cpu_thermal, "I", "Hardware Coordination Feedback"); | |
436 | ||
437 | SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, energy_policy, | |
438 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
439 | (void *)offsetof(cpuid_thermal_leaf_t, energy_policy), | |
440 | sizeof(boolean_t), | |
441 | cpu_thermal, "I", "Energy Efficient Policy Support"); | |
442 | ||
060df5ea A |
443 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, xsave, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
444 | "xsave"); | |
445 | ||
446 | SYSCTL_PROC(_machdep_cpu_xsave, OID_AUTO, extended_state, | |
447 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, | |
448 | (void *)offsetof(cpuid_xsave_leaf_t, extended_state), | |
449 | sizeof(cpuid_xsave_leaf_t), | |
450 | cpu_xsave, "IU", "XSAVE Extended State"); | |
451 | ||
2d21ac55 A |
452 | |
453 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, arch_perf, CTLFLAG_RW|CTLFLAG_LOCKED, 0, | |
454 | "arch_perf"); | |
455 | ||
456 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, version, | |
6d2010ae | 457 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 458 | (void *)offsetof(cpuid_arch_perf_leaf_t, version), |
2d21ac55 | 459 | sizeof(uint8_t), |
7e4a7d39 | 460 | cpu_arch_perf, "I", "Architectural Performance Version Number"); |
2d21ac55 A |
461 | |
462 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, number, | |
6d2010ae | 463 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 464 | (void *)offsetof(cpuid_arch_perf_leaf_t, number), |
2d21ac55 | 465 | sizeof(uint8_t), |
7e4a7d39 | 466 | cpu_arch_perf, "I", "Number of counters per logical cpu"); |
2d21ac55 A |
467 | |
468 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, width, | |
6d2010ae | 469 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 470 | (void *)offsetof(cpuid_arch_perf_leaf_t, width), |
2d21ac55 | 471 | sizeof(uint8_t), |
7e4a7d39 | 472 | cpu_arch_perf, "I", "Bit width of counters"); |
2d21ac55 A |
473 | |
474 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, events_number, | |
6d2010ae | 475 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 476 | (void *)offsetof(cpuid_arch_perf_leaf_t, events_number), |
2d21ac55 | 477 | sizeof(uint8_t), |
7e4a7d39 | 478 | cpu_arch_perf, "I", "Number of monitoring events"); |
2d21ac55 A |
479 | |
480 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, events, | |
6d2010ae | 481 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 482 | (void *)offsetof(cpuid_arch_perf_leaf_t, events), |
2d21ac55 | 483 | sizeof(uint32_t), |
7e4a7d39 | 484 | cpu_arch_perf, "I", "Bit vector of events"); |
2d21ac55 A |
485 | |
486 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, fixed_number, | |
6d2010ae | 487 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 488 | (void *)offsetof(cpuid_arch_perf_leaf_t, fixed_number), |
2d21ac55 | 489 | sizeof(uint8_t), |
7e4a7d39 | 490 | cpu_arch_perf, "I", "Number of fixed-function counters"); |
2d21ac55 A |
491 | |
492 | SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, fixed_width, | |
6d2010ae | 493 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
7e4a7d39 | 494 | (void *)offsetof(cpuid_arch_perf_leaf_t, fixed_width), |
2d21ac55 | 495 | sizeof(uint8_t), |
7e4a7d39 | 496 | cpu_arch_perf, "I", "Bit-width of fixed-function counters"); |
2d21ac55 A |
497 | |
498 | ||
499 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, cache, CTLFLAG_RW|CTLFLAG_LOCKED, 0, | |
500 | "cache"); | |
501 | ||
502 | SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, linesize, | |
6d2010ae | 503 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 A |
504 | (void *)offsetof(i386_cpu_info_t, cpuid_cache_linesize), |
505 | sizeof(uint32_t), | |
7e4a7d39 | 506 | i386_cpu_info, "I", "Cacheline size"); |
2d21ac55 A |
507 | |
508 | SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, L2_associativity, | |
6d2010ae | 509 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 A |
510 | (void *)offsetof(i386_cpu_info_t, cpuid_cache_L2_associativity), |
511 | sizeof(uint32_t), | |
7e4a7d39 | 512 | i386_cpu_info, "I", "L2 cache associativity"); |
2d21ac55 A |
513 | |
514 | SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, size, | |
6d2010ae | 515 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 A |
516 | (void *)offsetof(i386_cpu_info_t, cpuid_cache_size), |
517 | sizeof(uint32_t), | |
7e4a7d39 | 518 | i386_cpu_info, "I", "Cache size (in Kbytes)"); |
2d21ac55 A |
519 | |
520 | ||
593a1d5f A |
521 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, tlb, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
522 | "tlb"); | |
b0d623f7 A |
523 | SYSCTL_NODE(_machdep_cpu_tlb, OID_AUTO, inst, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
524 | "inst"); | |
525 | SYSCTL_NODE(_machdep_cpu_tlb, OID_AUTO, data, CTLFLAG_RW|CTLFLAG_LOCKED, 0, | |
526 | "data"); | |
527 | ||
528 | SYSCTL_PROC(_machdep_cpu_tlb_inst, OID_AUTO, small, | |
6d2010ae | 529 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
530 | (void *)offsetof(i386_cpu_info_t, |
531 | cpuid_tlb[TLB_INST][TLB_SMALL][0]), | |
532 | sizeof(uint32_t), | |
7e4a7d39 | 533 | i386_cpu_info_nonzero, "I", |
b0d623f7 | 534 | "Number of small page instruction TLBs"); |
593a1d5f | 535 | |
b0d623f7 | 536 | SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, small, |
6d2010ae | 537 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
538 | (void *)offsetof(i386_cpu_info_t, |
539 | cpuid_tlb[TLB_DATA][TLB_SMALL][0]), | |
593a1d5f | 540 | sizeof(uint32_t), |
7e4a7d39 | 541 | i386_cpu_info_nonzero, "I", |
b0d623f7 | 542 | "Number of small page data TLBs (1st level)"); |
593a1d5f | 543 | |
b0d623f7 | 544 | SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, small_level1, |
6d2010ae | 545 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
546 | (void *)offsetof(i386_cpu_info_t, |
547 | cpuid_tlb[TLB_DATA][TLB_SMALL][1]), | |
593a1d5f | 548 | sizeof(uint32_t), |
7e4a7d39 | 549 | i386_cpu_info_nonzero, "I", |
b0d623f7 | 550 | "Number of small page data TLBs (2nd level)"); |
593a1d5f | 551 | |
b0d623f7 | 552 | SYSCTL_PROC(_machdep_cpu_tlb_inst, OID_AUTO, large, |
6d2010ae | 553 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
554 | (void *)offsetof(i386_cpu_info_t, |
555 | cpuid_tlb[TLB_INST][TLB_LARGE][0]), | |
593a1d5f | 556 | sizeof(uint32_t), |
7e4a7d39 | 557 | i386_cpu_info_nonzero, "I", |
b0d623f7 | 558 | "Number of large page instruction TLBs"); |
593a1d5f | 559 | |
b0d623f7 | 560 | SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, large, |
6d2010ae | 561 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
562 | (void *)offsetof(i386_cpu_info_t, |
563 | cpuid_tlb[TLB_DATA][TLB_LARGE][0]), | |
593a1d5f | 564 | sizeof(uint32_t), |
7e4a7d39 | 565 | i386_cpu_info_nonzero, "I", |
b0d623f7 A |
566 | "Number of large page data TLBs (1st level)"); |
567 | ||
568 | SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, large_level1, | |
6d2010ae | 569 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
570 | (void *)offsetof(i386_cpu_info_t, |
571 | cpuid_tlb[TLB_DATA][TLB_LARGE][1]), | |
572 | sizeof(uint32_t), | |
7e4a7d39 | 573 | i386_cpu_info_nonzero, "I", |
b0d623f7 A |
574 | "Number of large page data TLBs (2nd level)"); |
575 | ||
576 | SYSCTL_PROC(_machdep_cpu_tlb, OID_AUTO, shared, | |
6d2010ae | 577 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
b0d623f7 A |
578 | (void *)offsetof(i386_cpu_info_t, cpuid_stlb), |
579 | sizeof(uint32_t), | |
7e4a7d39 | 580 | i386_cpu_info_nonzero, "I", |
b0d623f7 | 581 | "Number of shared TLBs"); |
593a1d5f A |
582 | |
583 | ||
2d21ac55 A |
584 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, address_bits, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
585 | "address_bits"); | |
586 | ||
587 | SYSCTL_PROC(_machdep_cpu_address_bits, OID_AUTO, physical, | |
6d2010ae | 588 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 A |
589 | (void *)offsetof(i386_cpu_info_t, cpuid_address_bits_physical), |
590 | sizeof(uint32_t), | |
7e4a7d39 | 591 | i386_cpu_info, "I", "Number of physical address bits"); |
2d21ac55 A |
592 | |
593 | SYSCTL_PROC(_machdep_cpu_address_bits, OID_AUTO, virtual, | |
6d2010ae | 594 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
2d21ac55 A |
595 | (void *)offsetof(i386_cpu_info_t, cpuid_address_bits_virtual), |
596 | sizeof(uint32_t), | |
7e4a7d39 | 597 | i386_cpu_info, "I", "Number of virtual address bits"); |
2d21ac55 | 598 | |
b0d623f7 | 599 | |
593a1d5f | 600 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, core_count, |
6d2010ae | 601 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
593a1d5f A |
602 | (void *)offsetof(i386_cpu_info_t, core_count), |
603 | sizeof(uint32_t), | |
7e4a7d39 | 604 | i386_cpu_info, "I", "Number of enabled cores per package"); |
593a1d5f A |
605 | |
606 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, thread_count, | |
6d2010ae | 607 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
593a1d5f A |
608 | (void *)offsetof(i386_cpu_info_t, thread_count), |
609 | sizeof(uint32_t), | |
7e4a7d39 | 610 | i386_cpu_info, "I", "Number of enabled threads per package"); |
593a1d5f | 611 | |
c910b4d9 A |
612 | SYSCTL_NODE(_machdep_cpu, OID_AUTO, flex_ratio, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
613 | "Flex ratio"); | |
614 | ||
615 | SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, desired, | |
6d2010ae | 616 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
c910b4d9 | 617 | 0, 0, |
7e4a7d39 | 618 | cpu_flex_ratio_desired, "I", "Flex ratio desired (0 disabled)"); |
c910b4d9 A |
619 | |
620 | SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, min, | |
6d2010ae | 621 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
c910b4d9 | 622 | 0, 0, |
7e4a7d39 | 623 | cpu_flex_ratio_min, "I", "Flex ratio min (efficiency)"); |
c910b4d9 A |
624 | |
625 | SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, max, | |
6d2010ae | 626 | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED, |
c910b4d9 | 627 | 0, 0, |
7e4a7d39 | 628 | cpu_flex_ratio_max, "I", "Flex ratio max (non-turbo)"); |
593a1d5f | 629 | |
6d2010ae A |
630 | SYSCTL_PROC(_machdep_cpu, OID_AUTO, ucupdate, |
631 | CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_LOCKED, 0, 0, | |
632 | cpu_ucode_update, "S", "Microcode update interface"); | |
633 | ||
2d21ac55 A |
634 | uint64_t pmap_pv_hashlist_walks; |
635 | uint64_t pmap_pv_hashlist_cnts; | |
636 | uint32_t pmap_pv_hashlist_max; | |
b0d623f7 | 637 | uint32_t pmap_kernel_text_ps = PAGE_SIZE; |
6d2010ae | 638 | extern uint32_t pv_hashed_kern_low_water_mark; |
2d21ac55 A |
639 | |
640 | /*extern struct sysctl_oid_list sysctl__machdep_pmap_children;*/ | |
641 | ||
642 | SYSCTL_NODE(_machdep, OID_AUTO, pmap, CTLFLAG_RW|CTLFLAG_LOCKED, 0, | |
643 | "PMAP info"); | |
55e303ae | 644 | |
6d2010ae A |
645 | SYSCTL_QUAD (_machdep_pmap, OID_AUTO, hashwalks, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_walks, ""); |
646 | SYSCTL_QUAD (_machdep_pmap, OID_AUTO, hashcnts, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_cnts, ""); | |
647 | SYSCTL_INT (_machdep_pmap, OID_AUTO, hashmax, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_max, 0, ""); | |
648 | SYSCTL_INT (_machdep_pmap, OID_AUTO, kernel_text_ps, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_kernel_text_ps, 0, ""); | |
649 | SYSCTL_INT (_machdep_pmap, OID_AUTO, kern_pv_reserve, CTLFLAG_RW | CTLFLAG_KERN | CTLFLAG_LOCKED, &pv_hashed_kern_low_water_mark, 0, ""); | |
b0d623f7 A |
650 | |
651 | SYSCTL_NODE(_machdep, OID_AUTO, memmap, CTLFLAG_RD|CTLFLAG_LOCKED, NULL, "physical memory map"); | |
652 | ||
653 | uint64_t firmware_Conventional_bytes = 0; | |
654 | uint64_t firmware_RuntimeServices_bytes = 0; | |
655 | uint64_t firmware_ACPIReclaim_bytes = 0; | |
656 | uint64_t firmware_ACPINVS_bytes = 0; | |
657 | uint64_t firmware_PalCode_bytes = 0; | |
658 | uint64_t firmware_Reserved_bytes = 0; | |
659 | uint64_t firmware_Unusable_bytes = 0; | |
660 | uint64_t firmware_other_bytes = 0; | |
661 | ||
662 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Conventional, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Conventional_bytes, ""); | |
663 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, RuntimeServices, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_RuntimeServices_bytes, ""); | |
664 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, ACPIReclaim, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_ACPIReclaim_bytes, ""); | |
665 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, ACPINVS, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_ACPINVS_bytes, ""); | |
666 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, PalCode, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_PalCode_bytes, ""); | |
667 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Reserved, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Reserved_bytes, ""); | |
668 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Unusable, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Unusable_bytes, ""); | |
669 | SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Other, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_other_bytes, ""); | |
060df5ea A |
670 | |
671 | SYSCTL_NODE(_machdep, OID_AUTO, tsc, CTLFLAG_RD|CTLFLAG_LOCKED, NULL, "Timestamp counter parameters"); | |
672 | ||
673 | SYSCTL_QUAD(_machdep_tsc, OID_AUTO, frequency, CTLFLAG_RD|CTLFLAG_LOCKED, &tscFreq, ""); | |
6d2010ae | 674 | |
060df5ea A |
675 | SYSCTL_NODE(_machdep, OID_AUTO, misc, CTLFLAG_RW|CTLFLAG_LOCKED, 0, |
676 | "Miscellaneous x86 kernel parameters"); | |
677 | ||
6d2010ae A |
678 | SYSCTL_PROC(_machdep_misc, OID_AUTO, panic_restart_timeout, |
679 | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_LOCKED, | |
680 | 0, 0, | |
681 | panic_set_restart_timeout, "I", "Panic restart timeout in seconds"); | |
682 | ||
060df5ea A |
683 | SYSCTL_PROC(_machdep_misc, OID_AUTO, interrupt_latency_max, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_LOCKED, |
684 | 0, 0, | |
685 | misc_interrupt_latency_max, "A", "Maximum Interrupt latency"); |