Bug 6034 - powernow-k8 fails to load on AMD Mobile Sempron 3000+ system
Summary: powernow-k8 fails to load on AMD Mobile Sempron 3000+ system
Status: CLOSED DOCUMENTED
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: cpufreq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-09 00:40 UTC by Valentine Sinitsyn
Modified: 2011-07-30 05:21 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.15.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel config (12.07 KB, application/x-gzip)
2006-02-09 00:44 UTC, Valentine Sinitsyn
Details
Workaround for my broken BIOS (2.43 KB, patch)
2006-02-12 03:19 UTC, Valentine Sinitsyn
Details | Diff

Description Valentine Sinitsyn 2006-02-09 00:40:27 UTC
Most recent kernel where this bug did not occur: 2.6.13 (sure) or 2.6.14 (not
100% sure)

Distribution: Arch Linux 0.7.1

Hardware Environment: Laptop: AMD Mobile Sempron 3000+ / 512Mb RAM / VIA K8N800
Video Adapter (Built-in) / SAMSUNG MP0402H 30Gb HDD / UJDA 760 ATAPI DVD/CDRW /
Via Rhine Ethernet Adapter (Built-in) / Intel 2200 BG Wi-Fi Adapter (Mini PC)

Software Environment: ver_linux output is the following:
--------------------------------------------------------
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
 
Linux laptop 2.6.15.2-CUSTOM #7 SMP PREEMPT Thu Feb 9 12:59:49 YEKT 2006 i686
Mobile AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux
 
Gnu C                  4.0.3
Gnu make               3.80
binutils               2.16.1
util-linux             2.12r
mount                  2.12r
module-init-tools      3.2.2
e2fsprogs              1.38
jfsutils               1.1.10
reiserfsprogs          3.6.19
reiser4progs           line
PPP                    2.4.3
Linux C Library        2.3.5
Dynamic linker (ldd)   2.3.5
Linux C++ Library      6.0.7
Procps                 3.2.6
Net-tools              1.60
Kbd                    1.12
Sh-utils               5.2.1
udev                   079
Modules Loaded         nls_cp866 vfat fat isofs zlib_inflate nls_koi8_r udf
freq_table uhci_hcd ehci_hcd usbhid usblp usb_storage pcmcia yenta_socket
rsrc_nonstatic pcmcia_core ipw2200 ieee80211 ieee80211_crypt via_rhine mii
via_ircc irda snd_via82xx snd_via82xx_modem snd_ac97_codec snd_ac97_bus
snd_mpu401_uart snd_rawmidi snd_seq_oss snd_seq_midi_event snd_seq
snd_seq_device snd_pcm_oss snd_pcm snd_timer snd_page_alloc snd_mixer_oss snd
soundcore crc_ccitt pcspkr gameport evdev i2c_viapro i2c_core rtc amd64_agp
agpgart usbcore xfs reiserfs jfs ext3 jbd qlogicfas408 sr_mod sg
scsi_transport_sas sd_mod ide_cd cdrom ide_disk via82cxxx generic ide_core
--------------------------------------------------------
Problem Description:
Module powernow-k8 fails to load with the following error message:
[root@laptop ~]# modprobe powernow-k8
FATAL: Error inserting powernow_k8
(/lib/modules/2.6.15.2-CUSTOM/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8.ko):
No such device

With cpufreq.debug=2, dmesg indicates the following error:
----------------------------------------------------------
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8: register performance failed: bad ACPI data
powernow-k8: found PSB header at 0xc00f1200
powernow-k8: table vers: 0x14
powernow-k8: flags: 0x0
powernow-k8: voltage stabilization time: 5(*20us)
powernow-k8: flags2: 0x4e
powernow-k8: ramp voltage offset: 2
powernow-k8: isochronous relief time: 3
powernow-k8: maximum voltage step: 0 - 0x1
powernow-k8: numpst: 0x33
powernow-k8: BIOS error: numpst must be 1
--------------------------------------------------------
There is also two-line error report in system-wide messages.log:
Feb  9 13:13:00 laptop powernow-k8: Found 1 AMD Athlon 64 / Opteron processors
(version 1.50.4)
Feb  9 13:13:00 laptop ACPI-0508: *** Error: Method execution failed
[\_PR_.CPU0._PSS] (Node c14c9d00), AE_AML_PACKAGE_LIMIT

