Skip to content

decode_amd_errcode MCI_STATUS_UC reporting is flawed #251

Description

@piru

The commit a16ca07 "Add logic here to decode errors from all known IP blocks for AMD Scalable MCA supported processors" - while introducing support to decode errors - has flaws in handling of uncorrected error (MCI_STATUS_UC) reporting. The code is question at

if (e->status & MCI_STATUS_UC) {
does the following:

		if (e->status & MCI_STATUS_PCC)
			strscpy(e->error_msg, "System Fatal error.",
				sizeof(e->error_msg));
		if (e->mcgstatus & MCG_STATUS_RIPV)
			strscpy(e->error_msg,
				"Uncorrected, software restartable error.",
				sizeof(e->error_msg));
		strscpy(e->error_msg,
			"Uncorrected, software containable error.",
			sizeof(e->error_msg));

The code is flawed as it will always just report any MCI_STATUS_UC as "Uncorrected, software containable error.", even if e->status & MCI_STATUS_PCC or mcgstatus & MCG_STATUS_RIPV would be true. As such the reporting is inaccurate. The idea possibly was to have some if (a) { do a things } else if (b) { do b things } else { do c things } structure here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions