aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVipin K Parashar <vipin@linux.vnet.ibm.com>2015-07-29 23:28:43 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-31 15:32:43 +1000
commit36c213d95f971804388c336213d636277b0f40f5 (patch)
treed325c6ebec923a8941315a0c2122fa4e0715de16 /include
parentc37f122d3ca2e7964f971a98c5acbec9435c5616 (diff)
downloadskiboot-36c213d95f971804388c336213d636277b0f40f5.zip
skiboot-36c213d95f971804388c336213d636277b0f40f5.tar.gz
skiboot-36c213d95f971804388c336213d636277b0f40f5.tar.bz2
opal-api: Add OPAL call to handle abnormal reboots.
This patch adds a new OPAL call OPAL_CEC_REBOOT2 which will be used to handle abnormal reboot/termination by kernel host. This call will allow host kernel to pass reboot type and additional debug data which needs to be captured/saved somewhere (for later analysis) before going down. Currently it will support two reboot types (0). normal reboot, that will behave similar to that of opal_cec_reboot() call, and (1). platform error reboot, that will trigger a system checkstop using xscom address and FIR bit information obtained via device-tree property 'ibm,sw-checkstop-fir'. For unsupported reboot type, this call will do nothing and return with OPAL_UNSUPPORTED. In future, we can overload this call to support additional reboot types. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/errorlog.h3
-rw-r--r--include/opal-api.h9
-rw-r--r--include/xscom.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/include/errorlog.h b/include/errorlog.h
index b908fd4..1499587 100644
--- a/include/errorlog.h
+++ b/include/errorlog.h
@@ -322,6 +322,9 @@ enum opal_reasoncode {
/* IPMI */
OPAL_RC_IPMI_REQ = OPAL_IP | 0x10,
OPAL_RC_IPMI_RESP = OPAL_IP | 0x11,
+
+/* Platform error */
+ OPAL_RC_ABNORMAL_REBOOT = OPAL_CE | 0x10,
};
#define DEFINE_LOG_ENTRY(reason, type, id, subsys, \
diff --git a/include/opal-api.h b/include/opal-api.h
index bfad589..e22370f 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -161,7 +161,8 @@
#define OPAL_PRD_MSG 113
#define OPAL_LEDS_GET_INDICATOR 114
#define OPAL_LEDS_SET_INDICATOR 115
-#define OPAL_LAST 115
+#define OPAL_CEC_REBOOT2 116
+#define OPAL_LAST 116
/* Device tree flags */
@@ -972,6 +973,12 @@ struct opal_i2c_request {
__be64 buffer_ra; /* Buffer real address */
};
+/* Argument to OPAL_CEC_REBOOT2() */
+enum {
+ OPAL_REBOOT_NORMAL = 0,
+ OPAL_REBOOT_PLATFORM_ERROR,
+};
+
#endif /* __ASSEMBLY__ */
#endif /* __OPAL_API_H */
diff --git a/include/xscom.h b/include/xscom.h
index a841261..09db99b 100644
--- a/include/xscom.h
+++ b/include/xscom.h
@@ -179,5 +179,6 @@ extern void xscom_used_by_console(void);
extern bool xscom_ok(void);
extern int64_t xscom_read_cfam_chipid(uint32_t partid, uint32_t *chip_id);
+extern int64_t xscom_trigger_xstop(void);
#endif /* __XSCOM_H */