Subject: Failure of PowerNow! on amd64 -current
To: None <current-users@netbsd.org>
From: Scott Ellis <scotte@warped.com>
List: current-users
Date: 04/02/2007 19:52:50
I upgraded my amd64 system from -current Feb 22 to -current Apr 2, and 
found that PowerNow! seems to cause an immediate hang (not even dropping 
to DDB...just a solid lockup).

Here's what I get in single-user, changing the frequency manually:

# sysctl -a | grep power
sysctl: warning: /var/run/dev.db: No such file or directory
machdep.powernow.frequency.target = 2200
machdep.powernow.frequency.current = 2200
machdep.powernow.frequency.available = 1000 1800 2000 2200
# sysctl -w machdep.powernow.frequency.target=1000
k

(yes, that "k" is all that's printed before the hang...it may be the 
last gasp of the serial port before the crash!)

The above (and more importantly, estd) works fine on the Feb 22 kernel.

What info can I collect to help debug?

A dmesg follows.

	ScottE


 >> NetBSD/amd64 BIOS Boot, Revision 3.3
 >> (scotte@intrepid, Fri Apr  7 19:53:08 PDT 2006)
 >> Memory: 637/1046784 k
Press return to boot now, any other key for boot menu
booting hd0a:netbsd - starting in 0
type "?" or "help" for help.
 > boot hd0a:netbsd.debug -s
booting hd0a:netbsd.debug (howto 0x2)
2658640+353848+285208 [260952+175060]=0x490cc0
Loaded initial symtab at 0xffffffff80526050, strtab at 
0xffffffff805660e8, # entries 10857
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007
     The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

NetBSD 4.99.16 (INTREPID.AMD64.DEBUG) #0: Mon Apr  2 19:09:41 PDT 2007
 
