Re: ichwd for ICH8

From: Mike Tancsa <mike_at_sentex.net>
Date: Thu, 26 Jul 2007 16:35:51 -0400
At 04:14 PM 7/26/2007, Dag-Erling Smørgrav wrote:
>Mike Tancsa <mike_at_sentex.net> writes:
> > Any chance to commit this to the tree ? It works really well with a
> > number of newer chipsets out there, that the old ichwd does not work
> > with.
>
>Turns out my new ICH8 motherboard has the WDT disabled in hardware, so I
>can't test this myself.  Please test the following patch:
>
>   http://people.freebsd.org/~des/software/ichwd-20070726.diff

Thanks!  On RELENG_6,

0[image62]# patch < ichwd-20070726.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/dev/ichwd/ichwd.c
|===================================================================
|RCS file: /home/ncvs/src/sys/dev/ichwd/ichwd.c,v
|retrieving revision 1.9
|diff -u -r1.9 ichwd.c
|--- sys/dev/ichwd/ichwd.c      27 Mar 2007 21:03:36 -0000      1.9
|+++ sys/dev/ichwd/ichwd.c      26 Jul 2007 20:03:46 -0000
--------------------------
Patching file sys/dev/ichwd/ichwd.c using Plan A...
Hunk #1 succeeded at 51.
Hunk #2 succeeded at 73.
Hunk #3 succeeded at 104.
Hunk #4 succeeded at 115.
Hunk #5 succeeded at 154.
Hunk #6 succeeded at 165.
Hunk #7 succeeded at 259.
Hunk #8 succeeded at 289.
Hunk #9 succeeded at 332.
Hunk #10 succeeded at 376.
Hunk #11 succeeded at 421.
Hunk #12 succeeded at 432.
Hunk #13 succeeded at 455.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/dev/ichwd/ichwd.h
|===================================================================
|RCS file: /home/ncvs/src/sys/dev/ichwd/ichwd.h,v
|retrieving revision 1.3
|diff -u -r1.3 ichwd.h
|--- sys/dev/ichwd/ichwd.h      17 Feb 2006 18:46:18 -0000      1.3
|+++ sys/dev/ichwd/ichwd.h      26 Jul 2007 16:20:22 -0000
--------------------------
Patching file sys/dev/ichwd/ichwd.h using Plan A...
Hunk #1 succeeded at 32.
Hunk #2 succeeded at 55.
Hunk #3 succeeded at 76.
Hunk #4 succeeded at 99.
Hunk #5 succeeded at 130.
done
0[image62]#


But I get
0[image62]# make
Warning: Object directory not changed from original /usr/src/sys/modules/ichwd
cc -O2 -pipe -fno-strict-aliasing -Werror 
-D_KERNEL -DKLD_MODULE -nostdinc -I-   -I. -I_at_ 
-I_at_/contrib/altq -I_at_/../include 
-finline-limit=8000 
-fno-common  -mno-align-long-strings 
-mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow 
-mno-sse -mno-sse2 -ffreestanding -Wall 
-Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline 
-Wcast-qual  -fformat-extensions -std=c99 -c 
/usr/src/sys/modules/ichwd/../../dev/ichwd/ichwd.c
/usr/src/sys/modules/ichwd/../../dev/ichwd/ichwd.c: 
In function `ichwd_clear_noreboot':
/usr/src/sys/modules/ichwd/../../dev/ichwd/ichwd.c:228: 
warning: implicit declaration of function `device__printf'
/usr/src/sys/modules/ichwd/../../dev/ichwd/ichwd.c:228: 
warning: nested extern declaration of `device__printf'
*** Error code 1

Stop in /usr/src/sys/modules/ichwd.
1[image62]#


If I change device__printf to device_printf it 
compiles and I can load it, but it doesnt work

0[image62]# kldload ./ichwd.ko
0[image62]# dmesg | tail -10
da0 at twa0 bus 0 target 0 lun 0
da0: <AMCC 9650SE-2LP DISK 3.06> Fixed Direct Access SCSI-5 device
da0: 100.000MB/s transfers
da0: 76283MB (156227584 512 byte sectors: 255H 63S/T 9724C)
Trying to mount root from ufs:/dev/ad4s1a
ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> on isa0
ichwd0: unable to reserve GCS registers
device_attach: ichwd0 attach returned 6
ppc0: parallel port not found.
0[image62]#

0[image62]# watchdogd -t 20
70[image62]# ps -aux | grep dog
root      1731  0.0  0.0  1632  1032  p0  S+    4:21PM   0:00.00 grep dog
0[image62]#

Same error on current

ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> on isa0
ichwd0: ICH WDT present but disabled in BIOS or hardware
device_attach: ichwd0 attach returned 6
ppc0: parallel port not found.
leopard3# uname -a
FreeBSD leopard3.netperf.freebsd.org 7.0-CURRENT 
FreeBSD 7.0-CURRENT #20: Mon Jul 23 11:58:00 EDT 
2007 
rwatson_at_zoo.freebsd.org:/zoo/usr.obj/rwatson/current/src/sys/GENERIC  i386
leopard3#

Using the patch as is in
http://lists.freebsd.org/pipermail/freebsd-bugs/2007-April/023828.html

0[image62]# dmesg | tail -10
ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> on isa0
ichwd0: unable to reserve GCS registers
device_attach: ichwd0 attach returned 6
ppc0: parallel port not found.
ichwd module unloaded
ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> at port 0x430-0x437,0x460-0x469 on isa0
ichwd0: Intel ICH7 watchdog timer (TCO version 2)
ppc0: parallel port not found.
0[image62]# watchdogd -t 20
0[image62]# killall -9 watchdogd
0[image62]#
0[image62]# pwd
/usr/src/sys/modules/ichwd
0[image62]#

The box reboots in ~ 20 seconds

On CURRENT

leopard3# dmesg | tail -10
ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> on isa0
ichwd0: ICH WDT present but disabled in BIOS or hardware
device_attach: ichwd0 attach returned 6
ppc0: parallel port not found.
ichwd module unloaded
ichwd module loaded
ichwd0: <Intel ICH7 watchdog timer> at port 0x1080-0x1087,0x1088-0x1091 on isa0
ichwd0: Intel ICH7 watchdog timer (TCO version 2)
ppc0: parallel port not found.
leopard3# watchdogd -t 20
leopard3#

But it doesnt kill it. I will have to check that 
boxes BIOS to see if its disabled, which is likely

         ---Mike

>DES
>--
>Dag-Erling Smørgrav - des_at_des.no
Received on Thu Jul 26 2007 - 18:36:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC