Subject: Re: speedstepping on amd64 - why not?
To: Tonnerre LOMBARD <tonnerre@bsdprojects.net>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 04/22/2007 15:18:04
On Sun, 22 Apr 2007 03:57:32 +0200
Tonnerre LOMBARD <tonnerre@bsdprojects.net> wrote:

> Salut,
> 
> I got it to work somewhat on 4.0_BETA2 with a couple of quirks. However,
> contrary to FreeBSD, NetBSD only sees 2 frequencies because, as it seems,
> it does not recognize the CPU. In the dmesg it says:
> 
> cpu0: Enhanced SpeedStep (1324 mV) 2000 MHz
> cpu0: unknown Enhanced SpeedStep CPU (0:16667:3111:1555).
> cpu0: using only highest and lowest power states.
> cpu0: Enhanced SpeedStep frequencies available (MHz): 2000 1000
> 
> However, I'm not sure what I should register in est.c as the voltages
> etc., because I can't find a mode corresponding to the frequencies
> FreeBSD offers. The relevant part of sysctl -a is as follows:
> 
> dev.cpu.0.freq: 1997
> dev.cpu.0.freq_levels: 1997/-1 1747/-1 1497/-1 1248/-1 998/-1 748/-1 499/-1 249/-1
> dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 2500/-1 1250/-1

Can you try to add printfs into the FreeBSD driver to know what's
the mV value for every frequency? so that we could create a table
for NetBSD, like:

/* Intel Pentium M processor 780 2.26 GHz */
static const uint16_t pm90_n780[] = {
        ID16(2267, 1388, BUS133),
        ID16(1867, 1292, BUS133),
        ID16(1600, 1212, BUS133),
        ID16(1333, 1148, BUS133),
        ID16(1067, 1068, BUS133),
        ID16( 800,  988, BUS133),
};

First arg is MHz, second is mV and third arg is bus clock.

BTW your est driver seems to not use RUN_ONCE(9), it's necessary to
not run est_init() twice. Take a look at the -current est driver.

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish