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.
Change-Id: Ic19b55fd8f686584524fc9c0348b43d63956f292
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/src/sensorcommands.cpp b/src/sensorcommands.cpp
index 73b74cc..ffb0e84 100644
--- a/src/sensorcommands.cpp
+++ b/src/sensorcommands.cpp
@@ -380,11 +380,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
{