aboutsummaryrefslogtreecommitdiff
path: root/hdata/spira.h
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-07-04 10:41:02 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-13 10:19:45 +1000
commitd4283ffcd27ecb22229526ad8eb9e8a12b01c21b (patch)
treec3beb4909bc8e836608c6eb333e22fd78f9aff4e /hdata/spira.h
parentf1413ebbbac39b466e8b7b8de10ccebcb22d1819 (diff)
downloadskiboot-d4283ffcd27ecb22229526ad8eb9e8a12b01c21b.zip
skiboot-d4283ffcd27ecb22229526ad8eb9e8a12b01c21b.tar.gz
skiboot-d4283ffcd27ecb22229526ad8eb9e8a12b01c21b.tar.bz2
HDAT: Add IPMI sensor data under /bmc node
Add IPMI sensor data under /bmc node. CC: Joel Stanley <joel@jms.id.au> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Tested-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/spira.h')
-rw-r--r--hdata/spira.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/hdata/spira.h b/hdata/spira.h
index bb7ad3e..caea057 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -68,6 +68,7 @@ struct spira_ntuples {
struct spira_ntuple pcia; /* 0x2e0 */
struct spira_ntuple proc_chip; /* 0x300 */
struct spira_ntuple hs_data; /* 0x320 */
+ struct spira_ntuple ipmi_sensor; /* 0x360 */
};
struct spira {
@@ -81,7 +82,7 @@ struct spira {
*
* According to FSP engineers, this is an okay thing to do.
*/
- u8 reserved[0xc0];
+ u8 reserved[0xa0];
} __packed __align(0x100);
extern struct spira spira;
@@ -1063,6 +1064,27 @@ struct sppcrd_chip_tod {
/* Idata index 0 : System attribute data */
#define HSERV_IDATA_SYS_ATTR 0
+/* IPMI sensors mapping data */
+#define IPMI_SENSORS_HDIF_SIG "FRUSE "
+
+/* Idata index 0 : Sensor mapping data */
+#define IPMI_SENSORS_IDATA_SENSORS 0
+
+struct ipmi_sensors_data {
+ __be32 slca_index;
+ uint8_t type;
+ uint8_t id;
+ __be16 reserved;
+} __packed;
+
+struct ipmi_sensors {
+ __be32 count;
+ struct ipmi_sensors_data data[];
+} __packed;
+
+/* Idata index 1 : LED - sensors ID mapping data */
+#define IPMI_SENSORS_IDATA_LED 1
+
static inline const char *cpu_state(u32 flags)
{
switch ((flags & CPU_ID_VERIFY_MASK) >> CPU_ID_VERIFY_SHIFT) {