2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
30 #include <sys/param.h>
31 #include <sys/kernel.h>
32 #include <sys/sysctl.h>
33 #include <i386/cpuid.h>
37 _i386_cpu_info SYSCTL_HANDLER_ARGS
39 __unused
struct sysctl_oid
*unused_oidp
= oidp
;
48 if (arg2
== 0 && ((char *)ptr
)[0] == '\0') {
52 if (arg2
== sizeof(uint8_t)) {
53 value
= (uint32_t) *(uint8_t *)ptr
;
55 arg2
= sizeof(uint32_t);
57 return SYSCTL_OUT(req
, ptr
, arg2
? (size_t) arg2
: strlen((char *)ptr
)+1);
61 i386_cpu_info SYSCTL_HANDLER_ARGS
63 void *ptr
= (uint8_t *)cpuid_info() + (uintptr_t)arg1
;
64 return _i386_cpu_info(oidp
, ptr
, arg2
, req
);
68 i386_cpu_info_nonzero SYSCTL_HANDLER_ARGS
70 void *ptr
= (uint8_t *)cpuid_info() + (uintptr_t)arg1
;
71 int value
= *(uint32_t *)ptr
;
76 return _i386_cpu_info(oidp
, ptr
, arg2
, req
);
79 cpu_mwait SYSCTL_HANDLER_ARGS
81 i386_cpu_info_t
*cpu_info
= cpuid_info();
82 void *ptr
= (uint8_t *)cpu_info
->cpuid_mwait_leafp
+ (uintptr_t)arg1
;
83 if (cpu_info
->cpuid_mwait_leafp
== NULL
)
85 return _i386_cpu_info(oidp
, ptr
, arg2
, req
);
89 cpu_thermal SYSCTL_HANDLER_ARGS
91 i386_cpu_info_t
*cpu_info
= cpuid_info();
92 void *ptr
= (uint8_t *)cpu_info
->cpuid_thermal_leafp
+ (uintptr_t)arg1
;
93 if (cpu_info
->cpuid_thermal_leafp
== NULL
)
95 return _i386_cpu_info(oidp
, ptr
, arg2
, req
);
99 cpu_arch_perf SYSCTL_HANDLER_ARGS
101 i386_cpu_info_t
*cpu_info
= cpuid_info();
102 void *ptr
= (uint8_t *)cpu_info
->cpuid_arch_perf_leafp
+ (uintptr_t)arg1
;
103 if (cpu_info
->cpuid_arch_perf_leafp
== NULL
)
105 return _i386_cpu_info(oidp
, ptr
, arg2
, req
);
109 cpu_features SYSCTL_HANDLER_ARGS
111 __unused
struct sysctl_oid
*unused_oidp
= oidp
;
112 __unused
void *unused_arg1
= arg1
;
113 __unused
int unused_arg2
= arg2
;
117 cpuid_get_feature_names(cpuid_features(), buf
, sizeof(buf
));
119 return SYSCTL_OUT(req
, buf
, strlen(buf
) + 1);
123 cpu_extfeatures SYSCTL_HANDLER_ARGS
125 __unused
struct sysctl_oid
*unused_oidp
= oidp
;
126 __unused
void *unused_arg1
= arg1
;
127 __unused
int unused_arg2
= arg2
;
131 cpuid_get_extfeature_names(cpuid_extfeatures(), buf
, sizeof(buf
));
133 return SYSCTL_OUT(req
, buf
, strlen(buf
) + 1);
137 cpu_logical_per_package SYSCTL_HANDLER_ARGS
139 __unused
struct sysctl_oid
*unused_oidp
= oidp
;
140 __unused
void *unused_arg1
= arg1
;
141 __unused
int unused_arg2
= arg2
;
142 i386_cpu_info_t
*cpu_info
= cpuid_info();
144 if (!(cpuid_features() & CPUID_FEATURE_HTT
))
147 return SYSCTL_OUT(req
, &cpu_info
->cpuid_logical_per_package
,
148 sizeof(cpu_info
->cpuid_logical_per_package
));
152 cpu_flex_ratio_desired SYSCTL_HANDLER_ARGS
154 __unused
struct sysctl_oid
*unused_oidp
= oidp
;
155 __unused
void *unused_arg1
= arg1
;
156 __unused
int unused_arg2
= arg2
;
157 i386_cpu_info_t
*cpu_info
= cpuid_info();
159 if (cpu_info
->cpuid_model
!= 26)
162 return SYSCTL_OUT(req
, &flex_ratio
, sizeof(flex_ratio
));
166 cpu_flex_ratio_min SYSCTL_HANDLER_ARGS
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();
173 if (cpu_info
->cpuid_model
!= 26)
176 return SYSCTL_OUT(req
, &flex_ratio_min
, sizeof(flex_ratio_min
));
180 cpu_flex_ratio_max SYSCTL_HANDLER_ARGS
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();
187 if (cpu_info
->cpuid_model
!= 26)
190 return SYSCTL_OUT(req
, &flex_ratio_max
, sizeof(flex_ratio_max
));
193 SYSCTL_NODE(_machdep
, OID_AUTO
, cpu
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
196 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, max_basic
, CTLTYPE_INT
| CTLFLAG_RD
,
197 (void *)offsetof(i386_cpu_info_t
, cpuid_max_basic
),sizeof(uint32_t),
198 i386_cpu_info
, "IU", "Max Basic Information value");
200 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, max_ext
, CTLTYPE_INT
| CTLFLAG_RD
,
201 (void *)offsetof(i386_cpu_info_t
, cpuid_max_ext
), sizeof(uint32_t),
202 i386_cpu_info
, "IU", "Max Extended Function Information value");
204 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, vendor
, CTLTYPE_STRING
| CTLFLAG_RD
,
205 (void *)offsetof(i386_cpu_info_t
, cpuid_vendor
), 0,
206 i386_cpu_info
, "A", "CPU vendor");
208 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, brand_string
, CTLTYPE_STRING
| CTLFLAG_RD
,
209 (void *)offsetof(i386_cpu_info_t
, cpuid_brand_string
), 0,
210 i386_cpu_info
, "A", "CPU brand string");
212 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, family
, CTLTYPE_INT
| CTLFLAG_RD
,
213 (void *)offsetof(i386_cpu_info_t
, cpuid_family
), sizeof(uint8_t),
214 i386_cpu_info
, "I", "CPU family");
216 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, model
, CTLTYPE_INT
| CTLFLAG_RD
,
217 (void *)offsetof(i386_cpu_info_t
, cpuid_model
), sizeof(uint8_t),
218 i386_cpu_info
, "I", "CPU model");
220 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, extmodel
, CTLTYPE_INT
| CTLFLAG_RD
,
221 (void *)offsetof(i386_cpu_info_t
, cpuid_extmodel
), sizeof(uint8_t),
222 i386_cpu_info
, "I", "CPU extended model");
224 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, extfamily
, CTLTYPE_INT
| CTLFLAG_RD
,
225 (void *)offsetof(i386_cpu_info_t
, cpuid_extfamily
), sizeof(uint8_t),
226 i386_cpu_info
, "I", "CPU extended family");
228 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, stepping
, CTLTYPE_INT
| CTLFLAG_RD
,
229 (void *)offsetof(i386_cpu_info_t
, cpuid_stepping
), sizeof(uint8_t),
230 i386_cpu_info
, "I", "CPU stepping");
232 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, feature_bits
, CTLTYPE_QUAD
| CTLFLAG_RD
,
233 (void *)offsetof(i386_cpu_info_t
, cpuid_features
), sizeof(uint64_t),
234 i386_cpu_info
, "IU", "CPU features");
236 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, extfeature_bits
, CTLTYPE_QUAD
| CTLFLAG_RD
,
237 (void *)offsetof(i386_cpu_info_t
, cpuid_extfeatures
), sizeof(uint64_t),
238 i386_cpu_info
, "IU", "CPU extended features");
240 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, signature
, CTLTYPE_INT
| CTLFLAG_RD
,
241 (void *)offsetof(i386_cpu_info_t
, cpuid_signature
), sizeof(uint32_t),
242 i386_cpu_info
, "I", "CPU signature");
244 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, brand
, CTLTYPE_INT
| CTLFLAG_RD
,
245 (void *)offsetof(i386_cpu_info_t
, cpuid_brand
), sizeof(uint8_t),
246 i386_cpu_info
, "I", "CPU brand");
248 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, features
, CTLTYPE_STRING
| CTLFLAG_RD
,
250 cpu_features
, "A", "CPU feature names");
252 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, extfeatures
, CTLTYPE_STRING
| CTLFLAG_RD
,
254 cpu_extfeatures
, "A", "CPU extended feature names");
256 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, logical_per_package
,
257 CTLTYPE_INT
| CTLFLAG_RD
,
259 cpu_logical_per_package
, "I", "CPU logical cpus per package");
261 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, cores_per_package
,
262 CTLTYPE_INT
| CTLFLAG_RD
,
263 (void *)offsetof(i386_cpu_info_t
, cpuid_cores_per_package
),
265 i386_cpu_info
, "I", "CPU cores per package");
267 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, microcode_version
,
268 CTLTYPE_INT
| CTLFLAG_RD
,
269 (void *)offsetof(i386_cpu_info_t
, cpuid_microcode_version
),
271 i386_cpu_info
, "I", "Microcode version number");
274 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, mwait
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
277 SYSCTL_PROC(_machdep_cpu_mwait
, OID_AUTO
, linesize_min
,
278 CTLTYPE_INT
| CTLFLAG_RD
,
279 (void *)offsetof(cpuid_mwait_leaf_t
, linesize_min
),
281 cpu_mwait
, "I", "Monitor/mwait minimum line size");
283 SYSCTL_PROC(_machdep_cpu_mwait
, OID_AUTO
, linesize_max
,
284 CTLTYPE_INT
| CTLFLAG_RD
,
285 (void *)offsetof(cpuid_mwait_leaf_t
, linesize_max
),
287 cpu_mwait
, "I", "Monitor/mwait maximum line size");
289 SYSCTL_PROC(_machdep_cpu_mwait
, OID_AUTO
, extensions
,
290 CTLTYPE_INT
| CTLFLAG_RD
,
291 (void *)offsetof(cpuid_mwait_leaf_t
, extensions
),
293 cpu_mwait
, "I", "Monitor/mwait extensions");
295 SYSCTL_PROC(_machdep_cpu_mwait
, OID_AUTO
, sub_Cstates
,
296 CTLTYPE_INT
| CTLFLAG_RD
,
297 (void *)offsetof(cpuid_mwait_leaf_t
, sub_Cstates
),
299 cpu_mwait
, "I", "Monitor/mwait sub C-states");
302 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, thermal
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
305 SYSCTL_PROC(_machdep_cpu_thermal
, OID_AUTO
, sensor
,
306 CTLTYPE_INT
| CTLFLAG_RD
,
307 (void *)offsetof(cpuid_thermal_leaf_t
, sensor
),
309 cpu_thermal
, "I", "Thermal sensor present");
311 SYSCTL_PROC(_machdep_cpu_thermal
, OID_AUTO
, dynamic_acceleration
,
312 CTLTYPE_INT
| CTLFLAG_RD
,
313 (void *)offsetof(cpuid_thermal_leaf_t
, dynamic_acceleration
),
315 cpu_thermal
, "I", "Dynamic Acceleration Technology (Turbo Mode)");
317 SYSCTL_PROC(_machdep_cpu_thermal
, OID_AUTO
, invariant_APIC_timer
,
318 CTLTYPE_INT
| CTLFLAG_RD
,
319 (void *)offsetof(cpuid_thermal_leaf_t
, invariant_APIC_timer
),
321 cpu_thermal
, "I", "Invariant APIC Timer");
323 SYSCTL_PROC(_machdep_cpu_thermal
, OID_AUTO
, thresholds
,
324 CTLTYPE_INT
| CTLFLAG_RD
,
325 (void *)offsetof(cpuid_thermal_leaf_t
, thresholds
),
327 cpu_thermal
, "I", "Number of interrupt thresholds");
329 SYSCTL_PROC(_machdep_cpu_thermal
, OID_AUTO
, ACNT_MCNT
,
330 CTLTYPE_INT
| CTLFLAG_RD
,
331 (void *)offsetof(cpuid_thermal_leaf_t
, ACNT_MCNT
),
333 cpu_thermal
, "I", "ACNT_MCNT capability");
336 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, arch_perf
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
339 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, version
,
340 CTLTYPE_INT
| CTLFLAG_RD
,
341 (void *)offsetof(cpuid_arch_perf_leaf_t
, version
),
343 cpu_arch_perf
, "I", "Architectural Performance Version Number");
345 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, number
,
346 CTLTYPE_INT
| CTLFLAG_RD
,
347 (void *)offsetof(cpuid_arch_perf_leaf_t
, number
),
349 cpu_arch_perf
, "I", "Number of counters per logical cpu");
351 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, width
,
352 CTLTYPE_INT
| CTLFLAG_RD
,
353 (void *)offsetof(cpuid_arch_perf_leaf_t
, width
),
355 cpu_arch_perf
, "I", "Bit width of counters");
357 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, events_number
,
358 CTLTYPE_INT
| CTLFLAG_RD
,
359 (void *)offsetof(cpuid_arch_perf_leaf_t
, events_number
),
361 cpu_arch_perf
, "I", "Number of monitoring events");
363 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, events
,
364 CTLTYPE_INT
| CTLFLAG_RD
,
365 (void *)offsetof(cpuid_arch_perf_leaf_t
, events
),
367 cpu_arch_perf
, "I", "Bit vector of events");
369 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, fixed_number
,
370 CTLTYPE_INT
| CTLFLAG_RD
,
371 (void *)offsetof(cpuid_arch_perf_leaf_t
, fixed_number
),
373 cpu_arch_perf
, "I", "Number of fixed-function counters");
375 SYSCTL_PROC(_machdep_cpu_arch_perf
, OID_AUTO
, fixed_width
,
376 CTLTYPE_INT
| CTLFLAG_RD
,
377 (void *)offsetof(cpuid_arch_perf_leaf_t
, fixed_width
),
379 cpu_arch_perf
, "I", "Bit-width of fixed-function counters");
382 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, cache
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
385 SYSCTL_PROC(_machdep_cpu_cache
, OID_AUTO
, linesize
,
386 CTLTYPE_INT
| CTLFLAG_RD
,
387 (void *)offsetof(i386_cpu_info_t
, cpuid_cache_linesize
),
389 i386_cpu_info
, "I", "Cacheline size");
391 SYSCTL_PROC(_machdep_cpu_cache
, OID_AUTO
, L2_associativity
,
392 CTLTYPE_INT
| CTLFLAG_RD
,
393 (void *)offsetof(i386_cpu_info_t
, cpuid_cache_L2_associativity
),
395 i386_cpu_info
, "I", "L2 cache associativity");
397 SYSCTL_PROC(_machdep_cpu_cache
, OID_AUTO
, size
,
398 CTLTYPE_INT
| CTLFLAG_RD
,
399 (void *)offsetof(i386_cpu_info_t
, cpuid_cache_size
),
401 i386_cpu_info
, "I", "Cache size (in Kbytes)");
404 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, tlb
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
406 SYSCTL_NODE(_machdep_cpu_tlb
, OID_AUTO
, inst
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
408 SYSCTL_NODE(_machdep_cpu_tlb
, OID_AUTO
, data
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
411 SYSCTL_PROC(_machdep_cpu_tlb_inst
, OID_AUTO
, small
,
412 CTLTYPE_INT
| CTLFLAG_RD
,
413 (void *)offsetof(i386_cpu_info_t
,
414 cpuid_tlb
[TLB_INST
][TLB_SMALL
][0]),
416 i386_cpu_info_nonzero
, "I",
417 "Number of small page instruction TLBs");
419 SYSCTL_PROC(_machdep_cpu_tlb_data
, OID_AUTO
, small
,
420 CTLTYPE_INT
| CTLFLAG_RD
,
421 (void *)offsetof(i386_cpu_info_t
,
422 cpuid_tlb
[TLB_DATA
][TLB_SMALL
][0]),
424 i386_cpu_info_nonzero
, "I",
425 "Number of small page data TLBs (1st level)");
427 SYSCTL_PROC(_machdep_cpu_tlb_data
, OID_AUTO
, small_level1
,
428 CTLTYPE_INT
| CTLFLAG_RD
,
429 (void *)offsetof(i386_cpu_info_t
,
430 cpuid_tlb
[TLB_DATA
][TLB_SMALL
][1]),
432 i386_cpu_info_nonzero
, "I",
433 "Number of small page data TLBs (2nd level)");
435 SYSCTL_PROC(_machdep_cpu_tlb_inst
, OID_AUTO
, large
,
436 CTLTYPE_INT
| CTLFLAG_RD
,
437 (void *)offsetof(i386_cpu_info_t
,
438 cpuid_tlb
[TLB_INST
][TLB_LARGE
][0]),
440 i386_cpu_info_nonzero
, "I",
441 "Number of large page instruction TLBs");
443 SYSCTL_PROC(_machdep_cpu_tlb_data
, OID_AUTO
, large
,
444 CTLTYPE_INT
| CTLFLAG_RD
,
445 (void *)offsetof(i386_cpu_info_t
,
446 cpuid_tlb
[TLB_DATA
][TLB_LARGE
][0]),
448 i386_cpu_info_nonzero
, "I",
449 "Number of large page data TLBs (1st level)");
451 SYSCTL_PROC(_machdep_cpu_tlb_data
, OID_AUTO
, large_level1
,
452 CTLTYPE_INT
| CTLFLAG_RD
,
453 (void *)offsetof(i386_cpu_info_t
,
454 cpuid_tlb
[TLB_DATA
][TLB_LARGE
][1]),
456 i386_cpu_info_nonzero
, "I",
457 "Number of large page data TLBs (2nd level)");
459 SYSCTL_PROC(_machdep_cpu_tlb
, OID_AUTO
, shared
,
460 CTLTYPE_INT
| CTLFLAG_RD
,
461 (void *)offsetof(i386_cpu_info_t
, cpuid_stlb
),
463 i386_cpu_info_nonzero
, "I",
464 "Number of shared TLBs");
467 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, address_bits
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
470 SYSCTL_PROC(_machdep_cpu_address_bits
, OID_AUTO
, physical
,
471 CTLTYPE_INT
| CTLFLAG_RD
,
472 (void *)offsetof(i386_cpu_info_t
, cpuid_address_bits_physical
),
474 i386_cpu_info
, "I", "Number of physical address bits");
476 SYSCTL_PROC(_machdep_cpu_address_bits
, OID_AUTO
, virtual,
477 CTLTYPE_INT
| CTLFLAG_RD
,
478 (void *)offsetof(i386_cpu_info_t
, cpuid_address_bits_virtual
),
480 i386_cpu_info
, "I", "Number of virtual address bits");
483 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, core_count
,
484 CTLTYPE_INT
| CTLFLAG_RD
,
485 (void *)offsetof(i386_cpu_info_t
, core_count
),
487 i386_cpu_info
, "I", "Number of enabled cores per package");
489 SYSCTL_PROC(_machdep_cpu
, OID_AUTO
, thread_count
,
490 CTLTYPE_INT
| CTLFLAG_RD
,
491 (void *)offsetof(i386_cpu_info_t
, thread_count
),
493 i386_cpu_info
, "I", "Number of enabled threads per package");
495 SYSCTL_NODE(_machdep_cpu
, OID_AUTO
, flex_ratio
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
498 SYSCTL_PROC(_machdep_cpu_flex_ratio
, OID_AUTO
, desired
,
499 CTLTYPE_INT
| CTLFLAG_RD
,
501 cpu_flex_ratio_desired
, "I", "Flex ratio desired (0 disabled)");
503 SYSCTL_PROC(_machdep_cpu_flex_ratio
, OID_AUTO
, min
,
504 CTLTYPE_INT
| CTLFLAG_RD
,
506 cpu_flex_ratio_min
, "I", "Flex ratio min (efficiency)");
508 SYSCTL_PROC(_machdep_cpu_flex_ratio
, OID_AUTO
, max
,
509 CTLTYPE_INT
| CTLFLAG_RD
,
511 cpu_flex_ratio_max
, "I", "Flex ratio max (non-turbo)");
513 uint64_t pmap_pv_hashlist_walks
;
514 uint64_t pmap_pv_hashlist_cnts
;
515 uint32_t pmap_pv_hashlist_max
;
516 uint32_t pmap_kernel_text_ps
= PAGE_SIZE
;
518 /*extern struct sysctl_oid_list sysctl__machdep_pmap_children;*/
520 SYSCTL_NODE(_machdep
, OID_AUTO
, pmap
, CTLFLAG_RW
|CTLFLAG_LOCKED
, 0,
523 SYSCTL_QUAD (_machdep_pmap
, OID_AUTO
, hashwalks
, CTLFLAG_RD
| CTLFLAG_KERN
, &pmap_pv_hashlist_walks
, "");
524 SYSCTL_QUAD (_machdep_pmap
, OID_AUTO
, hashcnts
, CTLFLAG_RD
| CTLFLAG_KERN
, &pmap_pv_hashlist_cnts
, "");
525 SYSCTL_INT (_machdep_pmap
, OID_AUTO
, hashmax
, CTLFLAG_RD
| CTLFLAG_KERN
, &pmap_pv_hashlist_max
, 0, "");
526 SYSCTL_INT (_machdep_pmap
, OID_AUTO
, kernel_text_ps
, CTLFLAG_RD
| CTLFLAG_KERN
, &pmap_kernel_text_ps
, 0, "");
528 SYSCTL_NODE(_machdep
, OID_AUTO
, memmap
, CTLFLAG_RD
|CTLFLAG_LOCKED
, NULL
, "physical memory map");
530 uint64_t firmware_Conventional_bytes
= 0;
531 uint64_t firmware_RuntimeServices_bytes
= 0;
532 uint64_t firmware_ACPIReclaim_bytes
= 0;
533 uint64_t firmware_ACPINVS_bytes
= 0;
534 uint64_t firmware_PalCode_bytes
= 0;
535 uint64_t firmware_Reserved_bytes
= 0;
536 uint64_t firmware_Unusable_bytes
= 0;
537 uint64_t firmware_other_bytes
= 0;
539 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, Conventional
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_Conventional_bytes
, "");
540 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, RuntimeServices
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_RuntimeServices_bytes
, "");
541 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, ACPIReclaim
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_ACPIReclaim_bytes
, "");
542 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, ACPINVS
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_ACPINVS_bytes
, "");
543 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, PalCode
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_PalCode_bytes
, "");
544 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, Reserved
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_Reserved_bytes
, "");
545 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, Unusable
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_Unusable_bytes
, "");
546 SYSCTL_QUAD(_machdep_memmap
, OID_AUTO
, Other
, CTLFLAG_RD
|CTLFLAG_LOCKED
, &firmware_other_bytes
, "");