aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/mca.h
Commit message (Collapse)AuthorAgeFilesLines
* Move the <machine/mca.h> header to <x86/mca.h>.John Baldwin2010-11-011-56/+0
| | | | Notes: svn path=/head/; revision=214630
* Restore the machine check register banks on resume. For banks beingJohn Baldwin2010-06-151-0/+1
| | | | | | | | | | monitored via CMCI, reset the interrupt threshold to 1 on resume. Reviewed by: jkim MFC after: 2 weeks Notes: svn path=/head/; revision=209212
* Add support for corrected machine check interrupts. CMCI is a new localJohn Baldwin2010-05-241-0/+1
| | | | | | | | | | | | | | | | | | | APIC interrupt that fires when a threshold of corrected machine check events is reached. CMCI also includes a count of events when reporting corrected errors in the bank's status register. Note that individual banks may or may not support CMCI. If they do, each bank includes its own threshold register that determines when the interrupt fires. Currently the code uses a very simple strategy where it doubles the threshold on each interrupt until it succeeds in throttling the interrupt to occur only once a minute (this interval can be tuned via sysctl). The threshold is also adjusted on each hourly poll which will lower the threshold once events stop occurring. Tested by: Sailaja Bangaru sbappana at yahoo com MFC after: 1 month Notes: svn path=/head/; revision=208507
* - Extend the machine check record structure to include several fields usefulJohn Baldwin2010-03-161-0/+5
| | | | | | | | | | | | | | for parsing model-specific and other fields in machine check events including the global machine check capabilities and status registers, CPU identification, and the FreeBSD CPU ID. - Report these added fields in the console log of a machine check so that a record structure can be reconstituted from the console messages. - Parse new architectural errors including memory controller errors. MFC after: 1 week Notes: svn path=/head/; revision=205214
* mca: improve status checking, recording and reportingAndriy Gapon2009-12-021-0/+1
| | | | | | | | | | | | | - directly print mca information in case we fail to allocate memory for a record - include bank number into mca record - print raw mca status value for extended information Reviewed by: jhb MFC after: 10 days Notes: svn path=/head/; revision=200033
* Implement simple machine check support for amd64 and i386.John Baldwin2009-05-131-0/+48
- 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 Notes: svn path=/head/; revision=192050