aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/run.sh b/run.sh
index 77c6a4d..39c4719 100755
--- a/run.sh
+++ b/run.sh
@@ -10,7 +10,15 @@ nob_cpus() {
noturbo() {
echo "[+] Setting no-turbo to status $1"
- echo "$1" > /sys/devices/system/cpu/intel_pstate/no_turbo
+ if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then
+ echo "$1" > /sys/devices/system/cpu/intel_pstate/no_turbo
+ else
+ local val
+ [[ $1 == 0 ]] && val=0x850089
+ [[ $1 == 1 ]] && val=0x4000850089
+ [[ -n $val ]] || return 0
+ wrmsr -a 0x1a0 $val
+ fi
}
[[ -e kbench9000.ko ]]