dbus-sdr: Add physical security sensor type
Adding physical security sensor type to support SEL.
https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/38761
Using this patch to enable log to SEL.
Tested:
~# 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 : 0001
Record Type : 02
Timestamp : 05:19:31 UTC 05:19:31 UTC
Generator ID : 00ff
EvM Revision : 04
Sensor Type : Physical Security
Sensor Number : ff
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 00fffe
Description : General Chassis intrusion
Signed-off-by: Joseph Fu <joseph.fu@quantatw.com>
Change-Id: I2bcb3ad3f86850554b82fd5a6cff84f6e0042af0
diff --git a/include/dbus-sdr/sdrutils.hpp b/include/dbus-sdr/sdrutils.hpp
index 480542e..1af65bc 100644
--- a/include/dbus-sdr/sdrutils.hpp
+++ b/include/dbus-sdr/sdrutils.hpp
@@ -306,6 +306,7 @@
voltage = 0x02,
current = 0x03,
fan = 0x04,
+ physical_security = 0x5,
processor = 0x07,
power_unit = 0x09,
other = 0x0b,
@@ -334,6 +335,8 @@
SensorEventTypeCodes::threshold)},
{"fan_pwm", std::make_pair(SensorTypeCodes::fan,
SensorEventTypeCodes::threshold)},
+ {"intrusion", std::make_pair(SensorTypeCodes::physical_security,
+ SensorEventTypeCodes::sensorSpecified)},
{"processor", std::make_pair(SensorTypeCodes::processor,
SensorEventTypeCodes::sensorSpecified)},
{"power", std::make_pair(SensorTypeCodes::other,