The NetBSD Project

CVS log for src/sys/arch/x86/include/cpuvar.h

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / x86 / include

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 20 22:23:24 2012 UTC (13 months, 4 weeks ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, tls-maxphys-nbase, tls-maxphys-base, tls-maxphys, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base10, agc-symver-base, agc-symver, HEAD
Changes since 1.45: +2 -4 lines
Diff to previous 1.45 (colored)

- Convert x86 MD code, mainly pmap(9) e.g. TLB shootdown code, to use
  kcpuset(9) and thus replace hardcoded CPU bitmasks.  This removes the
  limitation of maximum CPUs.

- Support up to 256 CPUs on amd64 architecture by default.

Bug fixes, improvements, completion of Xen part and testing on 64-core
AMD Opteron(tm) Processor 6282 SE (also, as Xen HVM domU with 128 CPUs)
by Manuel Bouyer.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Aug 13 12:37:30 2011 UTC (22 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, jym-xensuspend-nbase, jym-xensuspend-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.44: +5 -1 lines
Diff to previous 1.44 (colored)

MP probing and startup code

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:50 2011 UTC (2 years ago) by rmind
Branch: MAIN
Changes since 1.43: +1 -3 lines
Diff to previous 1.43 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 4 04:48:40 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, bouyer-quota2-nbase
Branch point for: cherry-xenmp
Changes since 1.42: +1 -12 lines
Diff to previous 1.42 (colored)

Move INTEL_ONDEMAND_CLOCKMOD -- or odcm(4) -- to the cpufeaturebus.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Feb 24 15:42:17 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.41: +1 -2 lines
Diff to previous 1.41 (colored)

Fix autoconf(9) of cpufeaturebus.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Feb 23 11:43:22 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.40: +1 -10 lines
Diff to previous 1.40 (colored)

Move ENHANCED_SPEEDSTEP, or henceforth est(4), to the cpufeaturebus.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Feb 20 13:42:45 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.39: +1 -6 lines
Diff to previous 1.39 (colored)

Modularize coretemp(4). Ok jmcneill@.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Feb 19 13:52:28 2011 UTC (2 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.38: +6 -1 lines
Diff to previous 1.38 (colored)

modularize VIA PadLock support
 - retire options VIA_PADLOCK, replace with 'padlock0 at cpu0'
 - driver supports attach & detach
 - support building as a module

Revision 1.38 / (download) - annotate - [select for diffs], Fri Aug 20 06:34:32 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.37: +1 -6 lines
Diff to previous 1.37 (colored)

Revert all previous changes that were made naively believing that the
existing CPU power management implementations could peacefully coexist with
the acpicpu(4) driver. The following options can not be used with acpicpu(4):
ENHANCED_SPEEDSTEP, INTEL_ONDEMAND_CLOCKMOD, POWERNOW_K7, and POWERNOW_K8.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Aug 9 15:46:17 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.36: +3 -4 lines
Diff to previous 1.36 (colored)

Revert the previous changes to EST. The used hack had an obvious flaw:
the acpicpu(4) driver should attach even if the existing frequency management
code fails to attach, mainly because ACPI is the only proper way to deal
with EST on new Intel system.

Use a more drastic hack to deal with this: when acpicpu(4) attachs, it tears
down any existing sysctl(8) controls and installs identical ones in place.
Upon detachment, the initialization function of the existing EST is called.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Aug 9 04:18:48 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Move the sysctl function pointers used by acpicpu(4) to x86/cpu.c.
Rename these so that the same pointers may be used in other parts.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Aug 8 16:58:42 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.34: +7 -1 lines
Diff to previous 1.34 (colored)

Merge P-state support for acpicpu(4).

Remarks:

  1.    All processors (x86 or not) for which the vendor has implemented
        ACPI I/O access routines are supported. Native instructions are
        currently supported only for Intel's "Enhanced Speedstep". Code for
        "PowerNow!" (AMD) will be merged later. Native support for VIA's
        "PowerSaver" will be investigated.

  2.    Backwards compatibility with existing userland code is maintained.
        Comparable to the case with cpu_idle(9), the ACPI CPU driver
        installs alternative functions for the existing sysctl(8) controls.
        The "native" behavior (if any) is restored upon detachment.

  3.    The dynamic nature of ACPI-provided P-states needs more investigation.
        The maximum frequency induced (but not forced) by the firmware may
        change dynamically. Currently, the sysctl(8) controls error out with
        a value larger than the dynamic maximum. The code itself does not
        however yet react to the notifications from the firmware by changing
        the frequencies in-place. Presumably the system administrator should
        be able to choose whether to use dynamic or static frequencies.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Aug 4 10:02:11 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Store the MADT-derived CPU ID to <x86/cpu.h>. This is required to properly
match the ACPI processor object ID with the ID available in the APIC table.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jul 6 20:50:35 2010 UTC (2 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Apr 18 23:47:51 2010 UTC (3 years, 2 months ago) by jym
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

- replace cpu_feature and ci_feature_flags variables by cpu_feature and
ci_feat_val arrays. This makes it cleaner and brings kernel code closer
to the design of cpuctl(8). A warning will be raised for each CPU that
does not expose the same features as the Boot Processor (BP).

- the blacklist of CPU features is now a macro defined in the
specialreg.h header, instead of hardcoding it inside MD initialization
code; fix comments.

- replace checks against CPUID_TSC with the cpu_hascounter() function.

- clean up the code in init_x86_64(), as cpu_feature variables are set
inside cpu_probe().

- use cpu_init_msrs() for i386. It will be eventually used later for NX
feature under i386 PAE kernels.

- remove code that checks for CPUID_NOX in amd64 mptramp.S, this is already
performed by cpu_hatch() through cpu_init_msrs().

- remove cpu_signature and feature_flags members from struct mpbios_proc
(they were never used).

This patch was tested with i386 MONOLITHIC, XEN3PAE_DOM0 and XEN3_DOM0 under
a native i386 host, and amd64 GENERIC, XEN3_DOM0 via QEMU virtual machines.

XXX Should kernel rev be bumped?

XXX A similar patch should be pulled-up for NetBSD-5, hopefully tomorrow.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 2 18:50:03 2009 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.30: +6 -1 lines
Diff to previous 1.30 (colored)

Add support for VIA C7 temperature sensors (options VIA_C7TEMP)

Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 2 15:05:42 2009 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

Use the TSC and current multiplier to calculate bus clock on VIA C7 Esther.
Probably needed for all C7 and Nano processors, but to be safe only use
this alternate method on Esther for now.

Now est on my C7-M 1.6GHz properly reports frequencies from 1600 to 400,
instead of 2133 to 533.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Aug 5 20:15:36 2009 UTC (3 years, 10 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Add Intel SpeedStep and AMD PowerNow! support in Xen dom0. MSR operations
are now compiled in by default.

Note that MSR support in Xen depends on its version. rdmsr() should always
succeed, but wrmsr() to certain registers can end in a NOOP. In that case,
the error will be logged (see xm dmesg).

Setting CPU frequency (SpeedStep) requires Xen 3.3 with the option
cpufreq="dom0-kernel" passed down to hypervisor during boot.

Compiled and tested for SpeedStep under i386 for XEN3_DOM0 and XEN3PAE_DOM0
by jym@. amd64 was tested by Joel Carnat.

See also http://mail-index.netbsd.org/port-xen/2009/08/02/msg005213.html .

Commit requested by bouyer@.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Mar 11 03:34:43 2009 UTC (4 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base
Changes since 1.27: +3 -1 lines
Diff to previous 1.27 (colored)

wrap opt_* includes with _KERNEL_OPT.
(i forgot to commit this with the tprof modules yesterday.)

Revision 1.27 / (download) - annotate - [select for diffs], Tue May 13 22:39:17 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5-0, netbsd-5, matt-nb5-mips64, jym-xensuspend
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

Be more conservative during AP startup. Don't let the AP access the lapic
or do any setup until the boot processor has finished the init sequence,
and add a few more delays.

Revision 1.26 / (download) - annotate - [select for diffs], Sun May 11 15:59:50 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Stop using APIC IDs to identify CPUs for software purposes. Allows for
APIC IDs beyond 31, which has been possible for some time now.

Revision 1.25 / (download) - annotate - [select for diffs], Fri May 9 18:11:29 2008 UTC (5 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.24: +8 -1 lines
Diff to previous 1.24 (colored)

Make cpu_idle a macro calling a function pointer on x86.
Select the Xen idle routine for Xen, mwait if supported by the CPU and
it is not AMD and halt otherwise. As reported by Christoph Egger,
AMD Barcelona keeps the CPU in C0 state with MWAIT, contrary to HLT,
which uses C1 and therefore much less power.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:40 2008 UTC (5 years, 1 month ago) by martin
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.23: +1 -8 lines
Diff to previous 1.23 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.23 / (download) - annotate - [select for diffs], Wed Apr 16 16:06:51 2008 UTC (5 years, 2 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

- use aprint_*_dev and device_xname
- use POSIX integer types

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jan 4 15:55:28 2008 UTC (5 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

i386:
	- make tss per-cpu.  this considerably speeds up context switch for,
	  at least, pentium4, where ltr instruction seems very slow.
i386, xen:
	- kill cpu_maxproc.
kvm86:
	- adapt to per-cpu tss.
	- cleanup and simplify.
	- move kvm86_mp_lock to more meaningful place.
	- disable preemption during a call.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 1 20:32:12 2008 UTC (5 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

try to detect processor resource sharing topologies.  ie. package/core/smt IDs.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Dec 18 07:17:17 2007 UTC (5 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Add new IPI for saving CPU state explicitly, share high-level part of
ACPI wakeup code and teach it how to start the APs again. As a side
effect the CPU_START interface allows choosing between different
bootstrap codes more easily now.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Nov 15 19:46:44 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Disable TLB shootdown IPIs while in the debugger. Crashdumps may try to
use them, and all but one CPU is paused. Reported and tested by martin@.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Nov 13 18:42:00 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

In cpu_hatch(), recompute ci_tsc_freq instead of using the boot CPU's value.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 12 18:44:43 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.16: +4 -2 lines
Diff to previous 1.16 (colored)

- cpu_vendor was both an int and char[] on amd64 - fix it.
- Run the errata check/patch on all CPUs, not just the boot processor.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Oct 29 00:42:29 2007 UTC (5 years, 7 months ago) by xtraeme
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.15: +6 -1 lines
Diff to previous 1.15 (colored)

Add coretemp(4). A new driver for Intel Core's on-die thermal sensor,
available on Intel Core or newer CPUs.

Ported from FreeBSD. Tested by rmind on i386 and joerg on amd64.

Enabled with "options INTEL_CORETEMP".

Revision 1.15 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:14 2007 UTC (5 years, 8 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 1 20:12:35 2007 UTC (5 years, 11 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, ppcoea-renovation-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Add support for the VIA C7-M and Eden processors in the
Enhanced Speedstep driver.

Tested by Heron Gallegos <gallegos at csxxi dot net dot mx>

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 3 19:32:26 2007 UTC (6 years ago) by xtraeme
Branch: MAIN
Changes since 1.12: +8 -1 lines
Diff to previous 1.12 (colored)

Make the Enhanced Speedstep driver available for i386 and amd64.
To use it on EM64T CPUs supporting the EST CPUID feature. Note that
some CPUs still don't work with this driver, like Xeon or Pentium 4.

Move the p[34]_get_bus_clock functions into its own file,
intel_busclock.c and remove this code from i386/identcpu.c.

Tested on i386 by myself and amd64 by Tonerre.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Mar 21 00:16:52 2007 UTC (6 years, 3 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Branch point for: ppcoea-renovation
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

Don't build msr_ipifuncs on Xen, fixes the build with XEN2_DOM0.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 20 21:22:03 2007 UTC (6 years, 3 months ago) by xtraeme
Branch: MAIN
Changes since 1.10: +6 -1 lines
Diff to previous 1.10 (colored)

Driver for Intel Thermal Monitor (feature TM) On-Demand Clock
Modulation.

This works by changing the duty cycle of the clock modulation,
and saves power and helps to not increase the temperature by
software.

Adapted from OpenBSD/FreeBSD's p4tcc.

To enable it one must use "options INTEL_ONDEMAND_CLOCKMOD".

Tested by me in UP and SMP, ok'ed by Matthew R. Green.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 15 00:28:57 2007 UTC (6 years, 3 months ago) by xtraeme
Branch: MAIN
Changes since 1.9: +1 -3 lines
Diff to previous 1.9 (colored)

Ok... there were people really angry with this, backing it out.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 15 00:03:24 2007 UTC (6 years, 3 months ago) by xtraeme
Branch: MAIN
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

Add a driver for the Pentium 4 and later models with feature TM
(Thermal Monitor).

This driver will throttle the CPU clock modulation, saving some
power, also known as ODMC (On Demand Modulation Clock).

The processor can change from 12.5% to 100% (there are two erratas,
so two levels might be skipped in the worst case).

If supported, you'll see the following sysctl sub-tree:

machdep.p4tcc.throttling.target: CPU Clock throttling state (0 = lowest, 7 highest)
machdep.p4tcc.throttling.current: current CPU throttling state
machdep.p4tcc.throttling.available: list of CPU Clock throttling states

machdep.p4tcc.throttling.target = 2
machdep.p4tcc.throttling.current = 2
machdep.p4tcc.throttling.available = 7 6 5 4 3 2

Adapted from OpenBSD/FreeBSD.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Mar 6 12:32:46 2007 UTC (6 years, 3 months ago) by yamt
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.7: +6 -1 lines
Diff to previous 1.7 (colored)

multiple inclusion protection.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 5 16:51:02 2007 UTC (6 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.6: +3 -6 lines
Diff to previous 1.6 (colored)

clean up how cpus and ioapics are attached at the mainbus:
Seperate "cpubus" and "ioapicbus" -- while they share a common "address
space" (the apic id), the kernel doesn't use this fact. There are different
data passed to cpus and apics, which caused some ugly polymorphism. This
also saves the special "submatch" functions needed to distingush cpus
and ioapics for autoconf. (And it makes that "apid" locators wired
in the kernel configuration are honored now; this allows one to dumb down
an mp box to singleprocessor by userconfig.)
Print "apid" locators in the buses "print" function "as everyone does",
so the per-port cpu drivers don't need to do it.
Being here, constify "struct cpu_functions" and g/c the unused MP_PICMODE
flag.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jan 1 20:56:59 2007 UTC (6 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

Report on and where possible, try to work around some of the known errata
for Athlon 64 and Opteron processors. Tested briefly by cube@ and elad@.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 8 16:34:34 2006 UTC (6 years, 10 months ago) by cube
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, netbsd-4-base, netbsd-4-0-RC1
Branch point for: wrstuden-fixsa, newlock2, netbsd-4
Changes since 1.4: +1 -7 lines
Diff to previous 1.4 (colored)

files.x86 isn't included by Xen kernels, so opt_powernow_k8.h never gets
created by config(1), and thus it's not safe to use it in cpuvar.h.

Simply declare the prototype for k8_powernow_init in powernow.h.  No need
to #ifdef protect a prototype, after all, only its users.

Un-breaks build of Xen kernels.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Aug 7 20:58:23 2006 UTC (6 years, 10 months ago) by xtraeme
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.3: +7 -1 lines
Diff to previous 1.3 (colored)

* Do not change struct powernow_pst_s (I added another member in my
  previous patch) and this MUST be of that size, otherwise the tables
  won't be found.

* powernow_k8.c moved into x86/x86, it should work both i386 and amd64.

* Added more DPRINTFs needed to found the first problem.

* Create "machdep.powernow.frequency" again, I can't remember why I
  removed frequency... it should work with estd now.

* Do not try to call k[78]_powernow_init() if cpu is not AMD (thanks
  to christos).

And more things I can't remember, but this time it will work in
Athlon 64 cpus and it won't crash in EM64T cpus.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 27 13:43:48 2003 UTC (9 years, 7 months ago) by junyoung
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, peter-altq-base, peter-altq, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, matt-timespec, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: yamt-lazymbuf, rpaulo-netinet-merge-pcb
Changes since 1.2: +11 -11 lines
Diff to previous 1.2 (colored)

Nuke __P().

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jun 23 11:01:52 2003 UTC (9 years, 11 months ago) by martin
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Mar 1 18:29:28 2003 UTC (10 years, 3 months ago) by fvdl
Branch: MAIN

Moved here from i386/include

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>