--- p4.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) Index: mcelog-0.7/p4.c =================================================================== --- mcelog-0.7.orig/p4.c +++ mcelog-0.7/p4.c @@ -28,6 +28,8 @@ #include "nehalem.h" #include "dunnington.h" +#define BANK_THERMAL 128 + /* decode mce for P4/Xeon and Core2 family */ static inline int test_prefix(int nr, __u32 value) @@ -274,10 +276,25 @@ static void decode_mcg(__u64 mcgstatus) Wprintf("\n"); } +static void decode_thermal(struct mce *log) +{ + if (log->status & 1) + Wprintf("Processor core is above trip temperature. " + "Throttling enabled.\n"); + else + Wprintf("Processor core below trip temperature. " + "Throttling disabled\n"); +} + void decode_intel_mc(struct mce *log, int cputype) { int cpu = log->cpu; + if (log->bank == BANK_THERMAL) { + decode_thermal(log); + return; + } + decode_mcg(log->mcgstatus); decode_mci(log->status, cpu); @@ -306,6 +323,8 @@ void decode_intel_mc(struct mce *log, in char *intel_bank_name(int num) { static char bname[64]; + if (num == BANK_THERMAL) + return "THERMAL EVENT"; sprintf(bname, "BANK %d", num); return bname; }