NetBSD Problem Report #41733

From wiz@yt.nih.at  Wed Jul 15 09:18:16 2009
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id A1ACF63B883
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Jul 2009 09:18:16 +0000 (UTC)
Message-Id: <20090715085115.0CCAD39FF51@yt.nih.at>
Date: Wed, 15 Jul 2009 10:51:15 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: Xeon 3520: CPU MHz wrong -> timecounter wrong
X-Send-Pr-Version: 3.95

>Number:         41733
>Category:       kern
>Synopsis:       Xeon 3520: CPU MHz wrong -> timecounter wrong
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 15 09:20:00 +0000 2009
>Last-Modified:  Sun Aug 23 21:10:03 +0000 2009
>Originator:     Thomas Klausner
>Release:        NetBSD 5.99.15
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:


System: NetBSD yt 5.99.15 NetBSD 5.99.15 (YT) #10: Wed Jul 15 08:33:35 CEST 2009 wiz@yt:/archive/cvs/src/sys/arch/amd64/compile/obj/YT amd64
Architecture: x86_64
Machine: amd64
>Description:
While updating from a kernel 20090712 to 20090714 and trimming down unused
drivers/options[*], the recognition of the CPUs changed:
-cpu0 at mainbus0 apid 0: Intel 686-class, 2672MHz, id 0x106a5
+cpu0 at mainbus0 apid 0: Intel 686-class, 3207MHz, id 0x106a5
Note the difference in MHz.

cpuctl identify 0 says:
# cpuctl identify 0
cpu0: Intel Core i7 (Nehalem) (686-class), 3207.36 MHz, id 0x106a5
cpu0: features  0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features  0xbfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR>
cpu0: features  0xbfebfbff<SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 0x9ce3bd<SSE3,DTES64,MONITOR,DS-CPL,VMX,EST,TM2,SSSE3,CX16>
cpu0: features2 0x9ce3bd<xTPR,PDCM,DCA,SSE41,SSE42,POPCNT>
cpu0: features3 0x28100800<SYSCALL/SYSRET,XD,EM64T>
cpu0: features4 0x1<LAHF>
cpu0: "Intel(R) Xeon(R) CPU           W3520  @ 2.67GHz"
cpu0: I-cache 32KB 64B/line 4-way, D-cache 32KB 64B/line 8-way
cpu0: L2 cache 256KB 64B/line 8-way
cpu0: ITLB 64 4KB entries 4-way
cpu0: DTLB 64 4KB entries 4-way
cpu0: L3 cache 8MB 64B/line 16-way
cpu0: Initial APIC ID 0
cpu0: Cluster/Package ID 0
cpu0: Core ID 0
cpu0: SMT ID 0
cpu0: family 06 model 0a extfamily 00 extmodel 01

So the first MHz line was correct.

That in itself would just be wrong, but not a problem. However, it
affects timecounter and thus the system time:
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
-timecounter: Timecounter "TSC" frequency 2672830680 Hz quality 3000
+timecounter: Timecounter "TSC" frequency 3207408280 Hz quality 3000

The clock is now slow on this machine.

ad & joerg suggested the following patch (sorry about the whitespace):
Index: cpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/cpu.c,v
retrieving revision 1.63
diff -u -r1.63 cpu.c
--- cpu.c       27 Mar 2009 19:53:19 -0000      1.63
+++ cpu.c       15 Jul 2009 09:14:51 -0000
@@ -1047,12 +1047,17 @@
 cpu_get_tsc_freq(struct cpu_info *ci)
 {
        uint64_t last_tsc;
+       u_long psl;

+       i8254_delay(10);
+       psl = x86_read_psl();
+       x86_disable_intr();
        if (ci->ci_feature_flags & CPUID_TSC) {
                last_tsc = rdmsr(MSR_TSC);
                i8254_delay(100000);
                ci->ci_data.cpu_cc_freq = (rdmsr(MSR_TSC) - last_tsc) * 10;
        }
+       x86_write_psl(psl);
 }

 void

That changed the timecounter line to
timecounter: Timecounter "TSC" frequency 3207359080 Hz quality 3000
(slightly different value than above, but still majorly different to before).

