clockmod: Properly implement Intel software controlled clock modulation
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 12 Feb 2014 14:15:29 +0000 (22:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 16 Feb 2014 08:34:10 +0000 (16:34 +0800)
commite76f5e7371bbed17f87fd9a2b2f353c2d0beec06
tree664ff782a56551b8178e51a79bbbedbdc5256e74
parentbede4c1e8867d77868343192ec72e5fc6836ead4
clockmod: Properly implement Intel software controlled clock modulation

Compared w/ the out dated p4tcc code in i386:

- Write the MSR on the correct CPU.
- Fix errata detection.
- Enable 6.25% granularity.
- Fix logical CPU setting by introducing clock modulation domain.  Each
  domain contains logical CPUs in the same core.  When changing duty
  cycle we change all logical CPUs' duty cycle in the same domain; mainly
  to avoid model specific reaction to logical CPU duty cycle change.

It is controlled through machdep.clockmod_domX.select.  Members of the
domain are listed by machdep.clockmod_domX.members.  And the available
duty cycles are listed by machdep.clockmod_domX.available.

It is enabled in i386 and x86_64 GENERIC.

* We may want to make powerd(8) aware of clockmod(4)
sys/conf/files
sys/config/GENERIC
sys/config/LINT
sys/config/LINT64
sys/config/X86_64_GENERIC
sys/dev/powermng/Makefile
sys/dev/powermng/clockmod/Makefile [new file with mode: 0644]
sys/dev/powermng/clockmod/clockmod.c [new file with mode: 0644]