scotte@intrepid:/nbu/source/netbsd/src/obj.amd64/nbu/source/netbsd/src/sys/arch/amd64/compile/INTREPID.AMD64.DEBUG
total memory = 1022 MB
avail memory = 979 MB
mainbus0 (root)
cpu0 at mainbus0 apid 0: (boot processor)
cpu0: AMD Athlon(tm) 64 Processor 3400+, 2202.92 MHz
cpu0: features: e7dbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features: e7dbfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,NOX,MMXX,MMX>
cpu0: features: e7dbfbff<FXSR,SSE,SSE2,LONG,3DNOW2,3DNOW>
cpu0: AMD Power Management features: f<TTP,VID,FID,TS>
cpu0: AMD Cool`n'Quiet Technology 2200 MHz
cpu0: available frequencies (Mhz): 1000 1800 2000 2200
cpu0: WARNING: AMD errata present, BIOS upgrade may be
cpu0: WARNING: necessary to ensure reliable operation
cpu0: 16 page colors
ioapic0 at mainbus0 apid 1
acpi0 at mainbus0: Advanced Configuration and Power Interface
ACPI-Fast 24-bit timer
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
PNP0A03 at acpi0 not configured
PNP0000 at acpi0 not configured
PNP0200 at acpi0 not configured
PNP0100 at acpi0 not configured
PNP0B00 at acpi0 not configured
PNP0800 at acpi0 not configured
PNP0C04 at acpi0 not configured
fdc0 at acpi0 (PNP0700)
fdc0: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
fdc0: expected BUFFER, got 4
lpt0 at acpi0 (PNP0400-1)
lpt0: io 0x378-0x37f irq 7
PNP0C02 at acpi0 not configured
PNP0C02 at acpi0 not configured
com0 at acpi0 (PNP0501-2)
com0: io 0x2f8-0x2ff irq 3
com0: ns16550a, working fifo
com1 at acpi0 (PNP0501-1)
com1: io 0x3f8-0x3ff irq 4
com: ns16550a, working fifo
com1: console
PNP0C01 at acpi0 not configured
acpibut0 at acpi0 (PNP0C0C-170): ACPI Power Button
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
acpibut1 at acpi0 (PNP0C0E): ACPI Sleep Button
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1106 product 0x3188 (rev. 0x01)
agp at pchb0 not configured
ppb0 at pci0 dev 1 function 0: vendor 0x1106 product 0xb188 (rev. 0x00)
pci1 at ppb0 bus 1
pci1: memory space enabled
skc0 at pci0 dev 10 function 0: ioapic0 pin 17 (irq 11)
skc0: Marvell Yukon Lite Gigabit Ethernet rev. A3(0x7)
sk0 at skc0 port A: Ethernet address 00:11:2f:38:83:e7
makphy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
ex0 at pci0 dev 11 function 0: 3Com 3c905B-TX 10/100 Ethernet (rev. 0x30)
ex0: interrupting at ioapic0 pin 16 (irq 5)
ex0: MAC address 00:50:04:78:77:9c
exphy0 at ex0 phy 24: 3Com internal media interface
exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ex1 at pci0 dev 14 function 0: 3Com 3c905B-TX 10/100 Ethernet (rev. 0x30)
ex1: interrupting at ioapic0 pin 19 (irq 11)
ex1: MAC address 00:10:5a:0f:35:6f
exphy1 at ex1 phy 24: 3Com internal media interface
exphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
viaide0 at pci0 dev 15 function 0
viaide0: VIA Technologies VT8237 SATA Controller (rev. 0x80)
viaide0: using ioapic0 pin 20 (irq 11) for native-PCI interrupt
atabus0 at viaide0 channel 0
atabus1 at viaide0 channel 1
viaide1 at pci0 dev 15 function 1
viaide1: VIA Technologies VT8237 ATA133 controller
viaide1: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus2 at viaide1 channel 0
viaide1: secondary channel interrupting at ioapic0 pin 15 (irq 15)
atabus3 at viaide1 channel 1
uhci0 at pci0 dev 16 function 0: vendor 0x1106 product 0x3038 (rev. 0x81)
uhci0: interrupting at ioapic0 pin 21 (irq 5)
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 16 function 1: vendor 0x1106 product 0x3038 (rev. 0x81)
uhci1: interrupting at ioapic0 pin 21 (irq 5)
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 16 function 2: vendor 0x1106 product 0x3038 (rev. 0x81)
uhci2: interrupting at ioapic0 pin 21 (irq 11)
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3 at pci0 dev 16 function 3: vendor 0x1106 product 0x3038 (rev. 0x81)
uhci3: interrupting at ioapic0 pin 21 (irq 11)
usb3 at uhci3: USB revision 1.0
uhub3 at usb3
uhub3: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 16 function 4: vendor 0x1106 product 0x3104 (rev. 0x86)
ehci0: interrupting at ioapic0 pin 21 (irq 10)
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
uhub4 at usb4
uhub4: vendor 0x1106 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
pcib0 at pci0 dev 17 function 0
pcib0: vendor 0x1106 product 0x3227 (rev. 0x00)
auvia0 at pci0 dev 17 function 5: VIA Technologies VT8237 AC'97 Audio 
(rev 0x60)
auvia0: interrupting at ioapic0 pin 22 (irq 10)
auvia0: ac97: Analog Devices AD1980 codec; headphone, 20 bit DAC, no 3D 
stereo
auvia0: ac97: ext id 3c7<AMAP,LDAC,SDAC,CDAC,SPDIF,DRA,VRA>
audio0 at auvia0: full duplex, mmap, independent
pchb1 at pci0 dev 24 function 0
pchb1: vendor 0x1022 product 0x1100 (rev. 0x00)
pchb2 at pci0 dev 24 function 1
pchb2: vendor 0x1022 product 0x1101 (rev. 0x00)
pchb3 at pci0 dev 24 function 2
pchb3: vendor 0x1022 product 0x1102 (rev. 0x00)
pchb4 at pci0 dev 24 function 3
pchb4: vendor 0x1022 product 0x1103 (rev. 0x00)
isa0 at pcib0
lm0 at isa0 port 0x290-0x297: Winbond W83697HF Hardware monitor
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Initializing SSP:d73d93193dfabf06 fde9d4d05c408aed 9d86502bbc2a4121 
544ecd79c5bc57f9 5e0f4e4e74089032 797045bdafd84ef4 c88341dbc884c3a6 
59deac78d12a6868
raidattach: Asked for 2 units
Kernelized RAIDframe activated
swwdog0: software watchdog initialized
viaide0 port 0: device present, speed: 1.5Gb/s
viaide0 port 1: device present, speed: 1.5Gb/s
wd0 at atabus0 drive 0: <WDC WD5000YS-01MPB0>
wd0: 465 GB, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors
wd1 at atabus1 drive 0: <WDC WD5000YS-01MPB0>
wd1: 465 GB, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors
ehci0: handing over full speed device on port 4 to uhci1
uhub4: port 4, device disappeared after reset
ehci0: handing over full speed device on port 7 to uhci3
uhub4: port 7, device disappeared after reset
Searching for RAID components...
Component on: wd0a: 976773105
    Row: 0 Column: 1 Num Rows: 1 Num Columns: 2
    Version: 2 Serial Number: 2006111312 Mod Counter: 588
    Clean: No Status: 0
    sectPerSU: 128 SUsPerPU: 1 SUsPerRU: 1
    RAID Level: 1  blocksize: 512 numBlocks: 976772992
    Autoconfig: Yes
    Contains root partition: Yes
    Last configured as: raid1
Component on: wd1a: 976773105
    Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
    Version: 2 Serial Number: 2006111312 Mod Counter: 588
    Clean: No Status: 0
    sectPerSU: 128 SUsPerPU: 1 SUsPerRU: 1
    RAID Level: 1  blocksize: 512 numBlocks: 976772992
    Autoconfig: Yes
    Contains root partition: Yes
    Last configured as: raid1
Found: wd1a at 0
Found: wd0a at 1
RAID autoconfigure
Configuring raid1:
Starting autoconfiguration of RAID set...
Looking for 0 in autoconfig
Found: wd1a at 0
Looking for 1 in autoconfig
Found: wd0a at 1
raid1: allocating 20 buffers of 65536 bytes.
raid1: RAID Level 1
raid1: Components: /dev/wd1a /dev/wd0a
raid1: Total Sectors: 976772992 (476939 MB)
raid1: configured ok
boot device: raid1
root on raid1a dumps on raid1b
mountroot: trying lfs...
mountroot: trying ffs...
root file system type: ffs
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
Enter pathname of shell or RETURN for /bin/sh: uplcom0 at uhub1 port 2
uplcom0: vendor 0x067b product 0x2303, rev 1.10/2.02, addr 2
ucom0 at uplcom0
umass0 at uhub3 port 1 configuration 1 interface 0
umass0: USB Solid state disk, rev 1.10/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Mobile, Drive, 1.11> disk removable
sd0: fabricating a geometry
sd0: 64512 KB, 63 cyl, 64 head, 32 sec, 512 bytes/sect x 129024 sectors

#
# sysctl -a | grep power
sysctl: warning: /var/run/dev.db: No such file or directory
machdep.powernow.frequency.target = 2200
machdep.powernow.frequency.current = 2200
machdep.powernow.frequency.available = 1000 1800 2000 2200
# sysctl -w machdep.powernow.frequency.target=1000
k