aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-02-04 16:07:46 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-09 14:24:58 +1100
commit739e6df1163301a200b604b5eefa00770f9fa44c (patch)
treed8f05f37ddcd0f5f28e0753f13da9d4c7804be40 /include
parente8ffc3caadf6e5ddbcd0910ae239eb1be0fdb381 (diff)
downloadskiboot-739e6df1163301a200b604b5eefa00770f9fa44c.zip
skiboot-739e6df1163301a200b604b5eefa00770f9fa44c.tar.gz
skiboot-739e6df1163301a200b604b5eefa00770f9fa44c.tar.bz2
ipmi/wdt: Add ipmi watchdog timer support
Add support for an ipmi watchdog timer. During skiboot initialisation this patch will cause the system to be reset if opal_run_pollers() isn't called for more than 60 seconds. Once the payload is started the watchdog timer will be reset and a pre-timeout interrupt set. The payload should then receive the interrupt and call into skiboot which will disable the watchdog timer. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/ipmi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/ipmi.h b/include/ipmi.h
index df8cf99..9e52916 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -101,6 +101,8 @@
#define IPMI_CHASSIS_CONTROL IPMI_CODE(IPMI_NETFN_CHASSIS, 0x02)
#define IPMI_SET_POWER_STATE IPMI_CODE(IPMI_NETFN_APP, 0x06)
#define IPMI_GET_POWER_STATE IPMI_CODE(IPMI_NETFN_APP, 0x07)
+#define IPMI_RESET_WDT IPMI_CODE(IPMI_NETFN_APP, 0x22)
+#define IPMI_SET_WDT IPMI_CODE(IPMI_NETFN_APP, 0x24)
#define IPMI_SET_ENABLES IPMI_CODE(IPMI_NETFN_APP, 0x2E)
#define IPMI_GET_ENABLES IPMI_CODE(IPMI_NETFN_APP, 0x2F)
#define IPMI_CLEAR_MESSAGE_FLAGS IPMI_CODE(IPMI_NETFN_APP, 0x30)
@@ -226,4 +228,14 @@ int ipmi_elog_commit(struct errorlog *elog_buf);
/* Callback to parse an OEM SEL message */
void ipmi_parse_sel(struct ipmi_msg *msg);
+/* Starts the watchdog timer */
+void ipmi_wdt_init(void);
+
+/* Stop the wdt */
+void ipmi_wdt_stop(void);
+
+/* Reset the watchdog timer. Does not return until the timer has been
+ * reset and does not schedule future resets. */
+void ipmi_wdt_final_reset(void);
+
#endif