531223fb | 11-Nov-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
boost version 1.86 support
Added fix for boost::asio::spawn overload issue reported similar to chriskohlhoff/asio#1524, during boost 1.86 migration build.
Proposed fix is to use default completion
boost version 1.86 support
Added fix for boost::asio::spawn overload issue reported similar to chriskohlhoff/asio#1524, during boost 1.86 migration build.
Proposed fix is to use default completion token.
Tested: verified build
Change-Id: Ie3ebcf963f998fd6064e8efab49d1fe584d4b587 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
e7ef94d3 | 18-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Refactor Get SDR Device Info function
The Get SDR Device Info function can be simplified by taking advantage of the code changes for managing non-Type 01 SDR's.
Tested: ipmitool raw 4 0x20 // exp
Refactor Get SDR Device Info function
The Get SDR Device Info function can be simplified by taking advantage of the code changes for managing non-Type 01 SDR's.
Tested: ipmitool raw 4 0x20 // expect sensor count ipmitool raw 4 0x20 0 // expect sensor count ipmitool raw 4 0x20 1 // expect SDR count ipimtool raw 4 0x20 2 // expect invalid parameter err
All of the ipmitool commands returned the expected results
Change-Id: I6f73a521c4273a29990fcc2b0cc725ad593db348 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
656ae3c5 | 23-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
Remove unused variables
Using clang-tidy, it was detected that some variables are no longer in use. This commit remove unused variables.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id
Remove unused variables
Using clang-tidy, it was detected that some variables are no longer in use. This commit remove unused variables.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I382e6ce07e66dc5ad082be9b36d217a037e609b5
show more ...
|
1318a5ed | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I01547e98d27910919e09ebf7907c86292a6c825d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
de6694e2 | 17-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
dbus-sdr: switch to lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I076cb6429a56cf9b5123420f36daf6328c2d64b9 |
34d19736 | 17-Jul-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 gener
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>
show more ...
|
a440cd42 | 20-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
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
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>
show more ...
|
92217f05 | 20-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Handle NaN in threshold interface
dbus-sensor threshold has been changed to always create high and low interfaces. Threshold value is set to NaN when there is no actual limit.
When creating thresho
Handle NaN in threshold interface
dbus-sensor threshold has been changed to always create high and low interfaces. Threshold value is set to NaN when there is no actual limit.
When creating threshold attributes in SDR, verify that sensor threshold value is not NaN.
When getting min and max from threshold interfaces, use std::fmin and std::fmax instead of std::min and std::max. If one of the two arguments is NaN, the value of the other argument is returned. Since sensors are always created with default min/max values, the other argument is not going to be NaN.
Tested: ipmitool sensor list returns without error. Sensor limit is na when threshold interface value is NaN.
Credit: Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Migrated from intel-ipmi-oem: SHA: 41a6e9f336aa1161cd0680bfab5a5fe1effbe976
Change-Id: I51451aab12d9bf5cc5f2d61ff2e603839910afe0 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
7b037276 | 17-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Add ability to add 'energy' sensor Type 01 records
Allow the getSensorTypeFromPath to create Type 01 records for D-Bus entries with 'energy' in their path name.
Energy sensors are 'Other Unit-based
Add ability to add 'energy' sensor Type 01 records
Allow the getSensorTypeFromPath to create Type 01 records for D-Bus entries with 'energy' in their path name.
Energy sensors are 'Other Unit-based sensors' and are considered to be 'threshold' sensors. The unit of measure is 'joules'.
Tested: Confirmed sensors with the 'energy' string preceding the sensor name generated a Type 01 record with the Sensor Type == 0xb, and the Event Reading type set to 0x01. The record also set the Sensor Units 2 entry to 0x07 to indicate the unit of measure is in joules.
Change-Id: I6ca9027e1ff2a8ad58640f851a9bd9f102ba55e9 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
c1c7eac4 | 04-Feb-2024 |
George Liu <liuxiwei@ieisystem.com> |
Refactor to call the GetSubTree method
Uniformly use the getSubTree method of utils.hpp to obtain objectTree
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I20204745a01c50f053db74a57
Refactor to call the GetSubTree method
Uniformly use the getSubTree method of utils.hpp to obtain objectTree
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I20204745a01c50f053db74a5749a070bc8193d39
show more ...
|
31c1ecd2 | 20-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Correct missed application of getOtherSensorsCount function
There was still a hard coded calculation of the number of SDR's. Removed the hard coded calculation and replaced it with the weak linked g
Correct missed application of getOtherSensorsCount function
There was still a hard coded calculation of the number of SDR's. Removed the hard coded calculation and replaced it with the weak linked getOtherSensorsCount() function.
Tested: Not tested.
Change-Id: I8f46ec498b044c095e0da8fd626c1dea945e5705 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
777cfaf2 | 13-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Enable OEM creation of non-Type1 SDRs
Enabling the dbus-sdrs feature is useful for managing Type 1 SDR's using D-Bus. What doesn't work quite as well in the model is creating non-Type 1 records. The
Enable OEM creation of non-Type1 SDRs
Enabling the dbus-sdrs feature is useful for managing Type 1 SDR's using D-Bus. What doesn't work quite as well in the model is creating non-Type 1 records. The current method works alright for Type 11 FRU records. Any other SDR's beyond the FRU are problematic because the code depends on manually defining custom 'if' clauses to compare the incoming SDR ID, and determining what kind of SDR to create. It is a fixed process that is inflexible, and assumes every BMC vendor wants the same SDR arrangement.
This commit creates a model that allows the each OEM to customize creating each SDR using their own algorithm. The OEM creates a sensorcommands_oem.cpp/hpp file containing code for handling the creation of custom SDRs. The code here is compiled and linked based on enabling a Meson build switch.
The code follows the model that was already present in dbus-sdr/sensorcommands.cpp. There are two functions that maintain the original inflexible code, which is now expected to be primarily used as a template for the OEM cpp/hpp contents.
Tested: Created sensorcommands_oem.cpp/hpp files with OEM functionality Enabled the original code, and compiled Used ipmitool sdr dump sdrs.bin in the BMC Console Confirmed the SDRs matched the values prior to this commit. Enabled the OEM code and compiled Used ipmitool sdr dump sdrs.bin in the BMC console Confirmed the contents of the BIN file contained the SDRs generated by the sensorcommands_oem.cpp source.
Change-Id: I100e747b52677be53b499713d51c6c1126411570 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
8fb5b89a | 02-Nov-2023 |
Alexander Hansen <alexander.hansen@9elements.com> |
prevent logspam from getObjectInterfaces
prevent logspam from "Failed to GetObject".
The function does not print anymore and its caller can print an error if needed.
The error defaults to phosphor
prevent logspam from getObjectInterfaces
prevent logspam from "Failed to GetObject".
The function does not print anymore and its caller can print an error if needed.
The error defaults to phosphor::logging::level::DEBUG since it's looping over the associations.
Therefore, failure in one codepath does not constitute an error.
Tested: logspam is gone.
Change-Id: Ie800181ff80ed56846815ea377f347a784d49521 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
04b0b079 | 10-Oct-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Enable reducing the number of sensors managed by IPMI
IPMI is only able to support a finite amount of SDR records. Modern servers are capable of exceeding the number of sensors the IPMI specificatio
Enable reducing the number of sensors managed by IPMI
IPMI is only able to support a finite amount of SDR records. Modern servers are capable of exceeding the number of sensors the IPMI specification can support.
The change made in this commit filters sensors from a service based upon contents in a JSON configuration file.
Tested: Confirmed the default compile resulted in too many sensors being created. Added the 'sensor_filter.json' file and confirmed the number of sensors was reduced, and 'ipmitool sdr list' no longer exhibited error messages.
Change-Id: I3643e06abbb8708d3f4000f35c79be8901e34057 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
d9eb721e | 03-Feb-2024 |
George Liu <liuxiwei@ieisystem.com> |
Remove libmapper dependency
After this commit is merged [1], phosphor-ipmi-host no longer depends on libmapper. This commit removes the dependence on libmapper.
[1] https://gerrit.openbmc.org/c/ope
Remove libmapper dependency
After this commit is merged [1], phosphor-ipmi-host no longer depends on libmapper. This commit removes the dependence on libmapper.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/69082
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Iacf20716b3dd02f0c3173eb6c1fcb39d416f72a6
show more ...
|
b99de182 | 21-Dec-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Assign ASCII-Latin8 to dbus-sdr FRU string Type/Len
The FRU ID string Type/Len encoding in the dbus-sdr code is left unassigned, which causes it to be tagged as unicode characters. This is not the e
Assign ASCII-Latin8 to dbus-sdr FRU string Type/Len
The FRU ID string Type/Len encoding in the dbus-sdr code is left unassigned, which causes it to be tagged as unicode characters. This is not the encoding of the data, which is actually ASCII/Latin8.
The problem appears to go unnoticed, I expect, because the dbus-sdr functionality is not enabled. When dbus-sdr is enabled the id-string supplied to IPMITool is ASCII/Latin8, but IPMITool decodes it as unicode.
Tested: Enabled dbus-sdr features. Use 'ipmitool fru print' Confirm FRU id-strings print as ASCII/Latin8
Change-Id: Ie6d936f6b5a0b0cd9ccd9adb68e46e1efbb9b2e5 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
62e3ca80 | 31-Jan-2024 |
Willy Tu <wltu@google.com> |
sdr-dbus: Reduce log spam on bitmap error
Remove the log for out_of_range error for getSensorNumberFromPath and getPathFromSensorNumber. Log only once at the end of looping through the sensor tree i
sdr-dbus: Reduce log spam on bitmap error
Remove the log for out_of_range error for getSensorNumberFromPath and getPathFromSensorNumber. Log only once at the end of looping through the sensor tree instead of for every sensor.
Tested: The spam of ``` bimap<>: invalid key ``` is now gone.
Change-Id: Ifc22141cc5450b57ce272c46537240084d94d2aa Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
ea46f3ca | 04-Sep-2023 |
Alexander Hansen <alexander.hansen@9elements.com> |
ipmi fru device description from dbus property
currently 'FRU Device Description' is retrieved via EM json decorator "xyz.openbmc_project.Inventory.Decorator.I2CDevice"
which does not even pass the
ipmi fru device description from dbus property
currently 'FRU Device Description' is retrieved via EM json decorator "xyz.openbmc_project.Inventory.Decorator.I2CDevice"
which does not even pass the validator and is not present on any of the upstream EM configs.
This patch provides the 'FRU Device Description' via FruDevice dbus properties, if present.
Multiple Properties are considereded in order.
Tested: with 2 Supermicro PSU. FRU Device Description shows up.
Change-Id: I924d88b4a3a2406e2f0747b1965cb5f5b50fd096 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
95655220 | 05-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: avoid deprecated phosphor::Timer
sdbusplus had an older type named `phosphor::Timer` which was recently renamed to `sdbusplus::Timer`. Update the code to use the new type alias.
Change-
sdbusplus: avoid deprecated phosphor::Timer
sdbusplus had an older type named `phosphor::Timer` which was recently renamed to `sdbusplus::Timer`. Update the code to use the new type alias.
Change-Id: If69434b3a3639b8f97ab16cab5da4d70e3379cb2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
3dad826b | 17-Aug-2023 |
Thang Tran <thuutran@amperecomputing.com> |
dbus-sdr: support Get Temperature Readings command
This commit support Get Temperature Readings command in the dynamicsensor library.
The design follows teps: - Get the list of sensors based on Ent
dbus-sdr: support Get Temperature Readings command
This commit support Get Temperature Readings command in the dynamicsensor library.
The design follows teps: - Get the list of sensors based on Entity Id - Sort the list of sensors. - Loop all of sensors in the list, if its Entity Instance is greater than the Instance Start then read the temperature via object path.
Tested: 1. Request to read Temperature of sensors "ipmitool dcmi get_temp_reading" 2. Display Entity Id, Entity Instance, Temperature of sensors
Change-Id: Iaa7d65a763dacb50c1488d2a161b180fed49899b Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
b1416efa | 02-Aug-2023 |
Thang Tran <thuutran@amperecomputing.com> |
dbus-sdr: check instance start value in getSensorInfo function
Issue: When users request to read DCMI sensor information via "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Instance_start>", the return
dbus-sdr: check instance start value in getSensorInfo function
Issue: When users request to read DCMI sensor information via "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Instance_start>", the return values always are 8 first sensors even the "Instance_start" is not 0.
Root cause: In the getSensorInfo function, it does not check the instance start parameter. It always returns 8 first sensors.
Solution: Update the getSensorInfo function as below: - Get the list of Sensors based on the Entity ID. - Sort the list of Sensors. - Compare Sensor's Entity Instance with Instance start parameter
Tested: 1. Get the list of DCMI sensors information with Instance start is not 0 "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Ins_Start>" 2. BMC returns sensor Record ID which have the Entity Instance are greater than Instance start.
Change-Id: I10f7cf4e87cb5eb8fe1da81561263e1604418c45 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
7bb412f5 | 25-Sep-2023 |
Willy Tu <wltu@google.com> |
dbus-sdr: sel: Fix dst setting
Use the day time saving information on the system to calculate the time instead of zero (no dst) as the default.
https://linux.die.net/man/3/mktime
Failure Example,
dbus-sdr: sel: Fix dst setting
Use the day time saving information on the system to calculate the time instead of zero (no dst) as the default.
https://linux.die.net/man/3/mktime
Failure Example, ``` $ stat /var/log/ipmi_sel File: /var/log/ipmi_sel Size: 88 Blocks: 8 IO Block: 4096 regular file Device: 1bh/27d Inode: 4125 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-09-25 14:37:03.631424968 -0700 Modify: 2023-09-25 14:37:02.291422780 -0700 Change: 2023-09-25 14:37:02.291422780 -0700
$ ipmitool sel SEL Information Version : 1.5 (v1.5, v2 compliant) Entries : 0 Free Space : 65535 bytes or more Percent Used : unknown Last Add Time : 09/25/23 14:30:08 PDT Last Del Time : Not Available Overflow : false Supported Cmds : 'Reserve'
$ ipmitool sel list 1 | 09/25/23 | 15:30:07 PDT | reserved #0xff | | Asserted ```
Tested: Fixed the timezone issues ``` $ ipmitool sel list 1 | 09/25/23 | 14:30:07 PDT | reserved #0xff | | Asserted ```
Change-Id: I23bdb5039bed8e135f06d399a5e970bbc1e5ed58 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
e70c59b8 | 21-Sep-2023 |
Thang Tran <thuutran@amperecomputing.com> |
dbus-sdr: support reading OEM SEL logs
This commit supports reading OEM SEL record type in range 0xC0-0xDF and 0xE0-0xFF.
Tested: Request to show SEL logs, OEM SEL log is shown.
Change-Id: I8e
dbus-sdr: support reading OEM SEL logs
This commit supports reading OEM SEL record type in range 0xC0-0xDF and 0xE0-0xFF.
Tested: Request to show SEL logs, OEM SEL log is shown.
Change-Id: I8e2d2d84143c79cb7e3575c3f713d2b3ad2aaaf7 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
dbf66e1b | 21-Sep-2023 |
Thang Tran <thuutran@amperecomputing.com> |
dbus-sdr: remove redundant Get/Set SEL time commands
In the dbus-sdr, the Set SEL time command is not implemented, it is an dummy function. Beside that the Get SEL command does not refer to dbus int
dbus-sdr: remove redundant Get/Set SEL time commands
In the dbus-sdr, the Set SEL time command is not implemented, it is an dummy function. Beside that the Get SEL command does not refer to dbus interface to get the SEL time, it is geting directly from hardware.
Both Set/Get SEL time commands are implemented in storagehandler.cpp file, therefore, we should remove redundant commands in the dbus-sdr.
Tested: 1. Disable NTP $timedatectl set-ntp false 2. Request to Set SEL time $ipmitool sel time set "12/31/2020 12:00:00" 12/31/20 00:00:00 UTC 3. Request to Get SEL time $ipmitool sel time get 12/31/20 00:00:03 UTC
Change-Id: I8545d4a604c2f01f5c771be99cff9a638d08d54d Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
369824e7 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ic5fd073faa7391d3f0b37787d6a9c7688c9a3253 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|