Subject: Re: proposal for changes to todr interface
To: Iain Hibbert <plunky@rya-online.net>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 09/11/2006 11:37:02
Iain Hibbert wrote:
> On Wed, 6 Sep 2006, Garrett D'Amore wrote:
>
>   
>> I want to propose a few more changes to the todr interface "driver
>> interface" (struct todr_chip_handle), and I'd like to get opinions:
>>     
>
> I guess you've made some changes now. I get this:
>
> Sep 11 09:55:42 galant /netbsd: WARNING: preposterous TOD clock time
> Sep 11 09:55:42 galant /netbsd: WARNING: using filesystem time
> Sep 11 09:55:42 galant /netbsd: WARNING: CHECK AND RESET THE DATE!
>
> and the clock is wrong (I just booted, its 11.30)
>
> I tried to reset the date (using the date command) but it does not persist
> across boots.. that time is the time I shutdown.
>
> Toshiba Tecra 8100 laptop, full dmesg attached
>   

Hmmm... the main thing I've changed is that I don't believe a date that
is more than 2 days older than the last file system update, and I
complain about it.

I think we need to find out what time is being reported by the TOD clock
on your system.  Perhaps your battery is dead?

Take a look at arch/x86/isa/clock.c, maybe you can dump the dates being
reported there?

    -- Garrett
> ideas?
>
> iain
> ------------------------------------------------------------------------
>
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
>     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.1 (GALANT) #1: Sun Sep 10 18:41:06 BST 2006
> 	plunky@galant:/var/obj/sys/arch/i386/compile/GALANT
> total memory = 255 MB
> avail memory = 247 MB
> sysctl_createv: sysctl_create(security) returned 17
> timecounter: Timecounters tick every 10.000 msec
> timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
> timecounter: selected timecounter "i8254" frequency 1193182 Hz quality 100
> BIOS32 rev. 0 found at 0xfc376
> PCI BIOS rev. 2.1 found at 0xfee03
> pcibios: config mechanism [1][x], special cycles [x][x], last bus 21
> PCI IRQ Routing Table rev. 1.0 found at 0xf4ee0, size 192 bytes (10 entries)
> PCI Interrupt Router at 000:05:0 (vendor 0x8086 product 0x122e compatible)
> pciintr_link_alloc: bus 0 device 7: link 0xff invalid
> ------------------------------------------
>   device vendor product pin PIRQ IRQ stage
> ------------------------------------------
> 000:05:2 0x8086 0x7112   D  0x03  11  0    already assigned
> 000:09:0 0x1179 0x0d01   A  0x02  11  0    already assigned
> 000:11:0 0x1179 0x0617   A  0x00  11  0    fixed up
> 000:11:1 0x1179 0x0617   B  0x01  11  0    fixed up
> 000:12:0 0x1073 0x0010   A  0x03  11  0    already assigned
> 001:00:0 0x5333 0x8c10   A  0x02  11  0    already assigned
> ------------------------------------------
> mainbus0 (root)
> pci_addr_fixup: 000:11:0 0x1179 0x0617 new address 0x10000000
> pci_addr_fixup: 000:11:1 0x1179 0x0617 new address 0x10001000
> cpu0 at mainbus0: (uniprocessor)
> cpu0: Intel Pentium III (686-class), 797.08 MHz, id 0x686
> cpu0: features 387f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
> cpu0: features 387f9ff<PGE,MCA,CMOV,PAT,PSE36,PN,MMX>
> cpu0: features 387f9ff<FXSR,SSE>
> cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
> cpu0: L2 cache 256 KB 32B/line 8-way
> cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
> cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
> cpu0: serial number 0000-0686-0003-F5EB-10C2-5A1D
> cpu0: 8 page colors
> 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 0x7190 (rev. 0x03)
> agp0 at pchb0: aperture at 0xd0000000, size 0x10000000
> ppb0 at pci0 dev 1 function 0: vendor 0x8086 product 0x7191 (rev. 0x03)
> pci1 at ppb0 bus 1
> pci1: i/o space, memory space enabled
> vga1 at pci1 dev 0 function 0: vendor 0x5333 product 0x8c10 (rev. 0x11)
> wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
> wsmux1: connecting to wsdisplay0
> pcib0 at pci0 dev 5 function 0
> pcib0: vendor 0x8086 product 0x7110 (rev. 0x02)
> piixide0 at pci0 dev 5 function 1
> piixide0: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
> piixide0: bus-master DMA support present
> piixide0: primary channel wired to compatibility mode
> piixide0: primary channel interrupting at irq 14
> atabus0 at piixide0 channel 0
> piixide0: secondary channel wired to compatibility mode
> piixide0: secondary channel interrupting at irq 15
> atabus1 at piixide0 channel 1
> uhci0 at pci0 dev 5 function 2: vendor 0x8086 product 0x7112 (rev. 0x01)
> uhci0: interrupting at irq 11
> usb0 at uhci0: USB revision 1.0
> uhub0 at usb0
> uhub0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> vendor 0x8086 product 0x7113 (miscellaneous bridge, revision 0x03) at pci0 dev 5 function 3 not configured
> vendor 0x11c1 product 0x0441 (miscellaneous communications, revision 0x01) at pci0 dev 7 function 0 not configured
> oboe0 at pci0 dev 9 function 0: Toshiba Fast Infrared Type O, revision 0
> oboe0: interrupting at irq 11
> irframe0 at oboe0: SIR, MIR, FIR
> cbb0 at pci0 dev 11 function 0: vendor 0x1179 product 0x0617 (rev. 0x20)
> cbb1 at pci0 dev 11 function 1: vendor 0x1179 product 0x0617 (rev. 0x20)
> yds0 at pci0 dev 12 function 0: vendor 0x1073 product 0x0010 (rev. 0x02)
> yds0: interrupting at irq 11
> yds0: ac97: Asahi Kasei AK4544 codec; headphone, 18 bit DAC, 18 bit ADC, AKM 3D
> yds0: ac97: ext id 201<AMAP,VRA>
> audio0 at yds0: full duplex, mmap, independent
> 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
> pms0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pms0 mux 0
> attimer0 at isa0 port 0x40-0x43: AT Timer
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: PC speaker (CPU-intensive output)
> sysbeep0 at pcppi0
> npx0 at isa0 port 0xf0-0xff
> npx0: using exception 16
> fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
> pcppi0: attached to attimer0
> cbb0: interrupting at irq 11
> cardslot0 at cbb0 slot 0 flags 0
> cardbus0 at cardslot0: bus 2
> pcmcia0 at cardslot0
> cbb1: interrupting at irq 11
> cardslot1 at cbb1 slot 1 flags 0
> cardbus1 at cardslot1: bus 3
> pcmcia1 at cardslot1
> opl0 at yds0: model OPL3
> midi1 at opl0: DS-1 integrated Yamaha OPL3 (CPU-intensive output)
> mpu0 at yds0
> midi2 at mpu0: Yamaha DS-1 MIDI UART (CPU-intensive output)
> apm0 at mainbus0: Advanced Power Management BIOS: Power Management spec V1.2
> timecounter: Timecounter "TSC" frequency 797099630 Hz quality 800
> timecounter: selected timecounter "TSC" frequency 797099630 Hz quality 800
> timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
> fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
> fd1 at fdc0 drive 1: density unknown
> wd0 at atabus0 drive 0: <SAMSUNG MP0603H>
> wd0: drive supports 16-sector PIO transfers, LBA48 addressing
> wd0: 57231 MB, 116280 cyl, 16 head, 63 sec, 512 bytes/sect x 117210240 sectors
> wd0: 32-bit data port
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
> atapibus0 at atabus1: 2 targets
> cd0 at atapibus0 drive 0: <UJDA720 DVD/CDRW, , 1.00> cdrom removable
> cd0: 32-bit data port
> cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
> cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
> boot device: wd0
> root on wd0a dumps on wd0b
> root file system type: ffs
> WARNING: preposterous TOD clock time
> WARNING: using filesystem time
> WARNING: CHECK AND RESET THE DATE!
> 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)
> wi0 at pcmcia0 function 0: <Dell, TrueMobile 1150 Series PC Card, Version 01.01, >
> wi0: 802.11 address 00:02:2d:a4:e0:4f
> wi0: using Lucent Technologies, WaveLAN/IEEE
> wi0: Lucent Firmware: Station (8.72.1)
> wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
>   


-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191