kern/126736: [ichwd] [patch] ICH10 support
Olivier Smedts
olivier at gid0.org
Fri Aug 22 13:10:03 UTC 2008
>Number: 126736
>Category: kern
>Synopsis: [ichwd] [patch] ICH10 support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 22 13:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Olivier Smedts
>Release: FreeBSD 7.0-STABLE amd64
>Organization:
<gid0.org>
>Environment:
System: FreeBSD z.gid0.org 7.0-STABLE FreeBSD 7.0-STABLE #0: Thu Aug 21 23:17:33 CEST 2008 root at z.gid0.org:/work/obj/work/src/sys/QUAD amd64
Hardware : ASUS P5Q3 Deluxe motherboard, with Intel Core 2 Quad Q9450 CPU.
GENERIC-like kernel, with the following modules :
# kldstat
Id Refs Address Size Name
1 11 0xffffffff80100000 5df4f8 kernel
2 1 0xffffffff806e0000 1a880 snd_hda.ko
3 2 0xffffffff806fb000 67458 sound.ko
4 1 0xffffffff80763000 4f78 ichsmb.ko
5 2 0xffffffff80768000 24a0 smbus.ko
6 1 0xffffffff8076b000 3508 ichwd.ko
7 1 0xffffffff8076f000 2d10 acpi_aiboost.ko
8 1 0xffffffffb0d99000 4ba1 tmpfs.ko
9 1 0xffffffffb0e1b000 4976 if_lagg.ko
>Description:
I patched ichwd.c and ichwd.h to have a hardware watchdog support on my ICH10-based motherboard.
Patch contents :
- tab-ify
- sort
- add support for various ICH chipsets, pci ids 0x24dc, 0x27b0, 0x2811, 0x2919, 0x2917 (vendor 0x8086)
- add support for ICH10 and ICH10-based chipsets, pci ids 0x3a18, 0x3a1a, 0x3a14, 0x3a1 (vendor 0x8086)
IDs found in Intel ICH chipsets Windows drivers (.inf).
>How-To-Repeat:
The patch has been tested on ICH10R hardware.
dmesg output after verbose boot with the patched ichwd.ko module loaded (ichwd0 not detected without patch) :
Aug 20 23:26:26 z kernel: ichwd0: <Intel ICH10R watchdog timer> on isa0
Aug 20 23:26:26 z kernel: isab0: found ICH10 or equivalent chipset: Intel ICH10R watchdog timer
Aug 20 23:26:26 z kernel: ichwd0: Intel ICH10R watchdog timer (ICH10 or equivalent)
Aug 20 23:26:26 z kernel: ichwd0: timer disabled
dmesg output after launching watchdogd (by hand or with rc script and watchdogd_enable="YES"), still verbose mode :
Aug 20 23:26:27 z kernel: ichwd0: timer enabled
Aug 20 23:26:27 z kernel: ichwd0: timeout set to 28 ticks
Aug 20 23:26:27 z kernel: ichwd0: timer reloaded
Aug 20 23:26:27 z kernel: ichwd0: timer reloaded
Aug 20 23:26:28 z kernel: ichwd0: timer reloaded
Aug 20 23:26:34 z last message repeated 6 times
Aug 20 23:26:35 z kernel: ichwd0: timer reloaded
Aug 20 23:26:36 z kernel: ichwd0: timer reloaded
Aug 20 23:26:42 z last message repeated 6 times
Aug 20 23:26:43 z kernel: ichwd0: timer reloaded
Aug 20 23:27:05 z last message repeated 22 times
Aug 20 23:27:06 z kernel: ichwd0: timer reloaded
Aug 20 23:27:37 z last message repeated 31 times
Aug 20 23:29:38 z last message repeated 121 times
watchdogd running :
# ps auxww | grep watchdog
root 721 0,0 0,0 6816 924 ?? Ss 9:03 0:00,29 /usr/sbin/watchdogd
root 60812 0,0 0,1 7888 1192 p1 R+ 14:39 0:00,00 grep watchdog
I then tested the watchdog by setting incorrect RAM timings in BIOS. A "make -j4 buildkernel" hardware froze the computer, it rebooted after 16 seconds.
>Fix:
Apply the following patch in /usr/src/. It should apply against STABLE and HEAD as they're in sync.
Thanks.
--- PATCH begins here ---
--- sys/dev/ichwd/ichwd.h.orig 2008-08-20 21:35:40.000000000 +0200
+++ sys/dev/ichwd/ichwd.h 2008-08-20 22:10:09.000000000 +0200
@@ -73,6 +73,7 @@
#define DEVICEID_82801DB 0x24c0
#define DEVICEID_82801DBM 0x24cc
#define DEVICEID_82801E 0x2450
+#define DEVICEID_82801EB 0x24dc
#define DEVICEID_82801EBR 0x24d0
#define DEVICEID_6300ESB 0x25a1
#define DEVICEID_82801FBR 0x2640
@@ -80,16 +81,24 @@
#define DEVICEID_ICH6W 0x2642
#define DEVICEID_63XXESB 0x2670
#define DEVICEID_ICH7 0x27b8
+#define DEVICEID_ICH7DH 0x27b0
#define DEVICEID_ICH7M 0x27b9
#define DEVICEID_ICH7MDH 0x27bd
#define DEVICEID_ICH8 0x2810
#define DEVICEID_ICH8DH 0x2812
#define DEVICEID_ICH8DO 0x2814
#define DEVICEID_ICH8M 0x2815
+#define DEVICEID_ICH8ME 0x2811
#define DEVICEID_ICH9 0x2918
-#define DEVICEID_ICH9R 0x2916
#define DEVICEID_ICH9DH 0x2912
#define DEVICEID_ICH9DO 0x2914
+#define DEVICEID_ICH9M 0x2919
+#define DEVICEID_ICH9ME 0x2917
+#define DEVICEID_ICH9R 0x2916
+#define DEVICEID_ICH10 0x3a18
+#define DEVICEID_ICH10D 0x3a1a
+#define DEVICEID_ICH10DO 0x3a14
+#define DEVICEID_ICH10R 0x3a16
/* ICH LPC Interface Bridge Registers (ICH5 and older) */
#define ICH_GEN_STA 0xd4
--- sys/dev/ichwd/ichwd.c.orig 2008-08-20 21:35:46.000000000 +0200
+++ sys/dev/ichwd/ichwd.c 2008-08-20 22:13:30.000000000 +0200
@@ -82,23 +82,32 @@
{ DEVICEID_82801DB, "Intel 82801DB watchdog timer", 4 },
{ DEVICEID_82801DBM, "Intel 82801DBM watchdog timer", 4 },
{ DEVICEID_82801E, "Intel 82801E watchdog timer", 5 },
- { DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer", 5 },
+ { DEVICEID_82801EB, "Intel 82801EB watchdog timer", 5 },
+ { DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer", 5 },
{ DEVICEID_6300ESB, "Intel 6300ESB watchdog timer", 5 },
- { DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer", 6 },
+ { DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer", 6 },
{ DEVICEID_ICH6M, "Intel ICH6M watchdog timer", 6 },
{ DEVICEID_ICH6W, "Intel ICH6W watchdog timer", 6 },
{ DEVICEID_ICH7, "Intel ICH7 watchdog timer", 7 },
+ { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 },
{ DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 },
{ DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 },
{ DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 },
{ DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 },
{ DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 },
- { DEVICEID_ICH8M, "Intel ICH8M watchdog timer", 8 },
+ { DEVICEID_ICH8M, "Intel ICH8M watchdog timer", 8 },
+ { DEVICEID_ICH8ME, "Intel ICH8M-E watchdog timer", 8 },
{ DEVICEID_63XXESB, "Intel 63XXESB watchdog timer", 8 },
{ DEVICEID_ICH9, "Intel ICH9 watchdog timer", 9 },
- { DEVICEID_ICH9R, "Intel ICH9R watchdog timer", 9 },
{ DEVICEID_ICH9DH, "Intel ICH9DH watchdog timer", 9 },
{ DEVICEID_ICH9DO, "Intel ICH9DO watchdog timer", 9 },
+ { DEVICEID_ICH9M, "Intel ICH9M watchdog timer", 9 },
+ { DEVICEID_ICH9ME, "Intel ICH9M-E watchdog timer", 9 },
+ { DEVICEID_ICH9R, "Intel ICH9R watchdog timer", 9 },
+ { DEVICEID_ICH10, "Intel ICH10 watchdog timer", 10 },
+ { DEVICEID_ICH10D, "Intel ICH10D watchdog timer", 10 },
+ { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer", 10 },
+ { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 },
{ 0, NULL, 0 },
};
--- PATCH ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list