summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-05-13 17:53:04 +0000
committerjhb <jhb@FreeBSD.org>2009-05-13 17:53:04 +0000
commit370298a10816df8eee3cd3453607323546e4cf9c (patch)
treee92a8666a427cd3b54074a55134d6d643f102bf6 /sys/conf
parentdeae02e77d33ac35960ebc9548741d1c2b9a22c2 (diff)
downloadFreeBSD-src-370298a10816df8eee3cd3453607323546e4cf9c.zip
FreeBSD-src-370298a10816df8eee3cd3453607323546e4cf9c.tar.gz
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
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files.amd641
-rw-r--r--sys/conf/files.i3861
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 56e17d1..602d7e0 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -110,6 +110,7 @@ amd64/amd64/legacy.c standard
amd64/amd64/local_apic.c standard
amd64/amd64/locore.S standard no-obj
amd64/amd64/machdep.c standard
+amd64/amd64/mca.c standard
amd64/amd64/mem.c optional mem
amd64/amd64/minidump_machdep.c standard
amd64/amd64/mp_machdep.c optional smp
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index d88be04..5a1ed91 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -278,6 +278,7 @@ i386/xen/locore.s optional xen no-obj
i386/i386/longrun.c optional cpu_enable_longrun
i386/i386/machdep.c standard
i386/xen/xen_machdep.c optional xen
+i386/i386/mca.c standard
i386/i386/mem.c optional mem
i386/i386/minidump_machdep.c standard
i386/i386/mp_clock.c optional smp
OpenPOWER on IntegriCloud