MSI K8N Neo + powernow-k8: ACPI info is worse than BIOS PST

From: Randall Nortman
Date: Sat Jul 31 2004 - 09:02:19 EST


I'm running kernel 2.6.7 (as distributed by Gentoo in
gentoo-dev-sources) on an Athlon 3000+ with an MSI K8N Neo Platinum
motherboard, BIOS v1.1 (most recent available). The stock powernow-k8
first queries ACPI for CPU frequency/voltage tables, and on this
system that information is hopeless:

-----
Jul 29 19:09:34 terry powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09b)
Jul 29 19:09:34 terry powernow-k8: 0 : fid 0xc (2000 MHz), vid 0x2 (1500 mV)
Jul 29 19:09:34 terry powernow-k8: 1 : fid 0xa (1800 MHz), vid 0x6 (1400 mV)
Jul 29 19:09:34 terry powernow-k8: 2 : fid 0xa (1800 MHz), vid 0x6 (1400 mV)
Jul 29 19:09:34 terry powernow-k8: cpu_init done, current fid 0xc, vid 0x2
-----

I hacked arch/i386/kernel/cpu/cpufreq/powernow-k8.c a bit so that the
ACPI info is ingored in favor of the BIOS PST table, with this result:

-----
Jul 30 21:49:23 terry powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09b)
Jul 30 21:49:23 terry powernow-k8: BIOS error: numpst must be 1
-----

So, I found a patch that Tony Lindgren posted back in May to work
around buggy BIOSes, which included a change to make it ignore the
numpst error, and then I got this:

-----
Jul 30 21:38:39 terry powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09b)
Jul 30 21:38:39 terry powernow-k8: BIOS error: numpst listed as 2 should be 1. Ignoring it.
Jul 30 21:38:39 terry powernow-k8: 0 : fid 0x2 (1000 MHz), vid 0x12 (1100 mV)
Jul 30 21:38:39 terry powernow-k8: 1 : fid 0xa (1800 MHz), vid 0x6 (1400 mV)
Jul 30 21:38:39 terry powernow-k8: 2 : fid 0xc (2000 MHz), vid 0x2 (1500 mV)
Jul 30 21:38:39 terry powernow-k8: cpu_init done, current fid 0xc, vid 0x2
-----

That's much better, but this CPU really ought to be able to clock all
the way down to 800MHz, so then I did a little more hacking to ignore
both the BIOS and ACPI info, and just use the hardcoded tables
provided in Tony's patch, which gives me what I want:

-----
Jul 30 22:04:55 terry powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09b)
Jul 30 22:04:55 terry powernow-k8: BIOS error: numpst listed as 2 should be 1. Ignoring it.
Jul 30 22:04:55 terry powernow-k8: BIOS error: overriding frequency table
Jul 30 22:04:55 terry powernow-k8: 0 : fid 0x0 (800 MHz), vid 0x12 (1100 mV)
Jul 30 22:04:55 terry powernow-k8: 1 : fid 0xc (2000 MHz), vid 0x2 (1500 mV)
Jul 30 22:04:55 terry powernow-k8: cpu_init done, current fid 0xc, vid 0x2
-----

My "patch" is brute-force and ugly, and I didn't bother understanding
the code fully before I hacked it to pieces, so I refuse to release it
into the wild. However, if you have this mobo and want to live
dangerously, you may write to me directly to get my code.

If anybody qualified to hack this code is interested in creating a
real workaround for BIOSes like this, I offer my system (and my time,
as I cannot give remote access) for testing. I would suggest adding a
compile-time or load-time option to prefer the BIOS over ACPI (as in
powernow-k7, I think), and maybe a compile-time option to use Tony's
hardcoded tables.

(I do not read this list regularly, but I'll try to follow this thread
for the next few weeks. Past that time, I request that you CC me
directly on anything related to this issue. Thanks!)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/