From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 25 14:17:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A37D16A4CF; Thu, 25 Mar 2004 14:17:06 -0800 (PST) Received: from www.ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 148C743D2F; Thu, 25 Mar 2004 14:17:06 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.9p2/8.12.9) with ESMTP id i2PMH5Cf089511; Thu, 25 Mar 2004 14:17:05 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.9p2/8.12.9/Submit) id i2PMH5nN089509; Thu, 25 Mar 2004 14:17:05 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200403252217.i2PMH5nN089509@ambrisko.com> In-Reply-To: To: Don Bowman Date: Thu, 25 Mar 2004 14:17:05 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: Scott Long cc: "Wm. Daryl Hawkins" cc: freebsd-hackers@freebsd.org Subject: Re: Intel i8xx watchdog driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 22:17:06 -0000 Don Bowman writes: | The Intel ICH3 (and probably all) has the feature it can | issue an SMI on first count-down to 0, then a hard reset | on 2nd. What we did was implement an SMM handler (in bios) | that, when called due to watchdog, issued an NMI and did | a return from smm. | In FreeBSD, an NMI handler caught this (sometimes :), | poke around to send a bit of data out to serial, moved the | timer to the maximum value without reseting it, and then | called panic [after mucking with cpl etc to pretend to | own all locks :] | If the NMI handler didn't get run, the hardware counted | to 0 again and reset. | If the NMI handler did get run, and then wedged somehow | in the panic or whatever, the hardware counted to 0, | and the system reset. | If all worked well, you got a core, but at a minimum | the system reset, and usually you got at least the | serial output of some of the 'why'. | | The SMI is non-maskable (and higher priority than NMI). That sounds pretty cool. There was some bits in the ICH that prevented an NMI to get to the CPU unless set a certain way. I was generating an NMI via the PCI but. BTW you can do the paper clip trick on PCI. The ICH seemed to be only one shot so it de-bounced it. I could get multiple on a CPU NMI pin. How hard is to setup and trap SMI via a FreeBSD only solution? I haven't really looked much at that area but sounds useful. Doug A.