/* *Wemaynothaveacheckstopreasononsomecombinationof *hardwareand/orskibootversion
*/ if (!hmi_evt->u.xstop_error.xstop_reason) {
printk("%s NPU checkstop on chip %x\n", level,
be32_to_cpu(hmi_evt->u.xstop_error.u.chip_id)); return;
}
/* *NPU2has3FIRs.Reasonencodedonabyteas: *2bitsfortheFIRnumber *6bitsforthebitnumber *Itmaybepossibletofindseveralreasons. * *Wedon'tdisplayaspecificmessageperFIRbitasthere *aretoomanyandmostaremeaninglesswithouttheworkbook *and/orhwteamhelpanyway.
*/
reason_count = sizeof(hmi_evt->u.xstop_error.xstop_reason) / sizeof(reason); for (i = 0; i < reason_count; i++) {
reason = (hmi_evt->u.xstop_error.xstop_reason >> (8 * i)) & 0xFF; if (reason)
printk("%s NPU checkstop on chip %x: FIR%d bit %d is set\n",
level,
be32_to_cpu(hmi_evt->u.xstop_error.u.chip_id),
reason >> 6, reason & 0x3F);
}
}
staticvoid print_checkstop_reason(constchar *level, struct OpalHMIEvent *hmi_evt)
{
uint8_t type = hmi_evt->u.xstop_error.xstop_type; switch (type) { case CHECKSTOP_TYPE_CORE:
print_core_checkstop_reason(level, hmi_evt); break; case CHECKSTOP_TYPE_NX:
print_nx_checkstop_reason(level, hmi_evt); break; case CHECKSTOP_TYPE_NPU:
print_npu_checkstop_reason(level, hmi_evt); break; default:
printk("%s Unknown Malfunction Alert of type %d\n",
level, type); break;
}
}
staticvoid print_hmi_event_info(struct OpalHMIEvent *hmi_evt)
{ constchar *level, *sevstr, *error_info; staticconstchar *hmi_error_types[] = { "Malfunction Alert", "Processor Recovery done", "Processor recovery occurred again", "Processor recovery occurred for masked error", "Timer facility experienced an error", "TFMR SPR is corrupted", "UPS (Uninterrupted Power System) Overflow indication", "An XSCOM operation failure", "An XSCOM operation completed", "SCOM has set a reserved FIR bit to cause recovery", "Debug trigger has set a reserved FIR bit to cause recovery", "A hypervisor resource error occurred", "CAPP recovery process is in progress",
}; static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);
/* Print things out */ if (hmi_evt->version < OpalHMIEvt_V1) {
pr_err("HMI Interrupt, Unknown event version %d !\n",
hmi_evt->version); return;
} switch (hmi_evt->severity) { case OpalHMI_SEV_NO_ERROR:
level = KERN_INFO;
sevstr = "Harmless"; break; case OpalHMI_SEV_WARNING:
level = KERN_WARNING;
sevstr = ""; break; case OpalHMI_SEV_ERROR_SYNC:
level = KERN_ERR;
sevstr = "Severe"; break; case OpalHMI_SEV_FATAL: default:
level = KERN_ERR;
sevstr = "Fatal"; break;
}
/* Sanity Checks */ if (msg_type != OPAL_MSG_HMI_EVT) return0;
/* HMI event info starts from param[0] */
hmi_evt = (struct OpalHMIEvent *)&hmi_msg->params[0];
/* Delay the logging of HMI events to workqueue. */
msg_node = kzalloc(sizeof(*msg_node), GFP_ATOMIC); if (!msg_node) {
pr_err("HMI: out of memory, Opal message event not handled\n"); return -ENOMEM;
}
memcpy(&msg_node->hmi_evt, hmi_evt, sizeof(*hmi_evt));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.