Laptop und CPU-Frequenz
Andreas Koch
a_koch at moellinger.hx.uni-paderborn.de
Wed Jul 9 10:47:16 CEST 2003
OK, hier kommt die Antwort auf das Problem.
Cpufreq benutzt leider eine Passwortgeschützte mailinglist (ich nehme
mal an daher konnte google nichts finden). Hier die Antworten die ich
von der Liste bekommen habe (ist alles ein wenig lang - sorry). Leider
hab ich keine Erfahrung mit patchen. Kann mir wer kurz sagen was ich mit
dem patch unten machen muss ? - Danke
Andreas
---
From: Luigi Belli <lbelli at crema.unimi.it>
To: Andreas Koch <a_koch at moellinger.hx.uni-paderborn.de>
Subject: Re: Problems with cpufreq on Acer Aspire Notebook
The problem about our notebooks (I have a 1304LC with a 1800+) is a bug
in the BIOS that exports wrong PST tables (the specification of
voltage/frequency steps), so no fault of cpufreq coders, but Acer's one.
I hardcoded a patch for the 1800+ (so it's perfect for you), which
simply builds the correct PST table and makes the powernow driver decode
values from it instead of the BIOS.
Don't give too much importance of what /proc/cpuinfo reports, since the
values may be alterated by the incorrect powernow driver behaviour. Use
x86info instead (http://sourceforge.net/projects/x86info, download the
CVS version) and look for FID (Frequency ID) and VID (Voltage ID)
settings. My patch is against 2.4.22-pre3-ac1 (-ac kernel is really
perfect for my notebook and moreover the latest version fixes some ACPI
annoyances I had with previous self-patched kernel versions) but should
work with every recent release of the powernow driver.
If you use another kernel version, please look at
arch/i386/kernel/powernow-k7.c, on about line 298 and check if the code
you found is like this:
} else {
/* Going up, so change VID first */
change_VID(fid);
change_FID(vid);
}
if not, manually correct it: there was a typo in older versions so watch
carefully :)
Then, from the kernel sources root (I mean what usually is thr directory
/usr/src/linux/), give the command
patch -p1 < path_to_my_patch
and rebuild.
If you have any questions about this work feel free to contact me
privately ONLY IF I will NOT post my patch to the ml. Otherwise contact
me on the ml, so that everyone can enjoy the discussion about the
problem.
Ah, remember to never switch cpu frequency to fast (I mean, for example
from 666MHz directly to 1533MHz) since it may freeze the PC and
potentially damage in long terms your cpu or power supply circuit.
Hope all this helps,
Luigi Belli
---
From: Carl Thompson <cet at carlthompson.net>
To: Andreas Koch <a_koch at moellinger.hx.uni-paderborn.de>
Cc: cpufreq at www.linux.org.uk
Attached is a patch for your notebook. Also note that there is a bug in
recent CPUFreq patches. If you see the following lines in
change_speed() in powernow-k7.c
} else {
/* Going up, so change VID first */
change_VID(fid);
change_FID(vid);
}
change them to
} else {
/* Going up, so change VID first */
change_VID(vid);
change_FID(fid);
}
Hope this helps,
Carl Thompson
[aspire_patch text/x-diff (2606 bytes)]
--- a/arch/i386/kernel/powernow-k7.c 2003-06-30 13:40:16.000000000 +0200
+++ b/arch/i386/kernel/powernow-k7.c 2003-06-30 13:41:19.000000000 +0200
@@ -167,6 +167,29 @@
unsigned int j, speed;
u8 fid, vid;
+/* hardcoded modifies for mobile Athlon xp 1800+ on Acer Aspire 1300
with buggy bios */+
+ pst = kmalloc(10*sizeof(unsigned char), GFP_KERNEL);
+ if (!pst)
+ return -ENOMEM;
+
+ *pst++ = 4; /* 666 MHz */
+ *pst++ = 19; /* 1.20 V */
+ *pst++ = 6; /* 800 Mhz */
+ *pst++ = 19; /* 1.20 V */
+ *pst++ = 10; /* 1066 Mhz */
+ *pst++ = 19; /* 1.20 V */
+ *pst++ = 14; /* 1333 Mhz */
+ *pst++ = 11; /* 1.45 V */
+ *pst++ = 1; /* 1533 Mhz */
+ *pst = 9; /* 1.55 V */
+
+ pst -= 9;
+
+ fsb=133;
+
+/*************************************************/
+
powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table)
* (number_scales + 1)), GFP_KERNEL); if (!powernow_table)
return -ENOMEM;
@@ -187,7 +210,7 @@
#endif
}
- dprintk (KERN_INFO PFX " FID: 0x%x (%d.%dx [%dMHz])\t", fid,
+ dprintk (KERN_INFO PFX " FID: 0x%x (%d.%dx [%dMHz]) ", fid,
fid_codes[fid] / 10, fid_codes[fid] % 10, speed);
if (speed < minimum_speed)
@@ -328,9 +351,11 @@
if ((etuple == pst->cpuid) && (maxfid==pst->maxfid) &&
(startvid==pst->startvid)) {
dprintk (KERN_INFO PFX "PST:%d (@%p)\n", i,
pst);- dprintk (KERN_INFO PFX " cpuid: 0x%x\t", pst->cpuid);
- dprintk ("fsb: %d\t", pst->fsbspeed);
- dprintk ("maxFID: 0x%x\t", pst->maxfid);
+ dprintk (KERN_INFO PFX " cpuid: 0x%x ", pst->cpuid);
+ /* modified for mobile Athlon XP 1800+ */
+ dprintk ("fsb: %d ", 133);
+ /***************************************/
+ dprintk ("maxFID: 0x%x ", pst->maxfid);
dprintk ("startvid: 0x%x\n", pst->startvid);
fsb = pst->fsbspeed;
More information about the Linux
mailing list