The problem does not seem to depend on kernel config or loaded modules list
(I've tried several variants with no luck) but in case it will be useful my
current config.gz is attached to the report.

Steps to reproduce: 
Enter `modprobe powernow-k8` command and watch the output.
Expected results: Module powernow-k8 successfully loads
Actual results: -ENODEV error is returned.
Comment 1 Valentine Sinitsyn 2006-02-09 00:44:19 UTC
Created attachment 7276 [details]
Kernel config

This is one of the config files I used.
Comment 2 Dave Keck 2006-02-09 07:29:32 UTC
This sounds like a BIOS issue.

Have you tried an updated BIOS?

Thanks,

Dave Keck
Advanced Micro Devices
Comment 3 Valentine Sinitsyn 2006-02-09 08:36:39 UTC
No, I have'nt (this will probably void a warranty for my laptop). Anyway, it way
working with earliar kernels (2.6.13 and probably 2.6.14), and now my BIOS is
not good enough for 2.6.15? I'm not a kernel hacker but can't it be a bug in
acpi implementation then?
Comment 4 Valentine Sinitsyn 2006-02-09 20:24:22 UTC
Also, it's ahrdly a BIOS issue because the same problem was reported separately
by another guy in Arch Linux bugtracker (http://bugs.archlinux.org/task/3904). I
suppose he uses different BIOS.
Comment 5 Stefano 2006-02-10 04:34:59 UTC
same problem here, but the message i receive is:

[root@spock ~]# modprobe powernow-k8
FATAL: Error inserting powernow_k8 (/lib/modules/2.6.15-ARCH/kernel/arch/i386/
kernel/cpu/cpufreq/powernow-k8.ko): No such device

and from dmsg :

powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8: MP systems not supported by PSB BIOS structure

before kernel 2.6.15.* all worked ok.

this problem happens at HOME where i have (lshw) :
  *-core
       description: Motherboard
       product: K8V-X
       vendor: ASUSTeK Computer Inc.
       physical id: 0
       version: Rev 2.00
       serial: MB-1234567890
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 1005.001 (10/09/2004)
          size: 64KB
          capacity: 448KB
          capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect 
socketedrom edd int13floppy1200 int13floppy720 int13floppy28
80 int5printscreen int9keyboard int14serial int17printer int10video acpi usb agp 
ls120boot zipboot biosbootspecification

[root@spock ~]# cat /proc/acpi/processor/CPU1/info
processor id:            0
acpi id:                 1
bus mastering control:   no
power management:        no
throttling control:      no
limit interface:         no

at WORK, powernow work ok,same kernel, amd64 but with this lwhw:
  *-core
       description: Motherboard
       product: A8N-SLI Premium
       vendor: ASUSTeK Computer INC.
       physical id: 0
       version: 1.02
       serial: 123456789000
     *-firmware
          description: BIOS
          vendor: Phoenix Technologies, LTD
          physical id: 0
          version: ASUS A8N-SLI Premium ACPI BIOS Revision 1006 (06/30/2005)
          size: 128KB
          capacity: 448KB
          capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom 
edd int13floppy360 int13floppy1200 int13floppy720 int13fl
oppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb 
ls120boot zipboot biosbootspecification

[root@L0cutus ~]# cat /proc/acpi/processor/CPU0/info
processor id:            0
acpi id:                 0
bus mastering control:   yes
power management:        no
throttling control:      no
limit interface:         no
Comment 6 Dave Keck 2006-02-10 06:40:19 UTC
Stefano,
For the ASUS K8V-X motherboard, please go to this link to download the latest BIOS:
http://support.asus.com/download/download_item_nn.aspx?model=K8V-X&product=1&f_name=&type=Latest&SLanguage=en-us#
Pleae let me know how that works for you.

Valentine,
For the Laptop with the AMD Mobile Sempron 3000+, let me know what brand of
laptop you have and I'll see if I can find a new BIOS for it.  I doubt it would
void your warranty.  You do not need to take the laptop apart to update your
BIOS and the new BIOS would be coming from the laptop manufacturer.

Thanks,
Dave Keck
Advanced Micro Devices
Comment 7 Stefano 2006-02-10 14:21:12 UTC
Dave:
Solved after i have installed BIOS 1.012 (non beta).

Thanks !
Comment 8 Valentine Sinitsyn 2006-02-10 22:34:45 UTC
Yep, this really seems to be BIOS bug - it's not working on earlier kernels (I
was pretty sure I saw it working). My notebook is from the local manufacturer so
I doubt it is well-known in US. Here is the excerpt from lshw output:

laptop
    description: Portable Computer
    product: Mission_A330
    vendor: MaxSelect
    version: 5a
    serial: N0009341
    width: 32 bits
    capabilities: smbios-2.3 dmi-2.3
    configuration: administrator_password=disabled boot=normal chassis=portable
power-on_password=disabled uuid=00000000-0000-0000-0000-0040D074E77B
  *-core
       description: Motherboard
       product: Mission_A330
       vendor: MaxSelect
       physical id: 0
       version: 5a
       serial: N0009341
     *-firmware
          description: BIOS
          vendor: Insyde Software
          physical id: 0
          version: R1.10 (04/20/2005)
          size: 88KB
          capacity: 448KB
          capabilities: isa pci pcmcia pnp apm upgrade shadowing cdboot
bootselect socketedrom edd int13floppynec int13floppy720 int13floppy2880
int5printscreen int9keyboard int14serial int17printer int10video acpi usb
ls120boot zipboot smartbattery netboot
     *-cpu
          description: CPU
          product: Mobile AMD Sempron(tm) Processor 3000+
          vendor: Advanced Micro Devices [AMD]
          physical id: 4
          bus info: cpu@0
          version: 15.12.2
          serial: Processor Serial Number
          slot: PGA758
          size: 1800MHz
          capacity: 1800MHz
          width: 32 bits
          clock: 200MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic
sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext
fxsr_opt 3dnowext 3dnow pni

I'm sure that MaxSelect is not making motherboards by themselves but rather
license it somehow, but I don't know the original manufacturer name. The only
hint I have is the output from lshwd (Arch Linux specific utility):
 
Multimedia audio controller
  snd-via82xx     : VIA Technologies, Inc.|L7VTA v1.0 Motherboard (KT400-8235)

Maybe I have L7VTA motherboard from ECS? I'm not sure (the specs on the site are
different) and there are no signs for BIOS update at http://en.maxselect.ru
Comment 9 Valentine Sinitsyn 2006-02-10 23:00:34 UTC
Update: MaxSelect Mission A330 seems to be based on the same design as Mitac
Minote 8889C (http://www.mitac-mtc.com.tw/English/products/notebook.aspx). The
have the same specification, moreover, built-in VGA adapter is recognized by
Linux driver as Mitac 8889. L7VTA seems tio be fake.
Comment 10 Valentine Sinitsyn 2006-02-12 03:16:01 UTC
Some updates on the story:

Yesterday I tried to find an updated BIOS for my laptop. As I've said before,
MaxSelect Mission A330 is based on Mitac MiNote 8889 (maybe 8889c or L, I don't
know for sure). It has several "brothers": Yakumo Q8M Turion64, Packard Bell B3
Series and Evesham Quest A210 T30. I have visited Mitac Service site
(www.mitacservice.com) along with sites of aforementioned manufacturers. The
only BIOS update I find was Revision 1.02 which is pretty old (my BIOS is 1.10).
I've contacted MaxSelect support but didn't receive a response yet.

So, finding new BIOS is not an easy task and I decided to have a closer look at
the bug. It was very interesting and fruitful. First, I've understood why I
thought powernow-k8 was working with earlier kernels. MaxSelect has an upgrade
service where you can change CPU, memory, etc on your notebook. Initially, my
laptop was equipped with Mobile Sempron 2600+ CPU, but I've upgraded it in
October (some weeks before 2.6.14 was released). That's why I thought Powernow
was working on earlier kernels - it was working on earlier CPUs! It is
understandable that my BIOS does not know anything about Sempron 3000+, which
was released in mid-summer 2005 (the BIOS itself is dated April 2005). As a
result, PSB entry filled by my BIOS was somewhat broken: it have NumPST == 0x33
instead of 0x01 (I think I'm not the first who observed this bug: there is
workaround for Sempron processors in powernow-k8.c, but it does not work for me)
and two P-states belonging to Mobile Sempron 2600+ (800MHz and 1600MHz).
Moreover, the number of P-states available on battery (equal to the number of
"usable P-states" in a driver) was only 1. I decided to make a small workaround
(not to say hack) and fill the PSB/PST entries with correct values (of course,
it's a BIOS job, but it's broken, as I've said earlier). The problem is, there
is no Power and Thermal Data sheet for Mobile Semprons on www.amd.com, so I had
to deduce fid/vid values. State 0 (lowest) was taken from AMD64 Power and
Thermal Data Sheet, while State 1 (highest) was set equal to the normal CPU
state (i.e. fid/vid when powernow-k8.ko is not loaded). I assume that my CPU has
only two P-states as 2600+ and other Semprons. Resulting PST entries are:

State 0: fid = 0x2 (1000 MHz) vid = 0x12 (1100 mV)
State 1: fid = 0xA (1800 MHz) vid = 0xA  (1300 mV)

Mr. Keck, if you could approve (or correct) these values, I would be very
grateful to you.

After making these changes driver was loaded successfully. I was able to change
CPU frequency through cpufreq sysfs interface and observe the changes both in
/proc/cpuinfo and sysfs. Hurray!

[Sorry for a long comment. I hope it will be useful for those who experience the
same problem as me and can't update BIOS for some reason]
Comment 11 Valentine Sinitsyn 2006-02-12 03:19:02 UTC
Created attachment 7298 [details]
Workaround for my broken BIOS

This is workaround to make my Sempron 3000+ working. Warning: don't use it
directly _on your_ system. It is intended to be only an illustration, not a
general solution.
Comment 12 hans 2006-02-12 18:37:16 UTC
Hi! I'm using an MSI s270 and I'm getting the same problem as stefano's with the
2.6.15 kernels.

I updated to the latest bios from MSI and still no go.
Comment 13 Cor van Wandelen 2006-02-12 21:28:53 UTC
Same problem here using a MSI MS-6702 K8T Neo-FIS2R with an AMD64 2 Ghz.
I am already using the latest bios (v2.20) for some time now. 
Comment 14 Valentine Sinitsyn 2006-02-13 23:14:31 UTC
Today, after my request, MaxSelect have published an updated BIOS which solved
problem for me. Btw, I was mistaken in guessing P-states: there are three of them.
Comment 15 Dave Keck 2006-02-14 04:40:09 UTC
Valentine,

I'm glad to hear you got a good working BIOS.  Sorry it took until today to get
back with you but you were correct that the Mobile Sempron datasheets were not
on the main AMD website, that's where I go to get them also.  It took me a day
to find the data sheet.  That is correct also that the Mobile Sempron 3000+ has
3 P-states. 

For you folks with MSI boards you'll need to contact MSI and have them update
their BIOS.

Thanks,

Dave Keck
Advanced Micro Devices
Comment 16 Valentine Sinitsyn 2006-02-14 05:38:57 UTC
Dave,

thank you for you replies. It is very nice to see such a good support for Linux
kernel form AMD itself. It's just a matter of curiosity now, but where are
Mobile Sempron datasheets? Are they available publically or just to BIOS makers
etc? Thanks in advance.

Note You need to log in before you can comment on or make changes to this bug.