From f3a5741408a11be6992cf8779f2eae10b08c020a Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Fri, 5 May 2017 15:55:28 +1000 Subject: FSP: Notify FSP of Platform Log ID after Host Initiated Reset Reload Trigging a Host Initiated Reset (when the host detects the FSP has gone out to lunch and should be rebooted), would cause "Unknown Command" messages to appear in the OPAL log. This patch implements those messages How to trigger FSP RR(HIR): $ putmemproc 300000f8 0x00000000deadbeef s1 k0:n0:s0:p00 ecmd_ppc putmemproc 300000f8 0x00000000deadbeef Log showing unknown command: / # cat /sys/firmware/opal/msglog | grep -i ,3 [ 110.232114723,3] FSP: fsp_trigger_reset() entry [ 188.431793837,3] FSP #0: Link down, starting R&R [ 464.109239162,3] FSP #0: Got XUP with no pending message ! [ 466.340598554,3] FSP-DPO: Unknown command 0xce0900 [ 466.340600126,3] FSP: Unhandled message ce0900 The message we need to handle is "Get PLID after host initiated FipS reset/reload". When the FSP comes back from HIR, it asks "hey, so, which error log explains why you rebooted me?". So, we tell it. Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Stewart Smith --- include/errorlog.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/errorlog.h') diff --git a/include/errorlog.h b/include/errorlog.h index 247198b3..e9d5ad86 100644 --- a/include/errorlog.h +++ b/include/errorlog.h @@ -259,6 +259,7 @@ enum opal_reasoncode { OPAL_RC_SURVE_INIT = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x10, OPAL_RC_SURVE_STATUS = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x11, OPAL_RC_SURVE_ACK = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x12, + OPAL_INJECTED_HIR = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x13, /* SYSPARAM */ OPAL_RC_SYSPARM_INIT = OPAL_SRC_COMPONENT_SYSPARAM | 0x10, OPAL_RC_SYSPARM_MSG = OPAL_SRC_COMPONENT_SYSPARAM | 0x11, @@ -313,8 +314,9 @@ enum opal_reasoncode { OPAL_RC_SLW_GET = OPAL_SRC_COMPONENT_SLW | 0x12, OPAL_RC_SLW_REG = OPAL_SRC_COMPONENT_SLW | 0x13, /* FSP */ - OPAL_RC_FSP_POLL_TIMEOUT - = OPAL_SRC_COMPONENT_FSP | 0x10, + OPAL_RC_FSP_POLL_TIMEOUT = OPAL_SRC_COMPONENT_FSP | 0x10, + OPAL_RC_FSP_MBOX_ERR = OPAL_SRC_COMPONENT_FSP | 0x11, + OPAL_RC_FSP_DISR_HIR_MASK = OPAL_SRC_COMPONENT_FSP | 0x12, /* I2C */ OPAL_RC_I2C_INIT = OPAL_SRC_COMPONENT_I2C | 0X10, OPAL_RC_I2C_START_REQ = OPAL_SRC_COMPONENT_I2C | 0X11, @@ -339,9 +341,12 @@ severity, subtype) static struct opal_err_info err_##reason = \ /* This is wrapper around the error log function, which creates * and commits the error to FSP. - * Used for simple error logging + * Used for simple error logging. + * Returns a Log ID, if an error involves a service processor needing + * to be kicked, this logid can be sent to the service processor explaining + * *why* we kicked it. Log Id = -1 on error. */ -void log_simple_error(struct opal_err_info *e_info, +uint32_t log_simple_error(struct opal_err_info *e_info, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); #define e_info(reason_code) err_##reason_code -- cgit v1.2.1