Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasdaemon: mce: decode io port for bus error #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions mce-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ static char *get_RRRR_str(uint8_t rrrr)
static void decode_mca(struct mce_event *e, uint64_t track, int *ismemerr)
{
uint32_t mca = e->status & 0xffffL;
uint64_t status = e->status;
uint64_t misc = e->misc;

if (mca & (1UL << 12)) {
mce_snprintf(e->mcastatus_msg,
Expand Down Expand Up @@ -265,6 +267,16 @@ static void decode_mca(struct mce_event *e, uint64_t track, int *ismemerr)
get_RRRR_str((mca & BUS_RRRR_MASK) >> BUS_RRRR_SHIFT),
decode_attr(II, (mca & BUS_II_MASK) >> BUS_II_SHIFT),
decode_attr(T, (mca & BUS_T_MASK) >> BUS_T_SHIFT));
if ((status & MCI_STATUS_MISCV) && (status & 0xefff) == 0x0e0b) {
int seg, bus, dev, fn;

seg = EXTRACT(misc, 32, 39);
bus = EXTRACT(misc, 24, 31);
dev = EXTRACT(misc, 19, 23);
fn = EXTRACT(misc, 16, 18);
mce_snprintf(e->mcastatus_msg, "IO MCA reported by root port %x:%02x:%02x.%x",
seg, bus, dev, fn);
}
} else if (test_prefix(7, mca)) {
decode_memory_controller(e, mca);
*ismemerr = 1;
Expand Down