From owner-svn-src-head@FreeBSD.ORG Sat May 16 19:01:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E711065672 for ; Sat, 16 May 2009 19:01:11 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8BF8FC18 for ; Sat, 16 May 2009 19:01:11 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id F1DDA2C2A81; Sat, 16 May 2009 13:39:33 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KEjew2GLRVkG; Sat, 16 May 2009 13:39:26 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 2A1072C2A7E; Sat, 16 May 2009 13:39:26 -0500 (CDT) Message-ID: <4A0F085D.6000202@cs.rice.edu> Date: Sat, 16 May 2009 13:39:25 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.21 (X11/20090404) MIME-Version: 1.0 To: John Baldwin References: <200905131753.n4DHr4YL063065@svn.freebsd.org> In-Reply-To: <200905131753.n4DHr4YL063065@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r192050 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2009 19:01:11 -0000 John Baldwin wrote: > Author: jhb > Date: Wed May 13 17:53:04 2009 > New Revision: 192050 > URL: http://svn.freebsd.org/changeset/base/192050 > > Log: > Implement simple machine check support for amd64 and i386. > - For CPUs that only support MCE (the machine check exception) but not MCA > (i.e. Pentium), all this does is print out the value of the machine check > registers and then panic when a machine check exception occurs. > - For CPUs that support MCA (the machine check architecture), the support is > a bit more involved. > - First, there is limited support for decoding the CPU-independent MCA > error codes in the kernel, and the kernel uses this to output a short > description of any machine check events that occur. > - When a machine check exception occurs, all of the MCx banks on the > current CPU are scanned and any events are reported to the console > before panic'ing. > - To catch events for correctable errors, a periodic timer kicks off a > task which scans the MCx banks on all CPUs. The frequency of these > checks is controlled via the "hw.mca.interval" sysctl. > - Userland can request an immediate scan of the MCx banks by writing > a non-zero value to "hw.mca.force_scan". > - If any correctable events are encountered, the appropriate details > are stored in a 'struct mca_record' (defined in ). > The "hw.mca.count" is a count of such records and each record may > be queried via the "hw.mca.records" tree by specifying the record > index (0 .. count - 1) as the next name in the MIB similar to using > PIDs with the kern.proc.* sysctls. The idea is to export machine > check events to userland for more detailed processing. > - The periodic timer and hw.mca sysctls are only present if the CPU > supports MCA. > > Discussed with: emaste (briefly) > MFC after: 1 month > > Added: > head/sys/amd64/amd64/mca.c (contents, props changed) > head/sys/amd64/include/mca.h (contents, props changed) > head/sys/i386/i386/mca.c (contents, props changed) > head/sys/i386/include/mca.h (contents, props changed) > Modified: > head/sys/amd64/amd64/machdep.c > head/sys/amd64/amd64/mp_machdep.c > head/sys/amd64/amd64/trap.c > head/sys/amd64/include/specialreg.h > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/i386/i386/machdep.c > head/sys/i386/i386/mp_machdep.c > head/sys/i386/i386/trap.c > head/sys/i386/include/specialreg.h > After this change my Phenom II locks up hard within minutes of booting. There are no messages, and I am unable to break into the debugger from a serial console. The same exact kernel is running fine on a Core 2 Quad. Regards, Alan