Subject: IDT Winchip C6 - broken TSC, slow system clock
To: None <>
From: cpctc <>
List: tech-kern
Date: 06/22/2001 22:07:57
I have an IDT Winchip C6, netbsd 1.5.  When I boot up, I see:
cpu0: IDT WinChip C6 (586-class)

followed by something like "broken TSC disabled".

The system boots and works just fine; the clock ("date" command, and "top")
ticks at 1 second per second, as expected.

Then I play an MP3 with amp or mpeg123.  While the song is playing, after
about 30 seconds, the clock slows down to about 1 second per four real time
seconds.  The MP3 plays fine and finishes without error, but the clock never
fixed itself and requires a reboot.

I've searched for info on this; freebsd allows the following command:
sysctrl -w kern.timecounter.hardware=i8254

.. which should ignore the broken TSC register and use the i8254 chip for
keeping time.

I haven't found a way to do this in netbsd, however the kernel already knows
the TSC feature is no good, so why am I having this problem?

Do soundblaster drivers or mp3 players require or reset the TSC which could
screw up the clock?

Any help appreciated; dmesg follows:

NetBSD 1.5 (my_GENERIC) #3: Mon Jun 18 21:52:20 EDT 2001
cpu0: IDT WinChip C6 (586-class)
total memory = 65152 KB
avail memory = 57328 KB
using 840 buffers containing 3360 KB of memory
BIOS32 rev. 0 found at 0xf39bc
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 2
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82434LX/NX PCI, Cache and Memory Controller (PCMC) (rev. 0x10)
pciide0 at pci0 dev 1 function 0: PC Technology RZ1000 (rev. 0x01)
pciide0: hardware does not support DMA
pciide0: primary channel wired to compatibility mode
pciide0: primary channel interrupting at irq 14
wd0 at pciide0 channel 0 drive 0: <ST36530A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 6208 MB, 13456 cyl, 15 head, 63 sec, 512 bytes/sect x 12715920 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (other hardware responding at addresses)
pcib0 at pci0 dev 2 function 0
pcib0: Intel 82378ZB System I/O (SIO) (rev. 0x03)
ahc1 at pci0 dev 6 function 0
ahc1: interrupting at irq 9
ahc1: aic7850 Single Channel A, SCSI Id=7, 3/255 SCBs
ahc1: Host Adapter Bios disabled.  Using default SCSI device parameters
scsibus0 at ahc1 channel 0: 8 targets, 8 luns per target
vga1 at pci0 dev 14 function 0: ATI Technologies Mach64 GU (rev. 0x9a)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
isa0 at pcib0
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
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus0 at wdc1 channel 0
cd0 at atapibus0 drive 1: <FX140S, , e11> type 5 cdrom removable
cd0: drive supports PIO mode 3, DMA mode 2
lpt0 at isa0 port 0x378-0x37b irq 7
we0 at isa0 port 0x280-0x29f iomem 0xd0000-0xd3fff irq 3
we0: SMC8216/SMC8216C Ethernet (16-bit)
we0: Ethernet address 00:00:c0:96:4b:8e
sb0 at isa0 port 0x220-0x237 irq 5 drq 1 drq2 5: dsp v4.12
audio0 at sb0: full duplex, mmap, independent
midi0 at sb0: SB MIDI UART
opl0 at sb0: model OPL3
midi1 at opl0: SB Yamaha OPL3
pcppi0 at isa0 port 0x61
midi2 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask ef45 netmask ef4d ttymask ffcf
scsibus0: waiting 2 seconds for devices to settle...
ahc1: target 6 synchronous at 10.0MHz, offset = 0xf
ahc1: target 6 using tagged queuing
cd1 at scsibus0 target 6 lun 0: <SAF, CD-RW226, 1.12> SCSI2 5/cdrom
probe(ahc1:6:1): Sense Error Code 0x0
probe(ahc1:6:2): Sense Error Code 0x0
probe(ahc1:6:3): Sense Error Code 0x0
probe(ahc1:6:4): Sense Error Code 0x0
probe(ahc1:6:5): Sense Error Code 0x0
probe(ahc1:6:6): Sense Error Code 0x0
probe(ahc1:6:7): Sense Error Code 0x0
wd0: no disk label
boot device: fd0
root on we0
.. boot via bootp ..