do not shift kcs-passed software ID
When the software ID is passed in over KCS, the LSBit is required to be
set and the software ID is already in the correct format to be used as
the generatorID for SEL data.
Credit: Vernon Mauery <vernon.mauery@linux.intel.com>
intel-ipmi-oem: do not shift kcs-passed software ID
SHA: 5d24dda2d60dfc91ee44b99e8aeb8dbb003e90a7
Change-Id: Id4bd913683897d61c24be16b25cafeca39ce6e38
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/dbus-sdr/sensorcommands.cpp b/dbus-sdr/sensorcommands.cpp
index 2c5e3e2..3989ed2 100644
--- a/dbus-sdr/sensorcommands.cpp
+++ b/dbus-sdr/sensorcommands.cpp
@@ -749,11 +749,16 @@
{
p.unpack(sysgeneratorID, evmRev, sensorType, sensorNum, eventType,
eventData1, eventData2, eventData3);
+ constexpr const uint8_t isSoftwareID = 0x01;
+ if (!(sysgeneratorID & isSoftwareID))
+ {
+ return ipmi::responseInvalidFieldRequest();
+ }
// Refer to IPMI Spec Table 32: SEL Event Records
generatorID = (ctx->channel << 12) // Channel
| (0x0 << 10) // Reserved
| (0x0 << 8) // 0x0 for sys-soft ID
- | ((sysgeneratorID << 1) | 0x1);
+ | sysgeneratorID;
}
else
{