clock/tsc: Detect invariant TSC
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 19 Jun 2013 08:37:55 +0000 (16:37 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 19 Jun 2013 08:44:38 +0000 (16:44 +0800)
commit5a81b19fbd3150677df0f28d6fe44cfe071533d0
tree80639cb46c391f760a9456eed64796a83eca0edb
parent8a224941fe0ce5d084f0b923fe7f2e79505a8be3
clock/tsc: Detect invariant TSC

According to Intel's description:
"The invariant TSC will run at a constant rate in all ACPI P-, C-. "
 and T-states. ..."

The difference between invariant TSC and constant TSC is that
invariant TSC is not affected by frequency changes and deep ACPI
C-state.

Constant TSC could be detected based on the CPU model (Intel has
the model list, while there is no information from AMD's document);
constant TSC is not detected yet.
sys/platform/pc32/include/clock.h
sys/platform/pc32/isa/clock.c
sys/platform/pc64/include/clock.h
sys/platform/pc64/isa/clock.c
sys/platform/vkernel/include/clock.h
sys/platform/vkernel/platform/init.c
sys/platform/vkernel/platform/systimer.c
sys/platform/vkernel64/include/clock.h
sys/platform/vkernel64/platform/init.c
sys/platform/vkernel64/platform/systimer.c