dbus-sdr: Add processor sensor type
- Add processor sensor type to support SEL
In the origin code, the sensor type will be reserved in SEL record.
~# ipmitool sel elist -v
Loading IANA PEN Registry...
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
SEL Record ID : 0003
Record Type : 02
Timestamp : 01:03:11 GMT 01:03:11 GMT
Generator ID : 0020
EvM Revision : 04
Sensor Type : reserved
Sensor Number : 26
Event Type : Unspecified
Event Direction : Assertion Event
Event Data : 0cffff
Description :
- After this fix, the SEL record work as expect.
~# ipmitool sel elist -v
Loading IANA PEN Registry...
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
SEL Record ID : 0003
Record Type : 02
Timestamp : 01:03:11 GMT 01:03:11 GMT
Generator ID : 0020
EvM Revision : 04
Sensor Type : Processor
Sensor Number : 26
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 0cffff
Description : Correctable machine check error
Signed-off-by: David Wang <davidwang@quantatw.com>
Change-Id: Idf8b043c076fe21afeac443cfedcfc356094a0b8
diff --git a/include/dbus-sdr/sdrutils.hpp b/include/dbus-sdr/sdrutils.hpp
index cfd76b3..480542e 100644
--- a/include/dbus-sdr/sdrutils.hpp
+++ b/include/dbus-sdr/sdrutils.hpp
@@ -301,14 +301,15 @@
enum class SensorTypeCodes : uint8_t
{
- reserved = 0x0,
- temperature = 0x1,
- voltage = 0x2,
- current = 0x3,
- fan = 0x4,
- other = 0xB,
- memory = 0x0c,
+ reserved = 0x00,
+ temperature = 0x01,
+ voltage = 0x02,
+ current = 0x03,
+ fan = 0x04,
+ processor = 0x07,
power_unit = 0x09,
+ other = 0x0b,
+ memory = 0x0c,
buttons = 0x14,
watchdog2 = 0x23,
};
@@ -333,6 +334,8 @@
SensorEventTypeCodes::threshold)},
{"fan_pwm", std::make_pair(SensorTypeCodes::fan,
SensorEventTypeCodes::threshold)},
+ {"processor", std::make_pair(SensorTypeCodes::processor,
+ SensorEventTypeCodes::sensorSpecified)},
{"power", std::make_pair(SensorTypeCodes::other,
SensorEventTypeCodes::threshold)},
{"memory", std::make_pair(SensorTypeCodes::memory,