+ cpu_leaf7_features, "A", "CPU Leaf7 feature names");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, extfeatures, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_LOCKED,
+ 0, 0,
+ cpu_extfeatures, "A", "CPU extended feature names");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, logical_per_package,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ 0, 0,
+ cpu_logical_per_package, "I", "CPU logical cpus per package");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, cores_per_package,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_cores_per_package),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "CPU cores per package");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, microcode_version,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_microcode_version),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Microcode version number");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, processor_flag,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_processor_flag),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "CPU processor flag");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, mwait, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "mwait");
+
+SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, linesize_min,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_mwait_leaf_t, linesize_min),
+ sizeof(uint32_t),
+ cpu_mwait, "I", "Monitor/mwait minimum line size");
+
+SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, linesize_max,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_mwait_leaf_t, linesize_max),
+ sizeof(uint32_t),
+ cpu_mwait, "I", "Monitor/mwait maximum line size");
+
+SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, extensions,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_mwait_leaf_t, extensions),
+ sizeof(uint32_t),
+ cpu_mwait, "I", "Monitor/mwait extensions");
+
+SYSCTL_PROC(_machdep_cpu_mwait, OID_AUTO, sub_Cstates,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_mwait_leaf_t, sub_Cstates),
+ sizeof(uint32_t),
+ cpu_mwait, "I", "Monitor/mwait sub C-states");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, thermal, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "thermal");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, sensor,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, sensor),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Thermal sensor present");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, dynamic_acceleration,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, dynamic_acceleration),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Dynamic Acceleration Technology (Turbo Mode)");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, invariant_APIC_timer,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, invariant_APIC_timer),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Invariant APIC Timer");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, thresholds,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, thresholds),
+ sizeof(uint32_t),
+ cpu_thermal, "I", "Number of interrupt thresholds");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, ACNT_MCNT,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, ACNT_MCNT),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "ACNT_MCNT capability");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, core_power_limits,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, core_power_limits),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Power Limit Notifications at a Core Level");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, fine_grain_clock_mod,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, fine_grain_clock_mod),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Fine Grain Clock Modulation");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, package_thermal_intr,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, package_thermal_intr),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Package Thermal interrupt and Status");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, hardware_feedback,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, hardware_feedback),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Hardware Coordination Feedback");
+
+SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, energy_policy,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_thermal_leaf_t, energy_policy),
+ sizeof(boolean_t),
+ cpu_thermal, "I", "Energy Efficient Policy Support");
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, xsave, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "xsave");
+
+SYSCTL_PROC(_machdep_cpu_xsave, OID_AUTO, extended_state,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *) 0,
+ sizeof(cpuid_xsave_leaf_t),
+ cpu_xsave, "IU", "XSAVE Extended State Main Leaf");
+
+SYSCTL_PROC(_machdep_cpu_xsave, OID_AUTO, extended_state1,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *) sizeof(cpuid_xsave_leaf_t),
+ sizeof(cpuid_xsave_leaf_t),
+ cpu_xsave, "IU", "XSAVE Extended State Sub-leaf 1");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, arch_perf, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "arch_perf");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, version,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, version),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Architectural Performance Version Number");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, number,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, number),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Number of counters per logical cpu");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, width,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, width),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Bit width of counters");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, events_number,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, events_number),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Number of monitoring events");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, events,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, events),
+ sizeof(uint32_t),
+ cpu_arch_perf, "I", "Bit vector of events");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, fixed_number,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, fixed_number),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Number of fixed-function counters");
+
+SYSCTL_PROC(_machdep_cpu_arch_perf, OID_AUTO, fixed_width,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(cpuid_arch_perf_leaf_t, fixed_width),
+ sizeof(uint8_t),
+ cpu_arch_perf, "I", "Bit-width of fixed-function counters");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, cache, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "cache");
+
+SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, linesize,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_cache_linesize),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Cacheline size");
+
+SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, L2_associativity,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_cache_L2_associativity),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "L2 cache associativity");
+
+SYSCTL_PROC(_machdep_cpu_cache, OID_AUTO, size,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_cache_size),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Cache size (in Kbytes)");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, tlb, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "tlb");
+SYSCTL_NODE(_machdep_cpu_tlb, OID_AUTO, inst, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "inst");
+SYSCTL_NODE(_machdep_cpu_tlb, OID_AUTO, data, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "data");
+
+SYSCTL_PROC(_machdep_cpu_tlb_inst, OID_AUTO, small,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_INST][TLB_SMALL][0]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of small page instruction TLBs");
+
+SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, small,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_DATA][TLB_SMALL][0]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of small page data TLBs (1st level)");
+
+SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, small_level1,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_DATA][TLB_SMALL][1]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of small page data TLBs (2nd level)");
+
+SYSCTL_PROC(_machdep_cpu_tlb_inst, OID_AUTO, large,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_INST][TLB_LARGE][0]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of large page instruction TLBs");
+
+SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, large,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_DATA][TLB_LARGE][0]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of large page data TLBs (1st level)");
+
+SYSCTL_PROC(_machdep_cpu_tlb_data, OID_AUTO, large_level1,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t,
+ cpuid_tlb[TLB_DATA][TLB_LARGE][1]),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of large page data TLBs (2nd level)");
+
+SYSCTL_PROC(_machdep_cpu_tlb, OID_AUTO, shared,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_stlb),
+ sizeof(uint32_t),
+ i386_cpu_info_nonzero, "I",
+ "Number of shared TLBs");
+
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, address_bits, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "address_bits");
+
+SYSCTL_PROC(_machdep_cpu_address_bits, OID_AUTO, physical,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_address_bits_physical),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Number of physical address bits");
+
+SYSCTL_PROC(_machdep_cpu_address_bits, OID_AUTO, virtual,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_address_bits_virtual),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Number of virtual address bits");
+
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, core_count,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, core_count),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Number of enabled cores per package");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, thread_count,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, thread_count),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Number of enabled threads per package");
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, flex_ratio, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "Flex ratio");
+
+SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, desired,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ 0, 0,
+ cpu_flex_ratio_desired, "I", "Flex ratio desired (0 disabled)");
+
+SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, min,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ 0, 0,
+ cpu_flex_ratio_min, "I", "Flex ratio min (efficiency)");
+
+SYSCTL_PROC(_machdep_cpu_flex_ratio, OID_AUTO, max,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ 0, 0,
+ cpu_flex_ratio_max, "I", "Flex ratio max (non-turbo)");
+
+SYSCTL_PROC(_machdep_cpu, OID_AUTO, ucupdate,
+ CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_LOCKED, 0, 0,
+ cpu_ucode_update, "S", "Microcode update interface");
+
+SYSCTL_NODE(_machdep_cpu, OID_AUTO, tsc_ccc, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "TSC/CCC frequency information");
+
+SYSCTL_PROC(_machdep_cpu_tsc_ccc, OID_AUTO, numerator,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_tsc_leaf.numerator),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Numerator of TSC/CCC ratio");
+
+SYSCTL_PROC(_machdep_cpu_tsc_ccc, OID_AUTO, denominator,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
+ (void *)offsetof(i386_cpu_info_t, cpuid_tsc_leaf.denominator),
+ sizeof(uint32_t),
+ i386_cpu_info, "I", "Denominator of TSC/CCC ratio");
+
+static const uint32_t apic_timer_vector = (LAPIC_DEFAULT_INTERRUPT_BASE + LAPIC_TIMER_INTERRUPT);
+static const uint32_t apic_IPI_vector = (LAPIC_DEFAULT_INTERRUPT_BASE + LAPIC_INTERPROCESSOR_INTERRUPT);
+
+SYSCTL_NODE(_machdep, OID_AUTO, vectors, CTLFLAG_RD | CTLFLAG_LOCKED, 0,
+ "Interrupt vector assignments");
+
+SYSCTL_UINT (_machdep_vectors, OID_AUTO, timer, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, __DECONST(uint32_t *,&apic_timer_vector), 0, "");
+SYSCTL_UINT (_machdep_vectors, OID_AUTO, IPI, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, __DECONST(uint32_t *,&apic_IPI_vector), 0, "");
+
+uint64_t pmap_pv_hashlist_walks;
+uint64_t pmap_pv_hashlist_cnts;
+uint32_t pmap_pv_hashlist_max;
+uint32_t pmap_kernel_text_ps = PAGE_SIZE;
+extern uint32_t pv_hashed_kern_low_water_mark;
+
+/*extern struct sysctl_oid_list sysctl__machdep_pmap_children;*/
+
+SYSCTL_NODE(_machdep, OID_AUTO, pmap, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "PMAP info");
+
+SYSCTL_QUAD (_machdep_pmap, OID_AUTO, hashwalks, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_walks, "");
+SYSCTL_QUAD (_machdep_pmap, OID_AUTO, hashcnts, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_cnts, "");
+SYSCTL_INT (_machdep_pmap, OID_AUTO, hashmax, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_pv_hashlist_max, 0, "");
+SYSCTL_INT (_machdep_pmap, OID_AUTO, kernel_text_ps, CTLFLAG_RD | CTLFLAG_KERN | CTLFLAG_LOCKED, &pmap_kernel_text_ps, 0, "");
+SYSCTL_INT (_machdep_pmap, OID_AUTO, kern_pv_reserve, CTLFLAG_RW | CTLFLAG_KERN | CTLFLAG_LOCKED, &pv_hashed_kern_low_water_mark, 0, "");
+
+SYSCTL_NODE(_machdep, OID_AUTO, memmap, CTLFLAG_RD|CTLFLAG_LOCKED, NULL, "physical memory map");
+
+uint64_t firmware_Conventional_bytes = 0;
+uint64_t firmware_RuntimeServices_bytes = 0;
+uint64_t firmware_ACPIReclaim_bytes = 0;
+uint64_t firmware_ACPINVS_bytes = 0;
+uint64_t firmware_PalCode_bytes = 0;
+uint64_t firmware_Reserved_bytes = 0;
+uint64_t firmware_Unusable_bytes = 0;
+uint64_t firmware_other_bytes = 0;
+
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Conventional, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Conventional_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, RuntimeServices, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_RuntimeServices_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, ACPIReclaim, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_ACPIReclaim_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, ACPINVS, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_ACPINVS_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, PalCode, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_PalCode_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Reserved, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Reserved_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Unusable, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_Unusable_bytes, "");
+SYSCTL_QUAD(_machdep_memmap, OID_AUTO, Other, CTLFLAG_RD|CTLFLAG_LOCKED, &firmware_other_bytes, "");
+
+SYSCTL_NODE(_machdep, OID_AUTO, tsc, CTLFLAG_RD|CTLFLAG_LOCKED, NULL, "Timestamp counter parameters");
+
+SYSCTL_QUAD(_machdep_tsc, OID_AUTO, frequency,
+ CTLFLAG_RD|CTLFLAG_LOCKED, &tscFreq, "");
+
+extern uint32_t deep_idle_rebase;
+SYSCTL_UINT(_machdep_tsc, OID_AUTO, deep_idle_rebase,
+ CTLFLAG_RD|CTLFLAG_LOCKED, &deep_idle_rebase, 0, "");
+SYSCTL_QUAD(_machdep_tsc, OID_AUTO, at_boot,
+ CTLFLAG_RD|CTLFLAG_LOCKED, &tsc_at_boot, "");
+SYSCTL_QUAD(_machdep_tsc, OID_AUTO, rebase_abs_time,
+ CTLFLAG_RD|CTLFLAG_LOCKED, &tsc_rebase_abs_time, "");
+
+SYSCTL_NODE(_machdep_tsc, OID_AUTO, nanotime,
+ CTLFLAG_RD|CTLFLAG_LOCKED, NULL, "TSC to ns conversion");
+SYSCTL_QUAD(_machdep_tsc_nanotime, OID_AUTO, tsc_base,
+ CTLFLAG_RD | CTLFLAG_LOCKED,
+ __DECONST(uint64_t *, &pal_rtc_nanotime_info.tsc_base), "");
+SYSCTL_QUAD(_machdep_tsc_nanotime, OID_AUTO, ns_base,
+ CTLFLAG_RD | CTLFLAG_LOCKED,
+ __DECONST(uint64_t *, &pal_rtc_nanotime_info.ns_base), "");
+SYSCTL_UINT(_machdep_tsc_nanotime, OID_AUTO, scale,
+ CTLFLAG_RD | CTLFLAG_LOCKED,
+ __DECONST(uint32_t *, &pal_rtc_nanotime_info.scale), 0, "");
+SYSCTL_UINT(_machdep_tsc_nanotime, OID_AUTO, shift,
+ CTLFLAG_RD | CTLFLAG_LOCKED,
+ __DECONST(uint32_t *, &pal_rtc_nanotime_info.shift), 0, "");
+SYSCTL_UINT(_machdep_tsc_nanotime, OID_AUTO, generation,
+ CTLFLAG_RD | CTLFLAG_LOCKED,
+ __DECONST(uint32_t *, &pal_rtc_nanotime_info.generation), 0, "");
+
+SYSCTL_NODE(_machdep, OID_AUTO, misc, CTLFLAG_RW|CTLFLAG_LOCKED, 0,
+ "Miscellaneous x86 kernel parameters");
+
+#if (DEVELOPMENT || DEBUG)
+extern uint32_t mp_interrupt_watchdog_events;
+SYSCTL_UINT(_machdep_misc, OID_AUTO, interrupt_watchdog_events,
+ CTLFLAG_RW|CTLFLAG_LOCKED, &mp_interrupt_watchdog_events, 0, "");
+#endif
+
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, panic_restart_timeout,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ panic_set_restart_timeout, "I", "Panic restart timeout in seconds");
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, interrupt_latency_max,
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ misc_interrupt_latency_max, "A", "Maximum Interrupt latency");
+
+#if DEVELOPMENT || DEBUG
+SYSCTL_PROC(_machdep_misc, OID_AUTO, machine_check_panic,
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ misc_machine_check_panic, "A", "Machine-check exception test");
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, kernel_timeout_spin,
+ CTLTYPE_QUAD | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, sizeof(kernel_timeout_spin),
+ misc_kernel_timeout_spin, "Q", "Kernel timeout panic test");
+
+SYSCTL_QUAD(_machdep, OID_AUTO, reportphyreadabs,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &reportphyreaddelayabs, "");
+SYSCTL_INT(_machdep, OID_AUTO, reportphyreadosbt,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &reportphyreadosbt, 0, "");
+SYSCTL_INT(_machdep, OID_AUTO, phyreaddelaypanic,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &phyreadpanic, 0, "");
+
+extern int pmap_pagezero_mitigation;
+extern int pmap_asserts_enabled, pmap_asserts_traced;
+/* On DEV/DEBUG kernels, clear this to disable the SMAP emulation
+ * (address space disconnect) for pagezero-less processes.
+ */
+SYSCTL_INT(_machdep, OID_AUTO, pmap_pagezero_mitigation,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &pmap_pagezero_mitigation, 0, "");
+/* Toggle pmap assertions */
+SYSCTL_INT(_machdep, OID_AUTO, pmap_asserts,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &pmap_asserts_enabled, 0, "");
+/* Transform pmap assertions into kernel trace terminations */
+SYSCTL_INT(_machdep, OID_AUTO, pmap_asserts_traced,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &pmap_asserts_traced, 0, "");
+
+static int
+misc_svisor_read(__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, struct sysctl_req *req)
+{
+ uint64_t new_value = 0, old_value = 0;
+ int changed = 0, error;
+
+ error = sysctl_io_number(req, old_value, sizeof(uint64_t), &new_value, &changed);
+ if ((error == 0) && changed) {
+ volatile uint32_t *raddr = (uint32_t *) new_value;
+ printf("Supervisor: value at 0x%llx is 0x%x\n", new_value, *raddr);
+ }
+ return error;
+}
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, misc_svisor_read,
+ CTLTYPE_QUAD | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ misc_svisor_read, "I", "supervisor mode read");
+
+#endif /* DEVELOPMENT || DEBUG */
+
+extern void timer_queue_trace_cpu(int);
+static int
+misc_timer_queue_trace(__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, struct sysctl_req *req)
+{
+ int changed = 0, error;
+ char buf[128];
+ buf[0] = '\0';
+
+ error = sysctl_io_string(req, buf, sizeof(buf), 0, &changed);
+
+ if (error == 0 && changed) {
+ timer_queue_trace_cpu(0);
+ }
+ return error;
+}
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, timer_queue_trace,
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ misc_timer_queue_trace, "A", "Cut timer queue tracepoint");
+
+extern long NMI_count;
+extern void NMI_cpus(void);
+static int
+misc_nmis(__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, struct sysctl_req *req)
+{
+ int new = 0, old = 0, changed = 0, error;
+
+ old = NMI_count;
+
+ error = sysctl_io_number(req, old, sizeof(int), &new, &changed);
+ if (error == 0 && changed) {
+ NMI_cpus();
+ }
+
+ return error;
+}
+
+SYSCTL_PROC(_machdep_misc, OID_AUTO, nmis,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_LOCKED,
+ 0, 0,
+ misc_nmis, "I", "Report/increment NMI count");
+
+/* Parameters related to timer coalescing tuning, to be replaced
+ * with a dedicated systemcall in the future.
+ */
+/* Enable processing pending timers in the context of any other interrupt */
+SYSCTL_INT(_kern, OID_AUTO, interrupt_timer_coalescing_enabled,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &interrupt_timer_coalescing_enabled, 0, "");
+/* Upon entering idle, process pending timers with HW deadlines
+ * this far in the future.
+ */
+SYSCTL_INT(_kern, OID_AUTO, timer_coalesce_idle_entry_hard_deadline_max,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &idle_entry_timer_processing_hdeadline_threshold, 0, "");
+
+/* Track potentially expensive eager timer evaluations on QoS tier
+ * switches.
+ */
+extern uint32_t ml_timer_eager_evaluations;
+
+SYSCTL_INT(_machdep, OID_AUTO, eager_timer_evaluations,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &ml_timer_eager_evaluations, 0, "");
+
+extern uint64_t ml_timer_eager_evaluation_max;
+
+SYSCTL_QUAD(_machdep, OID_AUTO, eager_timer_evaluation_max,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &ml_timer_eager_evaluation_max, "");
+extern uint64_t x86_isr_fp_simd_use;
+SYSCTL_QUAD(_machdep, OID_AUTO, x86_fp_simd_isr_uses,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &x86_isr_fp_simd_use, "");
+#if DEVELOPMENT || DEBUG
+
+extern int plctrace_enabled;
+
+SYSCTL_INT(_machdep, OID_AUTO, pltrace,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &plctrace_enabled, 0, "");
+
+extern int fpsimd_fault_popc;
+SYSCTL_INT(_machdep, OID_AUTO, fpsimd_fault_popc,
+ CTLFLAG_KERN | CTLFLAG_RW | CTLFLAG_LOCKED,
+ &fpsimd_fault_popc, 0, "");