Searched hist:"34 d19736349309928bdb8b6ddae23dbda727e3f0" (Results 1 – 2 of 2) sorted by relevance
/openbmc/phosphor-host-ipmid/dbus-sdr/ |
H A D | sdrutils.cpp | diff 34d19736349309928bdb8b6ddae23dbda727e3f0 Wed Jul 17 09:59:54 CDT 2024 Johnathan Mantey <johnathanx.mantey@intel.com> Permit dynamic insertion of sensor type codes
The existing sensorTypes flat_map is an immutable data structure. This makes adding OEM style sensor types difficult. New entries, that may not be general purpose either need to be pushed upstream for all, or they have to be updated by carrying a patch. Keeping a patch up to date is an undesirable method.
Instead of using either of the prior methods, make the flat_map a writable object. Adding new entries can be done at run time using the flat_map emplace() function. Adding new sensor types is recommended to be done by overriding the weak linked getOtherSensorsCount(), placed in the sensorcommands_oem.cpp file. Using a GCC 'constructor' style function does not work due to uncertainty of initialization order.
See commit 777cfaf2b3:bb6667fbbea7612255137970c3dbdb Enable OEM creation of non-Type1 SDRs
Tested: Added an emplace() call into the strong linked getOtherSensorCommands Used 'ipmitool sdr dump sdrs.bin' Inspected the resulting SDR data and confirmed the sensors of interest had an OEM type code as dictated by the sensorTypes map
Change-Id: Ifcf6297a8b161b720651bc6411409014c37ce88c Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
/openbmc/phosphor-host-ipmid/include/dbus-sdr/ |
H A D | sdrutils.hpp | diff 34d19736349309928bdb8b6ddae23dbda727e3f0 Wed Jul 17 09:59:54 CDT 2024 Johnathan Mantey <johnathanx.mantey@intel.com> Permit dynamic insertion of sensor type codes
The existing sensorTypes flat_map is an immutable data structure. This makes adding OEM style sensor types difficult. New entries, that may not be general purpose either need to be pushed upstream for all, or they have to be updated by carrying a patch. Keeping a patch up to date is an undesirable method.
Instead of using either of the prior methods, make the flat_map a writable object. Adding new entries can be done at run time using the flat_map emplace() function. Adding new sensor types is recommended to be done by overriding the weak linked getOtherSensorsCount(), placed in the sensorcommands_oem.cpp file. Using a GCC 'constructor' style function does not work due to uncertainty of initialization order.
See commit 777cfaf2b3:bb6667fbbea7612255137970c3dbdb Enable OEM creation of non-Type1 SDRs
Tested: Added an emplace() call into the strong linked getOtherSensorCommands Used 'ipmitool sdr dump sdrs.bin' Inspected the resulting SDR data and confirmed the sensors of interest had an OEM type code as dictated by the sensorTypes map
Change-Id: Ifcf6297a8b161b720651bc6411409014c37ce88c Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|