aboutsummaryrefslogtreecommitdiff
path: root/include/ipmi.h
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2014-09-24 14:44:20 +1000
committerJeremy Kerr <jk@ozlabs.org>2015-03-04 16:02:20 +0800
commit81791e5da50b9804a19f2bfbc25916791b28d499 (patch)
treec6a4922b4a687f9353c7246cb9bab6b7712c6f52 /include/ipmi.h
parent0f2343075276a6bcc15c679b4270d0843e002da0 (diff)
downloadskiboot-81791e5da50b9804a19f2bfbc25916791b28d499.zip
skiboot-81791e5da50b9804a19f2bfbc25916791b28d499.tar.gz
skiboot-81791e5da50b9804a19f2bfbc25916791b28d499.tar.bz2
hw/ipmi: Add API for setting sensors
This allows setting a given IPMI sensor to a given value. There are helpers for setting the firmware boot progress that will be used for updating the BMC with the host boot progress. The sensor ids are parsed from the device tree. If the sensor cannot be found we will silently continue. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'include/ipmi.h')
-rw-r--r--include/ipmi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ipmi.h b/include/ipmi.h
index de5a61b..0b403eb 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -89,6 +89,7 @@
#define IPMI_NETFN(code) ((code) >> 8 & 0xff)
#define IPMI_NETFN_CHASSIS 0x00
+#define IPMI_NETFN_SE 0x04
#define IPMI_NETFN_STORAGE 0x0a
#define IPMI_NETFN_APP 0x06
@@ -108,6 +109,7 @@
#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_SET_SENSOR_READING IPMI_CODE(IPMI_NETFN_SE, 0x30)
/* AMI OEM comamnds. AMI uses NETFN 0x3a and 0x32 */
#define IPMI_PARTIAL_ADD_ESEL IPMI_CODE(0x32, 0xf0)
@@ -210,6 +212,10 @@ int ipmi_chassis_control(uint8_t request);
* use chassis control to perform power off and reboot. */
int ipmi_set_power_state(uint8_t system, uint8_t device);
+/* 35.17 Set Sensor Reading Command */
+int ipmi_set_sensor(uint8_t sensor, uint8_t *reading, size_t len);
+int ipmi_set_fw_progress_sensor(uint8_t state);
+
/* Register a backend with the ipmi core. Currently we only support one. */
void ipmi_register_backend(struct ipmi_backend *backend);
@@ -239,4 +245,7 @@ void ipmi_wdt_stop(void);
* reset and does not schedule future resets. */
void ipmi_wdt_final_reset(void);
+/* Discover id of settable ipmi sensors */
+void ipmi_sensor_init(void);
+
#endif