cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Acer Aspire 1300 buggy BIOS - hardcoded patch
@ 2003-07-01  0:44 Alex Young
  2003-07-01  5:34 ` Adachi, Kenichi
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Young @ 2003-07-01  0:44 UTC (permalink / raw)
  To: cpufreq

I have a similar problem with the bios of my sony vaio fx802. It has a mobile 
athlonxp 1500+ and has the following output from powernow-k7.

powernow: AMD K7 CPU detected.
powernow: PowerNOW! Technology present. Can scale: frequency and voltage.
powernow: Found PSB header at c00f74d0
powernow: Table version: 0x12
powernow: Flags: 0x0 (Mobile voltage regulator)
powernow: Settling Time: 100 microseconds.
powernow: Has 28 PST tables. (Only dumping ones relevant to this CPU).
powernow: PST:26 (@c00f76ac)
powernow:  cpuid: 0x780 fsb: 100        maxFID: 0x14    startvid: 0xe
powernow:    FID: 0x4 (5.0x [500MHz])   VID: 0xe (1.300V)
powernow:    FID: 0x8 (7.0x [700MHz])   VID: 0xe (1.300V)
powernow:    FID: 0xc (9.0x [900MHz])   VID: 0xe (1.300V)
powernow:    FID: 0x0 (11.0x [1100MHz]) VID: 0xe (1.300V)
powernow:    FID: 0x14 (13.0x [1300MHz])        VID: 0xe (1.300V)
powernow: Minimum speed 500 MHz. Maximum speed 1300 MHz.

Now my (possibly stupid) question is:
Why are the frequency/voltage settings controlled by the bios?
Surely these values are the same for all processors of the same speed and 
stepping number. Would it not be possible to obtain the recommended values 
directly from AMD and use them instead of the ones provided by the bios. Or 
can the motherboard hardware only generate certain values? 

Incidently does anybody have a athlonxp 1500+ with a 'correct' PST table? If 
so does voltage scaling make any noticeable difference to temperature or 
battery life?
-- 
Alex Young

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Acer Aspire 1300 buggy BIOS - hardcoded patch
@ 2003-07-01 12:24 davidendless
  2003-07-01 13:34 ` Luigi Belli
  0 siblings, 1 reply; 14+ messages in thread
From: davidendless @ 2003-07-01 12:24 UTC (permalink / raw)
  To: cpufreq

> I'm one of the owners of an Acer Aspire 1300 series with a buggy
BIOS, so I
> decided to hardcode a patch with the correct PST table for my mobile
Athlon
> XP 1800+.

I tried the patch, and it seemed to work. Then I did some tests and I
found 
that in powersave (cat /proc/cpuinfo: cpu MHz 666.705) it runs faster
than at 
fullspeed (1533.422).

To test speed I used nbench and this simple script (in xterm at
fullscreen):

$ time for i in `seq 50000`; do echo "aaaa"; done

It took about 2,6 seconds without the powernow-k7 module loaded, the
same time 
with module loaded and powersave, and about 3,9 seconds with full
power and 
module loaded.

Isn't it strange?
Do you have the same behaviour?

David




--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Natsabe.it la più grande erboristeria multimarca online.
Solo prodotti di altissima qualità. 

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1308&d=1-7

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Acer Aspire 1300 buggy BIOS - hardcoded patch
@ 2003-06-30 12:36 Luigi Belli
  2003-06-30 15:14 ` Ducrot Bruno
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Luigi Belli @ 2003-06-30 12:36 UTC (permalink / raw)
  To: cpufreq

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

I'm one of the owners of an Acer Aspire 1300 series with a buggy BIOS, so I 
decided to hardcode a patch with the correct PST table for my mobile Athlon 
XP 1800+.
I know very little of kernel internals, I only opened powernow-k7.c and tried 
to guess what had to be changed...
For me it works and I decided to post it here for those in my conditions 
waiting for a new bios or a newer cpufreq release.
It's a patch against kernel 2.4.21-ac4.

[-- Attachment #2: patch-aspire1300-1800+ --]
[-- Type: text/x-diff, Size: 1809 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;

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-07-04 17:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-01  0:44 Acer Aspire 1300 buggy BIOS - hardcoded patch Alex Young
2003-07-01  5:34 ` Adachi, Kenichi
  -- strict thread matches above, loose matches on Subject: below --
2003-07-01 12:24 davidendless
2003-07-01 13:34 ` Luigi Belli
2003-07-01 14:20   ` Stefan Hoppe
2003-06-30 12:36 Luigi Belli
2003-06-30 15:14 ` Ducrot Bruno
2003-07-01 10:51   ` Ducrot Bruno
2003-07-04 17:04     ` Ducrot Bruno
2003-06-30 19:14 ` Stefan Gehn
2003-06-30 22:59 ` Francesco Poli
2003-06-30 23:20   ` Luigi Belli
2003-07-01 21:43     ` Francesco Poli
2003-07-01 10:12   ` Morrowind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox