Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wbwd(4) [freebsd man page]

WBWD(4) 						   BSD Kernel Interfaces Manual 						   WBWD(4)

NAME
wbwd -- device driver for watchdog timer found on Winbond Super I/O chips SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device wbwd Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): wbwd_load="YES" DESCRIPTION
The wbwd driver provides watchdog(4) support for the watchdog interrupt timer present on at least the following Winbond Super I/O chips: o 83627HF/F/HG/G Rev. G o 83627HF/F/HG/G Rev. J o 83627HF/F/HG/G Rev. UD-A o 83627DHG IC ver. 5 SYSCTL VARIABLES
The wbwd driver provides the following options as sysctl(8) variables. dev.wbwd.0.timeout_override This variable allows to program the timer to a value independent on the one provided by the watchdog(4) framework while still relying on the regular updates from e.g. watchdogd(8). This is particularly useful if your system provides multiple watchdogs and you want them to fire in a special sequence to trigger an NMI after a shorter period than the reset timeout for example. The value set must not be lower than the sleep time of watchdogd(8). A value of 0 disables this feature and the timeout value provided by watchdog(4) will be used. dev.wbwd.0.debug_verbose If set this sysctl will tell the driver to log its current state before and after the timer reset on each invocation from watchdog(9) to the kernel message buffer for debugging. dev.wbwd.0.debug This read-only value gives the state of some registers on last update. The wbwd driver also provides further sysctl options that are hidden by default. See the source code for more information. SEE ALSO
watchdog(4), device.hints(5), watchdog(8), watchdogd(8), watchdog(9) HISTORY
The wbwd driver first appeared in FreeBSD 10.0. AUTHORS
This manual page was written by Bjoern A. Zeeb <bz@FreeBSD.org>. BSD
December 28, 2012 BSD

Check Out this Related Man Page

WATCHDOG(4)						   BSD Kernel Interfaces Manual 					       WATCHDOG(4)

NAME
watchdog -- hardware and software watchdog SYNOPSIS
#include <sys/watchdog.h> DESCRIPTION
The watchdog facility is used for controlling hardware and software watchdogs. The device /dev/fido responds to a single ioctl(2) call, WDIOCPATPAT. It takes a single argument which represents a timeout value specified as a power of two nanoseconds, or-ed with a flag selecting active or passive control of the watchdog. WD_ACTIVE indicates that the watchdog will be kept from timing out from userland, for instance by the watchdogd(8) daemon. WD_PASSIVE indi- cates that the watchdog will be kept from timing out from the kernel. The ioctl(2) call will return success if just one of the available watchdog(9) implementations supports setting the timeout to the specified timeout. This means that at least one watchdog is armed. If the call fails, for instance if none of watchdog(9) implementations support the timeout length, all watchdogs are disabled and must be explicitly re-enabled. To disable the watchdogs pass WD_TO_NEVER. If disarming the watchdog(s) failed an error is returned. The watchdog might still be armed! RETURN VALUES
The ioctl returns zero on success and non-zero on failure. [EOPNOTSUPP] No watchdog present in the kernel or none of the watchdogs supports the requested timeout value (timeout value other than 0). [EOPNOTSUPP] Watchdog could not be disabled (timeout value of 0). [EINVAL] Invalid flag combination passed. EXAMPLES
#include <paths.h> #include <sys/watchdog.h> #define WDPATH "/dev/" _PATH_WATCHDOG int wdfd = -1; static void wd_init(void) { wdfd = open(WDPATH, O_RDWR); if (wdfd == -1) err(1, WDPATH); } static void wd_reset(u_int timeout) { if (ioctl(wdfd, WDIOCPATPAT, &timeout) == -1) err(1, "WDIOCPATPAT"); } /* in main() */ wd_init(); wd_reset(WD_ACTIVE|WD_TO_8SEC); /* potential freeze point */ wd_reset(WD_TO_NEVER); Enables a watchdog to recover from a potentially freezing piece of code. options SW_WATCHDOG in your kernel config adds a software watchdog in the kernel, dropping to KDB or panic-ing when firing. SEE ALSO
watchdogd(8), watchdog(9) HISTORY
The watchdog code first appeared in FreeBSD 5.1. AUTHORS
The watchdog facility was written by Poul-Henning Kamp <phk@FreeBSD.org>. The software watchdog code and this manual page were written by Sean Kelly <smkelly@FreeBSD.org>. Some contributions were made by Jeff Roberson <jeff@FreeBSD.org>. BUGS
The WD_PASSIVE option has not yet been implemented. BSD
December 21, 2009 BSD
Man Page