aboutsummaryrefslogtreecommitdiff
path: root/include/ipmi.h
diff options
context:
space:
mode:
authorJeremy Kerr <jeremy.kerr@au.ibm.com>2015-02-05 13:40:02 +1030
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-09 14:03:50 +1100
commit6e42e6364ed2b1e976d7ddace2e28f27c0b46ba4 (patch)
treeeb41ec3e3866059770fb7ead6a3ef44a0977e777 /include/ipmi.h
parentc5a06a551ef55468e7bc46615f71f4ee4dbeaa02 (diff)
downloadskiboot-6e42e6364ed2b1e976d7ddace2e28f27c0b46ba4.zip
skiboot-6e42e6364ed2b1e976d7ddace2e28f27c0b46ba4.tar.gz
skiboot-6e42e6364ed2b1e976d7ddace2e28f27c0b46ba4.tar.bz2
ipmi: handle SMS_ATN events
When the bt interface sets the SMS_ATN flag, we perform a Get Message Flags to determine what messages are available. The only message type currently processed is the Event Message Buffer, which provides SEL messages for indicating OEM specific events such as graceful system shutdown and PNOR access requested. These events will be handled by the IPMI layer in skiboot. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/ipmi.h')
-rw-r--r--include/ipmi.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ipmi.h b/include/ipmi.h
index 5660704..9f9cfbb 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -76,6 +76,14 @@
#define IPMI_PWR_SYS_UNKNOWN 0x2a
#define IPMI_PWR_NOCHANGE 0x7f
+/* 22.{3,4} Clear / Get message flags */
+#define IPMI_MESSAGE_FLAGS_RX_MESSAGE_QUEUE (1<<0)
+#define IPMI_MESSAGE_FLAGS_EVENT_BUFFER (1<<1)
+#define IPMI_MESSAGE_FLAGS_WATCHDOG_PRE_TIMEOUT (1<<3)
+#define IPMI_MESSAGE_FLAGS_OEM0 (1<<5)
+#define IPMI_MESSAGE_FLAGS_OEM1 (1<<6)
+#define IPMI_MESSAGE_FLAGS_OEM2 (1<<7)
+
#define IPMI_CODE(netfn, cmd) ((netfn) << 8 | (cmd))
#define IPMI_CMD(code) ((code) & 0xff)
#define IPMI_NETFN(code) ((code) >> 8 & 0xff)
@@ -93,6 +101,10 @@
#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_CLEAR_MESSAGE_FLAGS IPMI_CODE(IPMI_NETFN_APP, 0x30)
+#define IPMI_GET_MESSAGE_FLAGS IPMI_CODE(IPMI_NETFN_APP, 0x31)
+#define IPMI_GET_MESSAGE IPMI_CODE(IPMI_NETFN_APP, 0x33)
+#define IPMI_READ_EVENT IPMI_CODE(IPMI_NETFN_APP, 0x35)
#define IPMI_PARTIAL_ADD_ESEL IPMI_CODE(IPMI_NETFN_OEM, 0xf0)
@@ -170,6 +182,9 @@ void ipmi_init_msg(struct ipmi_msg *msg, int interface,
uint32_t code, void (*complete)(struct ipmi_msg *),
void *user_data, size_t req_size, size_t resp_size);
+/* called by backend code to indicate a SMS_ATN event */
+void ipmi_sms_attention(void);
+
/* Add an ipmi message to the queue */
int ipmi_queue_msg(struct ipmi_msg *msg);