Skip to contentSkip to conversation

Build PST for AthlonXP

DISCUSSION Lukas Schrangl 2 participants 2 messages Feb 5, 2004 – Feb 6, 2004 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw
Quoted 112 lines · Lukas Schrangl
Quoted 4 lines
Quoted 4 lines · Lukas Schrangl
Quoted 3 lines

Hi!

I don't know wether this is the right mailinglist for my problem,

but at

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

least I think here are some people who can help me.

Correct, the mailling list is the CPUFreq mailing list..

Quoted 1 line

Maybe someone remembers my problem: I have a AMD Athlon XP 2600+

mobile

Quoted 11 lines
Quoted 11 lines

CPU

Quoted 1 line

but neither ACPI- performance states nor cpufreq/powernow-k7 (no PST

matching

Quoted 1 line

this cpuid) do work.

Retrieving configuration from ACPI is a work in progress. I do have some experimental patch for, but not publically available yet (it depends on others patches from Dominik, I'm not sure if that OK by now).

Quoted 1 line

Recently I browsed a bit through the powernow-k7 source and have now

an

Quoted 2 lines
Quoted 2 lines

idea

Quoted 1 line

how it works. It shouldn't be too difficult to set up my own PST for

my

Quoted 33 lines
Quoted 33 lines

CPU,

Quoted 1 line

should it?

Well, not so, especially if you can retrieve the configuration for the different
states.
The key is the control word, in the _PSS packages.

For example, suppose you have that:

Processor(..) {
	...
	Name (_PSS, Package () {	/* this may be a method, btw */
		Package () {
			0x0352,
			0x61A8,
			0x7D,
			0x009C414B,	/* that the control. */
			0x014B
		},
		Package () {
			...,
			...,
		}
	})

For the first one, this is 0x009C414B.
The layout seems to be:
bit 0-5: FID,
bit 6-10: VID,
bit 11-30: SGTC (or in other word 'latency' in 10 time micro second) bit 31-32: reserved.

Quoted 3 lines
Quoted 3 lines

Note that this is *not* confirmed by AMD people.

Quoted 1 line

I know about FIDs and VIDs and what they are good for, but can

anyone

Quoted 1 line
Quoted 1 line
Quoted 1 line

explain me the structure of a PST and the PSB (links to some

documents,

Quoted 2 lines
Quoted 2 lines

...)?

Quoted 1 line

The second thing: I could get the cpu- frequences that seem work

(for my

Quoted 1 line
Quoted 1 line
Quoted 1 line

FIDs) from my SSDT, but how can I calculate the voltage (for the

VIDs)

Quoted 29 lines
Quoted 4 lines

matching

Quoted 2 lines

the frequency, if there are only the mW given in the SSDT?

Quoted 24 lines

BTW, I send to CPUFreq ML yesterday a patch in order to get a sysctl interface for overwritting a powernow k7 table.

http://www.poupinou.org/cpufreq/powernow-k7/

Cheers,

Signature · 15 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Acpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel
Quoted 2 lines

Sysctl? I just hard-coded a PST (thanks to your hint with the SSDT- controldwords) and patched powernow-k7.c to make the driver use that PST

instead of

Quoted 1 line

BIOS PSTs. What shall I say? It simply works ;)

I do not doubt that it work, just that the sysfs things is generic for everybody (even if the driver is correctly loaded in fact), and then you don't have to worry about to patch the kernel anymore. Just a little rc-script to write...

Quoted 1 line

PS.: I found one of the FIDs in the SSDT to be false, so maybe it's not

save

Quoted 8 lines
Quoted 1 line

to read the powernow- states from ACPI.

Let me guess. The one that is before the latest state, and actually you meant the VID value which is a little too high?

If that's the case, it should be safe to go, but yes, I have to workaround that though. But if that's really the FID which is wrong, well, I will be gratefull to get a report.

I think it's really the FID in the state one before the last state which was too low by one but I will look that up to be shure (I'm not working with my computer). I will notify you as soon as I have looked that up and got to a computer with internet access again.

