2000-12-08 15:05:30

by Janne Pänkälä

[permalink] [raw]
Subject: K6-2+ and MSR registers (PowerNOW)

Bought myself this new CPU that is mainly available for laptops.

I have Tyan S1590 board which BIOS won't POST if I set cpu speed (it's
500Mhz chip) >300Mhz. This won't matter much in windows since I can there
use graphical utility which allows one to set whe CPU clock multiplier in
flight as 2.0 - 6.0. But since my machine is Linux like 98% of the time
I'd like to do same in linux.

Things I have considered are. Do I need to recalculate BoGos? Do I need to
reserve the IO space to access it from user space.

what I have tried basically (in user space and kernel space) is

mov ecx, 0c0000086h
mov edx, 0
mov eax, 0fff1h
wrmsr

which is supposed to turn on the powernow feature and set the I/O access
region to 0xfff0 (and 16 bytes upwards actual 4 byte informational block
being at +8 offset) where one can change clock multiplier and do other
stuff.

however access to io region 0xfff0-0xffff remains denied for me in
userspace. In kernel I read it with inw(addr) and there I just get data
that cannot be correct. (it returns ffff)

If someone knows how to read / write MSR registers and high IO ports in
userlevel I'd be thankful for a hint. also RTFM or RTFC pointers are
appreciated.

I have read IO howto and iopl() doesn't work.

In the end it would be nice to do proc entry or user space program that
allows one to [sg]et cpu speed and other PowerNOW properties.

PS.
references: mobile amd-k6-2+ processor datasheet 23446.pdf by AMD

PPS.
I'd appriciate if possible answers could be also CC'd to me.


Janne P?nk?l?

--
Janne
echo [email protected] | tr acefhiklnptu utpnlkihfeca


2000-12-11 22:10:14

by Pavel Machek

[permalink] [raw]
Subject: Re: K6-2+ and MSR registers (PowerNOW)

Hi!

> Bought myself this new CPU that is mainly available for laptops.
>
> I have Tyan S1590 board which BIOS won't POST if I set cpu speed (it's
> 500Mhz chip) >300Mhz. This won't matter much in windows since I can there
> use graphical utility which allows one to set whe CPU clock multiplier in
> flight as 2.0 - 6.0. But since my machine is Linux like 98% of the time
> I'd like to do same in linux.
>
> Things I have considered are. Do I need to recalculate BoGos? Do I need to
> reserve the IO space to access it from user space.

You should recalculate bogomips. Hell _may_ break loose if you don't,
but it probably will not.

> In the end it would be nice to do proc entry or user space program that
> allows one to [sg]et cpu speed and other PowerNOW properties.

Hmm, it would be nice if generic interface existed: my philips velo 1
can set cpu speed in range 2MHz .. 40MHz.

Pavel
--
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]