# ichwd... FTW!



## nsayer (Jun 12, 2010)

I've been fooling around with our server in the garage a bit more lately than I have in the past. One thing I did was just go through /etc/defaults/rc.conf to see what was new since last time I looked.... and I discovered watchdogd_enable.

"Hmm, what's this?"

Well, long and short, I discovered that it links up with the ichwd device to provide a hardware watchdog. If watchdogd doesn't "report in" every so often to the ichwd device, the machine will get a hard reset. I tested this by giving watchdogd a kill -9 and waiting (it has to be a -9 because -1 and -15 give watchdogd a chance to disable the hardware watchdog under the presumption that you are stopping it because you don't want it to run, not because you want it to cold-cock the machine). Sure enough, a few seconds later the machine reboot.

So


```
echo 'ichwd_load="YES"' >> /boot/loader.conf
kldload ichwd
echo 'watchdogd_enable="YES"' >> /etc/rc.conf
/etc/rc.d/watchdogd start
```

If attempting to load ichwd doesn't work, it may be because you lack the corresponding hardware or because that hardware may be disabled in the BIOS or some such. The driver attempts to discover this when loaded.

So far as I can tell, from /sys/amd64/conf/NOTES, the ichwd is the only hardware watchdog available.


----------



## DutchDaemon (Jun 12, 2010)

nsayer said:
			
		

> I've been fooling around with our server in the garage



I think this belongs in the 'I love FreeBSD' topic!

Never mind.


----------



## jem (Jul 28, 2010)

Hi nsayer,

Having just built a new box around the Intel D510MO atom board, I decided to try out this watchdog malarky.

Loading the module worked and confirmed:


```
Jul 28 10:23:01 gate kernel: ichwd module loaded
Jul 28 10:23:01 gate kernel: ppc0: cannot reserve I/O port range
```


```
# kldstat | grep ichwd
 6    1 0xffffffff81227000 189c     ichwd.ko
```

Starting watchdogd didn't, however:


```
# grep watchdog /etc/rc.conf
watchdogd_enable="YES"
# /etc/rc.d/watchdogd start
Starting watchdogd.
/etc/rc.d/watchdogd: WARNING: failed to start watchdogd
```

Any idea what the problem might be?  Could that ppc0 message be relevant?


----------



## KingKone (Sep 7, 2011)

Hi jem,

i've got the same problem with an Atom based board (Zotak ZBOX) NM10 Express chipset !

http://lists.freebsd.org/pipermail/freebsd-bugs/2010-January/038202.html

The only thing was the missing DeviceID, i've added it to the module, recompiled it and now it works!

I love FreeBSD!


----------

