Hi tech@
After setting cpu clock to the minimum value in my BIOS, SpeedStep
paniced on me.
dmesg before and after patching at
http://netzbasis.de/openbsd/speedstep/
The patch below works for me, tested on amd64.
low == high == 800
cpuspeed == 798 (!)
--- sys/arch/amd64/amd64/est.c.orig Fri May 9 00:14:22 2014
+++ sys/arch/amd64/amd64/est.c Sat May 10 11:40:01 2014
@@ -424,7 +424,11 @@
low = est_fqlist->table[est_fqlist->n - 1].mhz;
high = est_fqlist->table[0].mhz;
- perflevel = (cpuspeed - low) * 100 / (high - low);
+ if (low == high) {
+ perflevel = 0;
+ } else {
+ perflevel = (cpuspeed - low) * 100 / (high - low);
+ }
/*
* OK, tell the user the available frequencies.
--- sys/arch/i386/i386/est.c.orig Fri May 9 00:14:22 2014
+++ sys/arch/i386/i386/est.cSat May 10 11:40:01 2014
@@ -424,7 +424,11 @@
low = est_fqlist->table[est_fqlist->n - 1].mhz;
high = est_fqlist->table[0].mhz;
- perflevel = (cpuspeed - low) * 100 / (high - low);
+ if (low == high) {
+ perflevel = 0;
+ } else {
+ perflevel = (cpuspeed - low) * 100 / (high - low);
+ }
/*
* OK, tell the user the available frequencies.