Quoted 3 lines

I saw also one example where the maximum speed was missing (and of course, there is no BIOS PST)...

I have all states.

Quoted 4 lines

Note also that the acpi things is only done if and only if the laptop is DMI blacklisted (and ACPI processor is compiled, of course).

Don't think it is blacklisted, but didn't try your patch yet. Will do that as soon as possible.

Quoted 7 lines
Signature · 5 lines
-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
Signature · 10 lines
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Lukas Schrangl
Quoted 7 lines · Lukas Schrangl
Quoted 2 lines

to read the powernow- states from ACPI.

Let me guess. The one that is before the latest state, and actually you meant the VID value which is a little too high?

Quoted 8 lines
Quoted 3 lines

If that's the case, it should be safe to go, but yes, I have to workaround that though. But if that's really the FID which is wrong, well, I will be gratefull to get a report.

I think it's really the FID in the state one before the last state which was too low by one but I will look that up to be shure (I'm not working with my computer). I will notify you as soon as I have looked that up and got to a computer with internet access again.

Well, well. Ok.

Quoted 5 lines
Quoted 2 lines

the laptop is DMI blacklisted (and ACPI processor is compiled, of course).

Don't think it is blacklisted, but didn't try your patch yet. Will do that as soon as possible.

If you want, you can test that dummy module instead. Nothing will be actually touched. You need at least a 2.6.2-rc3-mm1, or a recent ACPI test bk tree (this module is actually an hack of a module made by Dominik).

Create a Makefile with that line:
obj-m = test-powernow.o
then
make -C /lib/modules/uname -r/build SUBDIRS=pwd modules insmod ./test-powernow.ko

It will failed, but dmesg will give you the table. You need to have CONFIG_ACPI_PROCESSOR enabled, though.

Cheers,

Signature · 4 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.

/*
*/

#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/io.h>
#include <asm/delay.h>
#include <asm/uaccess.h>

#include <linux/acpi.h>
#include <acpi/processor.h>

struct acpi_processor_performance p;

union powernow_acpi_control_t {
	struct {
		unsigned long fid:5,
		vid:5,
		sgtc:20,
		res1:2;
	} bits;
	unsigned long val;
};

#define ACPI_PDC_REVISION_ID 0x1
#define ACPI_PDC_CAPABILITY_ENHANCED_SPEEDSTEP 0x1

static int __init
acpi_cpufreq_init (void)

{
	unsigned int i;
	struct acpi_pct_register *r;
	union powernow_acpi_control_t pc;

	if (acpi_processor_register_performance(&p, 0))
		return -EIO;

	printk("number of states: %d\n", p.state_count);
	for (i=0; i< p.state_count; i++) {
		pc.val = (unsigned long) p.states[i].control;
		printk(KERN_INFO "powernow: %cP%d: %d MHz, %d mW, %d uS, control %08x, status %08x, vid: %02x fid: %02x SGTC: %d\n",
		       (i == p.state?'*':' '), i,
		       (u32) p.states[i].core_frequency,
		       (u32) p.states[i].power,
		       (u32) p.states[i].transition_latency,
		       (u32) p.states[i].control,
		       (u32) p.states[i].status,
		       pc.bits.vid,
		       pc.bits.fid,
		       pc.bits.sgtc);

	}

	printk("control_register:\n");
	r = &p.control_register;
	printk("%d %d %d %d %d %d %lld\n", r->descriptor, r->length, r->space_id,
	       r->bit_width, r->bit_offset, r->reserved, r->address);

	printk("status_register:\n");
	r = &p.status_register;
	printk("%d %d %d %d %d %d %lld\n", r->descriptor, r->length, r->space_id,
	       r->bit_width, r->bit_offset, r->reserved, r->address);

	acpi_processor_unregister_performance(&p, 0);

	return -ENODEV;
}

static void __exit
acpi_cpufreq_exit (void)

{
	return;
}

late_initcall(acpi_cpufreq_init);
module_exit(acpi_cpufreq_exit);