From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 12:05:32 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70427106566B for ; Sat, 7 Aug 2010 12:05:32 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id DACD58FC18 for ; Sat, 7 Aug 2010 12:05:31 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 719F8A5E5C4; Sat, 7 Aug 2010 20:05:29 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id W+Jvbw5tlt0Q; Sat, 7 Aug 2010 20:05:22 +0800 (CST) Received: from delta.delphij.net (c-24-4-100-103.hsd1.ca.comcast.net [24.4.100.103]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 27299A5E59B; Sat, 7 Aug 2010 20:05:20 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=nFLIoIdLwO5JX4uutF9+X4SpsE5l//fdq8yycNar6drx5Kk60haKnfw1cc7I9tA7C LYPZ7KyxFAhKBomnLx99w== Message-ID: <4C5D4BFD.9080803@delphij.net> Date: Sat, 07 Aug 2010 05:05:17 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100721 Thunderbird/3.0.6 ThunderBrowse/3.3.1 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4C2B07F5.6030801@delphij.net> <4C2B4D35.8060903@feral.com> <86lj9wmbrz.fsf@ds4.des.no> <4C2BBF3C.4070503@delphij.net> <86hbkkmad1.fsf@ds4.des.no> <4C2BD498.3090704@delphij.net> <86d3v7n093.fsf@ds4.des.no> In-Reply-To: <86d3v7n093.fsf@ds4.des.no> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Matthew Jacob , d@delphij.net, freebsd-hackers@freebsd.org Subject: Winbond Watchdog [Was Re: Supermicro BIOS's watchdog feature?] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2010 12:05:32 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/07/01 00:12, Dag-Erling Smørgrav wrote: > Xin LI writes: >> "Dag-Erling Smørgrav" writes: >>> Perhaps the motherboard has additional watchdog hardware? If you >>> disable the watchdog in BIOS, does ichwd still work? >> If I kill -9 watchdogd the system do reset itself so I think ichwd(4) >> really works even if BIOS setting is 'Disabled' (but I'm not sure if >> this method is right? Looking at the code I think the answer is >> probably "Yes" though) > > Yes. This confirms my hypothesis, which is that your motherboard has > additional watchdog hardware, and that the BIOS setting controls that, > not the ichwd watchdog timer. Just disable the watchdog in BIOS and use > ichwd instead. Thanks, you are absolutely correct that they are using another watchdog (on Winbond Super I/O chip). With help from some datasheets floating around the Internet and playing with the motherboard a little bit, now I have a first cut of a watchdog(9) interfaced driver for the chip and have confirmed working on the motherboard. I'm still polishing up the driver, there seems to be no way to figure out the base port address directly (datasheet said it's either 0x2e and 0x4e) so for now I have its device identify method to do some dirty hacks (outb/inb directly) and only check if with appropriate key entered to the port we will get non-0xff value. I'm not sure if that would be acceptable? I'll try to further read the spec and see if we have some better way of doing this and publish the driver code hopefully in the next week. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMXUv9AAoJEATO+BI/yjfBd3QIAMi3JV5+kQA9Mq6VJvs307jM GStdcuG0zXfXIsS4H4r8VYdphUD8aTk10QNCXBLnXSW5fZjFMlyEocpPlSn1Jtah TM1uApjc5rrAIdM9S0GQxPUdJLvc7O3okTsQRnze0Nv8EvO0p6ZQinRjMJT/1qfH CuggvbTsAO9Yg5N65CsbHIUgPm1vu5a/uyFVN7nhpWtzaCuex+mB0n1r5qObPqY2 UaiF/s3SFssJtx27cwCo4KuuLhX9aI/qaDzjpmpBXIGY//gGYjW5cd180bW8V744 abWfVExqQqtdRLXqacrjWeUyrRE27pZ6ghj/6cRBwK018GLweFntX9p5SJ9S3Rs= =cK+Y -----END PGP SIGNATURE-----