[*] I've since rebooted with a GENERIC kernel from 20090714, but
the MHz are still wrong.

dmesg of the machine with GENERIC of 20090714:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009
    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 5.99.15 (YT) #8: Tue Jul 14 12:26:25 CEST 2009
	root@yt.nih.at:/archive/cvs/src/sys/arch/amd64/compile/obj/YT
total memory = 12279 MB
avail memory = 11894 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
System manufacturer System Product Name (System Version)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 3207MHz, id 0x106a5
cpu1 at mainbus0 apid 2: Intel 686-class, 3207MHz, id 0x106a5
cpu2 at mainbus0 apid 4: Intel 686-class, 3207MHz, id 0x106a5
cpu3 at mainbus0 apid 6: Intel 686-class, 3207MHz, id 0x106a5
cpu4 at mainbus0 apid 1: Intel 686-class, 3207MHz, id 0x106a5
cpu5 at mainbus0 apid 3: Intel 686-class, 3207MHz, id 0x106a5
cpu6 at mainbus0 apid 5: Intel 686-class, 3207MHz, id 0x106a5
cpu7 at mainbus0 apid 7: Intel 686-class, 3207MHz, id 0x106a5
ioapic0 at mainbus0 apid 8: pa 0xfec00000, version 20, 24 pins
ioapic1 at mainbus0 apid 9: pa 0xfec8a000, version 20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20080321
acpi0: X/RSDT: OemId <021309,RSDT2047,20090213>, AslId <MSFT,00000097>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
attimer0 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pcppi0 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi0: PC speaker (CPU-intensive output)
sysbeep0 at pcppi0
aiboost0 at acpi0 (ASOC, ATK0110-16843024)
aiboost0: ASUS AI Boost Hardware monitor
hpet0 at acpi0 (HPET, PNP0103): mem 0xfed00000-0xfed003ff
timecounter: Timecounter "hpet0" frequency 14318179 Hz quality 2000
FWH (INT0800) at acpi0 not configured
WMI1 (pnp0c14) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
attimer0: attached to pcppi0
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 0x8086 product 0x3405 (rev. 0x12)
ppb0 at pci0 dev 1 function 0: vendor 0x8086 product 0x3408 (rev. 0x12)
ppb0: unsupported PCI Express version
pci1 at ppb0 bus 1
pci1: memory space enabled, rd/line, wr/inv ok
ppb1 at pci1 dev 0 function 0: vendor 0x1033 product 0x0125 (rev. 0x06)
pci2 at ppb1 bus 3
pci2: no spaces enabled!
ppb2 at pci1 dev 0 function 1: vendor 0x1033 product 0x0125 (rev. 0x06)
ppb2: disabling notification events
pci3 at ppb2 bus 2
pci3: memory space enabled, rd/line, wr/inv ok
ppb3 at pci0 dev 3 function 0: vendor 0x8086 product 0x340a (rev. 0x12)
ppb3: unsupported PCI Express version
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
vga0 at pci4 dev 0 function 0: vendor 0x1002 product 0x5b60 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
drm at vga0 not configured
vendor 0x1002 product 0x5b70 (miscellaneous display) at pci4 dev 0 function 1 not configured
ppb4 at pci0 dev 7 function 0: vendor 0x8086 product 0x340e (rev. 0x12)
ppb4: unsupported PCI Express version
pci5 at ppb4 bus 5
pci5: no spaces enabled!
vendor 0x8086 product 0x3425 (interrupt system, revision 0x12) at pci0 dev 16 function 0 not configured
vendor 0x8086 product 0x3426 (interrupt system, revision 0x12) at pci0 dev 16 function 1 not configured
vendor 0x8086 product 0x342e (interrupt system, revision 0x12) at pci0 dev 20 function 0 not configured
vendor 0x8086 product 0x3422 (interrupt system, revision 0x12) at pci0 dev 20 function 1 not configured
vendor 0x8086 product 0x3423 (interrupt system, revision 0x12) at pci0 dev 20 function 2 not configured
vendor 0x8086 product 0x3438 (interrupt system, revision 0x12) at pci0 dev 20 function 3 not configured
uhci0 at pci0 dev 26 function 0: vendor 0x8086 product 0x3a37 (rev. 0x00)
uhci0: interrupting at ioapic0 pin 16
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 26 function 1: vendor 0x8086 product 0x3a38 (rev. 0x00)
uhci1: interrupting at ioapic0 pin 21
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 26 function 2: vendor 0x8086 product 0x3a39 (rev. 0x00)
uhci2: interrupting at ioapic0 pin 19
usb2 at uhci2: USB revision 1.0
ehci0 at pci0 dev 26 function 7: vendor 0x8086 product 0x3a3c (rev. 0x00)
ehci0: interrupting at ioapic0 pin 18
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
azalia0 at pci0 dev 27 function 0: Generic High Definition Audio Controller
azalia0: interrupting at ioapic0 pin 22
azalia0: host: 0x8086/0x3a3e (rev. 0), HDA rev. 1.0
ppb5 at pci0 dev 28 function 0: vendor 0x8086 product 0x3a40 (rev. 0x00)
pci6 at ppb5 bus 9
pci6: i/o space, memory space enabled, rd/line, wr/inv ok
wm0 at pci6 dev 0 function 0: Intel i82574L, rev. 0
wm0: interrupting at ioapic0 pin 16
wm0: PCI-Express bus
wm0: FLASH
wm0: Ethernet address 00:1b:21:36:04:bf
ukphy0 at wm0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000ac2, model 0x000b, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ppb6 at pci0 dev 28 function 1: vendor 0x8086 product 0x3a42 (rev. 0x00)
pci7 at ppb6 bus 8
pci7: i/o space, memory space enabled, rd/line, wr/inv ok
re0 at pci7 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x02)
re0: interrupting at ioapic0 pin 17
re0: Ethernet address 00:24:8c:56:df:94
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 2
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ppb7 at pci0 dev 28 function 2: vendor 0x8086 product 0x3a44 (rev. 0x00)
pci8 at ppb7 bus 7
pci8: i/o space, memory space enabled, rd/line, wr/inv ok
re1 at pci8 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x02)
re1: interrupting at ioapic0 pin 18
re1: Ethernet address 00:24:8c:56:dc:c9
re1: using 256 tx descriptors
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 2
rgephy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ppb8 at pci0 dev 28 function 3: vendor 0x8086 product 0x3a46 (rev. 0x00)
pci9 at ppb8 bus 6
pci9: i/o space, memory space enabled, rd/line, wr/inv ok
ahcisata0 at pci9 dev 0 function 0: vendor 0x11ab product 0x6121
ahcisata0: interrupting at ioapic0 pin 19
ahcisata0: AHCI revision 1.0, 3 ports, 32 command slots, features 0xca226000
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
atabus2 at ahcisata0 channel 2
uhci3 at pci0 dev 29 function 0: vendor 0x8086 product 0x3a34 (rev. 0x00)
uhci3: interrupting at ioapic0 pin 23
usb4 at uhci3: USB revision 1.0
uhci4 at pci0 dev 29 function 1: vendor 0x8086 product 0x3a35 (rev. 0x00)
uhci4: interrupting at ioapic0 pin 19
usb5 at uhci4: USB revision 1.0
uhci5 at pci0 dev 29 function 2: vendor 0x8086 product 0x3a36 (rev. 0x00)
uhci5: interrupting at ioapic0 pin 18
usb6 at uhci5: USB revision 1.0
ehci1 at pci0 dev 29 function 7: vendor 0x8086 product 0x3a3a (rev. 0x00)
ehci1: interrupting at ioapic0 pin 23
ehci1: EHCI version 1.0
ehci1: companion controllers, 2 ports each: uhci3 uhci4 uhci5
usb7 at ehci1: USB revision 2.0
ppb9 at pci0 dev 30 function 0: vendor 0x8086 product 0x244e (rev. 0x90)
pci10 at ppb9 bus 10
pci10: memory space enabled
fwohci0 at pci10 dev 4 function 0: vendor 0x11c1 product 0x5811 (rev. 0x70)
fwohci0: interrupting at ioapic0 pin 19
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 8.
fwohci0: EUI64 00:1e:8c:00:01:ce:39:b4
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
pcib0 at pci0 dev 31 function 0
pcib0: vendor 0x8086 product 0x3a16 (rev. 0x00)
ahcisata1 at pci0 dev 31 function 2: vendor 0x8086 product 0x3a22
ahcisata1: interrupting at ioapic0 pin 19
ahcisata1: AHCI revision 1.2, 6 ports, 32 command slots, features 0xef22e0e0
atabus3 at ahcisata1 channel 0
atabus4 at ahcisata1 channel 1
atabus5 at ahcisata1 channel 2
atabus6 at ahcisata1 channel 3
atabus7 at ahcisata1 channel 4
atabus8 at ahcisata1 channel 5
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x3a30 (rev. 0x00)
ichsmb0: interrupting at ioapic0 pin 18
iic0 at ichsmb0: I2C bus
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 3207417600 Hz quality 3000
azalia0: codec[0]: 0x11d4/0x989b (rev. 3.0), HDA rev. 1.0
audio0 at azalia0: full duplex, independent
uhub0 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb3: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 6 ports with 6 removable, self powered
uhub3 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb7: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 6 ports with 6 removable, self powered
uhub5 at usb4: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
uhub6 at usb6: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub6: 2 ports with 2 removable, self powered
uhub7 at usb5: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub7: 2 ports with 2 removable, self powered
ahcisata1 port 1: device present, speed: 1.5Gb/s
ahcisata1 port 5: device present, speed: 3.0Gb/s
ahcisata1 port 0: device present, speed: 3.0Gb/s
ahcisata1 port 3: device present, speed: 3.0Gb/s
ahcisata1 port 2: device present, speed: 3.0Gb/s
wd0 at atabus3 drive 0: <INTEL SSDSA2MH080G1GC>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
atapibus0 at atabus4: 1 targets
cd0 at atapibus0 drive 0: <PIONEER DVD-RW  DVR-216D, HKDP436104WL, 1.09> cdrom removable
uhub8 at uhub4 port 1: vendor 0x03f0 product 0x2f24, class 9/0, rev 2.00/0.00, addr 2
uhub8: multiple transaction translators
uhub8: 6 ports with 6 removable, self powered
cd0: drive supports PIO mode 3, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
cd0(ahcisata1:1:0): using PIO mode 3, DMA mode 2, Ultra-DMA mode 4 (Ultra/66) (using DMA)
wd1 at atabus5 drive 0: <WDC WD1002FBYS-02A6B0>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 931 GB, 1938021 cyl, 16 head, 63 sec, 512 bytes/sect x 1953525168 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(ahcisata1:2:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
wd2 at atabus6 drive 0: <WDC WD1002FBYS-01A6B0>
wd2: drive supports 16-sector PIO transfers, LBA48 addressing
wd2: 931 GB, 1938021 cyl, 16 head, 63 sec, 512 bytes/sect x 1953525168 sectors
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd2(ahcisata1:3:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
wd3 at atabus8 drive 0: <SAMSUNG HD103UJ>
wd3: drive supports 16-sector PIO transfers, LBA48 addressing
wd3: 931 GB, 1938021 cyl, 16 head, 63 sec, 512 bytes/sect x 1953525168 sectors
wd3: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
wd3(ahcisata1:5:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
uhub9 at uhub5 port 2: vendor 0x05e3 USB Hub, class 9/0, rev 1.10/3.05, addr 2
uhub9: 4 ports with 4 removable, self powered
uhidev0 at uhub7 port 1 configuration 1 interface 0
uhidev0: Microsoft Microsoft 5-Button Mouse with IntelliEye(TM), rev 1.10/3.00, addr 2, iclass 3/1
ums0 at uhidev0: 5 buttons and Z dir.
wsmouse0 at ums0 mux 0
uhidev1 at uhub7 port 2 configuration 1 interface 0
uhidev1: vendor 0x099a USB Keyboard, rev 1.10/1.00, addr 3, iclass 3/1
ukbd0 at uhidev1
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

>How-To-Repeat:
Update kernel from 20090712 to 20090714, or just bad luck?

>Fix:
Correct the CPU GHz recognition?

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/41733: Xeon 3520: CPU MHz wrong -> timecounter wrong
Date: Fri, 17 Jul 2009 09:27:32 +0200

 On ad's suggestion that it might be an optimization problem, I
 compiled the kernel with
 	makeoptions     COPTS="-O0"
 but it didn't change a thing.
  Thomas

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Subject: re: kern/41733: Xeon 3520: CPU MHz wrong -> timecounter wrong
Date: Sat, 18 Jul 2009 12:27:50 +1000

 FWIW, my Q9450 sometimes reports the wrong speed too, though it
 does not seem to affect time.

 cpu0 at mainbus0 apid 0: Intel 686-class, 42028MHz, id 0x10677

 vs:

 cpu0: "Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz"

 i have kern.timecounter.hardware = hpet0.


 .mrg.

From: Thomas Klausner <wiz@NetBSD.org>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/41733: Xeon 3520: CPU MHz wrong -> timecounter wrong
Date: Sat, 18 Jul 2009 09:18:59 +0200

 On Sat, Jul 18, 2009 at 12:27:50PM +1000, matthew green wrote:
 > FWIW, my Q9450 sometimes reports the wrong speed too, though it
 > does not seem to affect time.
 > 
 > cpu0 at mainbus0 apid 0: Intel 686-class, 42028MHz, id 0x10677
 > 
 > vs:
 > 
 > cpu0: "Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz"
 > 
 > i have kern.timecounter.hardware = hpet0.

 Mine was set to "TSC" -- when I switch to hpet0, the time lost in 5
 minutes decreases from 50s to 0.004s. Thanks for the hint!

 So is it a bug with TSC or is it just caused by the wrong MHz
 recognition?
  Thomas

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/41733: Xeon 3520: CPU MHz wrong -> timecounter wrong
Date: Sun, 23 Aug 2009 23:05:49 +0200

 Today's reboot gave me:
 @@ -12,17 +12,17 @@
  timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
  System manufacturer System Product Name (System Version)
  mainbus0 (root)
 -cpu0 at mainbus0 apid 0: Intel 686-class, 3207MHz, id 0x106a5
 -cpu1 at mainbus0 apid 2: Intel 686-class, 3207MHz, id 0x106a5
 -cpu2 at mainbus0 apid 4: Intel 686-class, 3207MHz, id 0x106a5
 -cpu3 at mainbus0 apid 6: Intel 686-class, 3207MHz, id 0x106a5
 -cpu4 at mainbus0 apid 1: Intel 686-class, 3207MHz, id 0x106a5
 -cpu5 at mainbus0 apid 3: Intel 686-class, 3207MHz, id 0x106a5
 -cpu6 at mainbus0 apid 5: Intel 686-class, 3207MHz, id 0x106a5
 -cpu7 at mainbus0 apid 7: Intel 686-class, 3207MHz, id 0x106a5
 +cpu0 at mainbus0 apid 0: Intel 686-class, 2672MHz, id 0x106a5
 +cpu1 at mainbus0 apid 2: Intel 686-class, 2672MHz, id 0x106a5
 +cpu2 at mainbus0 apid 4: Intel 686-class, 2672MHz, id 0x106a5
 +cpu3 at mainbus0 apid 6: Intel 686-class, 2672MHz, id 0x106a5
 +cpu4 at mainbus0 apid 1: Intel 686-class, 2672MHz, id 0x106a5
 +cpu5 at mainbus0 apid 3: Intel 686-class, 2672MHz, id 0x106a5
 +cpu6 at mainbus0 apid 5: Intel 686-class, 2672MHz, id 0x106a5
 +cpu7 at mainbus0 apid 7: Intel 686-class, 2672MHz, id 0x106a5
  ioapic0 at mainbus0 apid 8: pa 0xfec00000, version 20, 24 pins
  ioapic1 at mainbus0 apid 9: pa 0xfec8a000, version 20, 24 pins
 -acpi0 at mainbus0: Intel ACPICA 20080321
 +acpi0 at mainbus0: Intel ACPICA 20090730

 So currently everything's back to normal, and the ACPI code was
 updated. No idea if the two are related or it's just coincidence.
  Thomas

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.