From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 25 14:40:40 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 6F90916A4CE for ; Thu, 25 Mar 2004 14:40:40 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DF3143D2F for ; Thu, 25 Mar 2004 14:40:40 -0800 (PST) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Thu, 25 Mar 2004 17:40:34 -0500 Message-ID: From: Don Bowman To: 'Doug Ambrisko' , Don Bowman Date: Thu, 25 Mar 2004 17:40:33 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" 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:40:40 -0000 From: Doug Ambrisko [mailto:ambrisko@ambrisko.com] > 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. > SMI under freebsd? Ha ha... Good luck! It didn't look very easy. The SMM, for those who don't know it, is a virtual 86, real-mode thing, at a location in ram which is locked and unaccessible unless you are in smm mode :) If you are lucky, your bios didn't lock you out of it. there's an NMI_NOW in the ICH which can be used to programmatically cause an NMI. Some systems route this funny when in SMP mode... [ie nowhere???]. Some systems may have problems with this and the jumper/button for generating NMI.