static bool k8_mc2_mce(u16 ec, u8 xec) { bool ret = true; if (xec == 0x1) pr_cont(" in the write data buffers.\n"); else if (xec == 0x3) pr_cont(" in the victim data buffers.\n"); else if (xec == 0x2 && MEM_ERROR(ec)) pr_cont(": %s error in the L2 cache tags.\n", R4_MSG(ec)); else if (xec == 0x0) { if (TLB_ERROR(ec)) pr_cont(": %s error in a Page Descriptor Cache or " "Guest TLB.\n", TT_MSG(ec)); else if (BUS_ERROR(ec)) pr_cont(": %s/ECC error in data read from NB: %s.\n", R4_MSG(ec), PP_MSG(ec)); else if (MEM_ERROR(ec)) { u8 r4 = R4(ec); if (r4 >= 0x7) pr_cont(": %s error during data copyback.\n", R4_MSG(ec)); else if (r4 <= 0x1) pr_cont(": %s parity/ECC error during data " "access from L2.\n", R4_MSG(ec)); else ret = false; } else ret = false; } else ret = false; return ret; }
static inline void amd_decode_err_code(u16 ec) { pr_emerg(HW_ERR "cache level: %s", LL_MSG(ec)); if (BUS_ERROR(ec)) pr_cont(", mem/io: %s", II_MSG(ec)); else pr_cont(", tx: %s", TT_MSG(ec)); if (MEM_ERROR(ec) || BUS_ERROR(ec)) { pr_cont(", mem-tx: %s", R4_MSG(ec)); if (BUS_ERROR(ec)) pr_cont(", part-proc: %s (%s)", PP_MSG(ec), TO_MSG(ec)); } pr_cont("\n"); }
static void decode_mc2_mce(struct mce *m) { u16 ec = EC(m->status); u8 xec = XEC(m->status, xec_mask); pr_emerg(HW_ERR "MC2 Error"); if (xec == 0x1) pr_cont(" in the write data buffers.\n"); else if (xec == 0x3) pr_cont(" in the victim data buffers.\n"); else if (xec == 0x2 && MEM_ERROR(ec)) pr_cont(": %s error in the L2 cache tags.\n", R4_MSG(ec)); else if (xec == 0x0) { if (TLB_ERROR(ec)) pr_cont(": %s error in a Page Descriptor Cache or " "Guest TLB.\n", TT_MSG(ec)); else if (BUS_ERROR(ec)) pr_cont(": %s/ECC error in data read from NB: %s.\n", R4_MSG(ec), PP_MSG(ec)); else if (MEM_ERROR(ec)) { u8 r4 = R4(ec); if (r4 >= 0x7) pr_cont(": %s error during data copyback.\n", R4_MSG(ec)); else if (r4 <= 0x1) pr_cont(": %s parity/ECC error during data " "access from L2.\n", R4_MSG(ec)); else goto wrong_mc2_mce; } else goto wrong_mc2_mce; } else goto wrong_mc2_mce; return; wrong_mc2_mce: pr_emerg(HW_ERR "Corrupted MC2 MCE info?\n"); }