aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-05-05 15:55:28 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-10 14:32:17 +1000
commitf3a5741408a11be6992cf8779f2eae10b08c020a (patch)
tree568e079d35f41cab7cbe0e3d7eba1467d4122424 /include
parentd55194c5d9ada77eee2c9a69814708304f34d334 (diff)
downloadskiboot-f3a5741408a11be6992cf8779f2eae10b08c020a.zip
skiboot-f3a5741408a11be6992cf8779f2eae10b08c020a.tar.gz
skiboot-f3a5741408a11be6992cf8779f2eae10b08c020a.tar.bz2
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 <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/errorlog.h13
-rw-r--r--include/fsp.h6
2 files changed, 14 insertions, 5 deletions
diff --git a/include/errorlog.h b/include/errorlog.h
index 247198b..e9d5ad8 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
diff --git a/include/fsp.h b/include/fsp.h
index f75b6ad..e7f6a7b 100644
--- a/include/fsp.h
+++ b/include/fsp.h
@@ -368,6 +368,10 @@
#define FSP_CMD_DEEP_REBOOT 0x1ce4e04 /* HV->FSP: Deep IPL */
#define FSP_CMD_INIT_DPO 0x0ce5b00 /* FSP->HV: Initialize Delayed Power Off */
#define FSP_RSP_INIT_DPO 0x0cedb00 /* HV->FSP: Response for DPO init command */
+#define FSP_CMD_GET_HIR_PLID 0x0ce0900 /* FSP->HV: Get Platform Log ID with
+ * reason for Host Initiated Reset.
+ */
+#define FSP_RSP_GET_HIR_PLID 0x0ce8900 /* HV->FSP: Reply with PLID */
#define FSP_CMD_PANELSTATUS 0x0ce5c00 /* FSP->HV */
#define FSP_CMD_PANELSTATUS_EX1 0x0ce5c02 /* FSP->HV */
#define FSP_CMD_PANELSTATUS_EX2 0x0ce5c03 /* FSP->HV */
@@ -808,7 +812,7 @@ extern void fsp_ipmi_init(void);
/* Reset/Reload */
extern void fsp_reinit_fsp(void);
-extern void fsp_trigger_reset(void);
+extern void fsp_trigger_reset(uint32_t plid);
extern void fsp_reset_links(void);
extern bool fsp_in_rr(void);