freebsd-dev/sys/i386
John Baldwin 9dc0b3d54f 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 <machine/mca.h>).
    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
2009-05-13 17:53:04 +00:00
..
acpica At least one BIOS bogusly includes duplicate entries for I/O APICs. The 2009-03-05 16:03:44 +00:00
bios Oops, sorry. Fix for fix. 2009-05-04 08:41:54 +00:00
compile
conf - Use "device\t" and "options \t" for consistency. 2009-05-10 00:00:25 +00:00
cpufreq Remove unused variables. 2009-05-12 22:11:02 +00:00
i386 Implement simple machine check support for amd64 and i386. 2009-05-13 17:53:04 +00:00
ibcs2 Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
include Implement simple machine check support for amd64 and i386. 2009-05-13 17:53:04 +00:00
isa Rename statclock_disable variable to atrtcclock_disable that it actually is, 2009-05-03 17:47:21 +00:00
linux Do not export AT_CLKTCK when emulating Linux kernel prior 2009-05-10 18:43:43 +00:00
pci Fall back to using configuration type 1 accesses for PCI config requests if 2009-03-24 18:10:22 +00:00
svr4 Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
xbox In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
xen Rename statclock_disable variable to atrtcclock_disable that it actually is, 2009-05-03 17:47:21 +00:00
Makefile Update entries for building tags. 2007-05-13 18:21:54 +00:00