diff options
author | Rob Johnston <rob.johnston@joyent.com> | 2018-09-11 22:37:24 +0000 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-02-05 10:18:24 -0500 |
commit | 91e105c6fe74c41aa5fec22b6637fa279c68812a (patch) | |
tree | fdf16a881b5b82c2a77068746382321dac76a70b /usr/src | |
parent | 892ad1623e11186cba8b2eb40d70318d2cb89605 (diff) | |
download | illumos-gate-91e105c6fe74c41aa5fec22b6637fa279c68812a.tar.gz |
10292 Add percentage unit type to sensor abstraction layer
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/fm/topo/libtopo/common/libtopo.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/usr/src/lib/fm/topo/libtopo/common/libtopo.h b/usr/src/lib/fm/topo/libtopo/common/libtopo.h index d9f3b69ddf..d3babc9340 100644 --- a/usr/src/lib/fm/topo/libtopo/common/libtopo.h +++ b/usr/src/lib/fm/topo/libtopo/common/libtopo.h @@ -446,10 +446,13 @@ void topo_sensor_state_name(uint32_t sensor_type, uint8_t state, char *buf, /* * Sensor unit types. We're using the unit types and corresponding - * codes described in the IPMI 2.0 spec as a reference as it seems to be a - * reasonably comprehensive list. This also simplifies the IPMI provider code - * since the unit type codes will map exactly to what libtopo uses (so no - * conversion necessary). + * codes described in section 43.17 of the IPMI 2.0 as a reference as it seems + * to be a reasonably comprehensive list. This also simplifies the IPMI + * facility provider code since the unit type codes will map exactly to what + * libtopo uses (so no conversion necessary). To allow for future growth if + * new unit types are added to IPMI in the future, while still allowing unit + * types not supported by IPMI to be represented, we include a gap between + * the last IPMI unit type and the first non-IPMI unit type. */ typedef enum topo_sensor_unit { TOPO_SENSOR_UNITS_UNSPECIFIED = 0, @@ -549,7 +552,9 @@ typedef enum topo_sensor_unit { TOPO_SENSOR_UNITS_CE, TOPO_SENSOR_UNITS_UE, TOPO_SENSOR_UNITS_FATAL_ERROR, - TOPO_SENSOR_UNITS_GRAMS + TOPO_SENSOR_UNITS_GRAMS, + + TOPO_SENSOR_UNITS_PERCENT = 512 } topo_sensor_unit_t; /* @@ -567,10 +572,11 @@ typedef enum topo_sensor_unit { * These are used to decode the type and state properties in the facility * propgroup on facility nodes of type sensor. * - * Again we're basically using the same defines as for IPMI as it's serves - * as a good starting point and simplifies the IPMI provider code. Of course - * other facility providers will need to convert from their native codes - * to the topo code when they set the type and state properties. + * Again we're basically using the same defines as listed in the IPMI + * specification (see section 42) as it's serves as a good starting point and + * simplifies the IPMI provider code. Of course other facility providers will + * need to convert from their native codes to the topo code when they set the + * type and state properties. */ #define TOPO_SENSOR_TYPE_RESERVED 0x0000 #define TOPO_SENSOR_TYPE_TEMP 0x0001 |