402024a8 | 16-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
sensorhandler: Support NonRecoverable in getSensorThresholds method
There are actually three types of threshold interfaces (Warning, Critical, and NonRecoverable). This patch supports the NonRecover
sensorhandler: Support NonRecoverable in getSensorThresholds method
There are actually three types of threshold interfaces (Warning, Critical, and NonRecoverable). This patch supports the NonRecoverable interface in the getSensorThresholds method.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ie9a7ff44b4e58702c5522a308d8128fcfb1161ef
show more ...
|
b4b40918 | 17-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
ipmid: switch to lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I838587b2d564f3c00b78ce37e175d7e8ace51142 |
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 ...
|
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 ...
|
b9a39863 | 15-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
dbus-sdr: Remove unused IPMINetfnSensorCmds
Since IPMINetfnSensorCmds is never used after the declaration, and ipmi::sensor_event in ipmid/api-types.hpp is used uniformly, this commit removes IPMINe
dbus-sdr: Remove unused IPMINetfnSensorCmds
Since IPMINetfnSensorCmds is never used after the declaration, and ipmi::sensor_event in ipmid/api-types.hpp is used uniformly, this commit removes IPMINetfnSensorCmds.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I59d5c4ef437e47e78371d8606f3399b678e77415
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 ...
|
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 ...
|
3c1e28e4 | 04-Feb-2024 |
George Liu <liuxiwei@ieisystem.com> |
utils: Unused methods are marked as deprecated
The getAllAncestors and deleteAllDbusObjects methods in utils.hpp are not used and are not used in the reops. This commit marks these methods as deprec
utils: Unused methods are marked as deprecated
The getAllAncestors and deleteAllDbusObjects methods in utils.hpp are not used and are not used in the reops. This commit marks these methods as deprecated marked for removal after 2025-03-30 unless disputed.
Tested: ipmitool works fine with this patch.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Icd53a9effc53c12b5db05b90b75c3addf6c02d5b
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 ...
|
50f186c1 | 04-Feb-2024 |
George Liu <liuxiwei@ieisystem.com> |
utils: Add the getSubTree method
The purpose of this patch is to prevent other methods from calling ObjectMapper's `GetSubTree` property, but to obtain the correct the objectTree values by calling t
utils: Add the getSubTree method
The purpose of this patch is to prevent other methods from calling ObjectMapper's `GetSubTree` property, but to obtain the correct the objectTree values by calling the standard the getSubTree method.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ia719f92ca31fa75f83a7ffd07fdcb680bd4243b0
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 ...
|
68d9d405 | 09-Nov-2023 |
Matt Simmering <matthew.simmering@intel.com> |
Update terminology used within repo
Update the terms to more inclusive language. This change if only for variables used in the repo.
Change-Id: I5151c9c2efab707b5dbc707e55333a3cb8c4e32b Signed-off-
Update terminology used within repo
Update the terms to more inclusive language. This change if only for variables used in the repo.
Change-Id: I5151c9c2efab707b5dbc707e55333a3cb8c4e32b Signed-off-by: Matt Simmering <matthew.simmering@intel.com>
show more ...
|
c329ceea | 01-Sep-2023 |
Willy Tu <wltu@google.com> |
unpack: Support std::span as package arguments
Change-Id: Iae594c0d1b10e96dd4fd1a83cdf60c0757f9f3bd Signed-off-by: Willy Tu <wltu@google.com> |
57f4941c | 01-Nov-2023 |
Peter Foley <pefoley@google.com> |
types: Support allocator rebinding
Avoid build failures with libc++ like: include/c++/v1/vector:407:19: error: static assertion failed due to requirement 'is_same<ipmi::SecureAllocator<unsigned char
types: Support allocator rebinding
Avoid build failures with libc++ like: include/c++/v1/vector:407:19: error: static assertion failed due to requirement 'is_same<ipmi::SecureAllocator<unsigned char>, std::allocator<unsigned char>>::value': [allocator.requirements] states that rebinding an allocator to the same type should result in the original allocator 407 | static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
Change-Id: I6f9637e2177669dce3509243135135a1b73fa9fe Signed-off-by: Peter Foley <pefoley@google.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 ...
|
202702b0 | 15-Sep-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Fix std::optional maybe-uninitialized (maybe?)
Attempt to fix the GCC waybe-uninitialized warning for unpackArgs. It only triggers on compilation of one command handler (ipmiSensorGetDeviceSdrInfo)
Fix std::optional maybe-uninitialized (maybe?)
Attempt to fix the GCC waybe-uninitialized warning for unpackArgs. It only triggers on compilation of one command handler (ipmiSensorGetDeviceSdrInfo) with a single std::optional<uint8_t> param.
The warning is a false positive (I think) but GCC seems to like it if we get rid of the empty emplace() call in the underlying std::optional unpack function.
Tested: Compiles in the unit-test docker environment when configured with `meson setup --reconfigure build -Dwerror=true -Dwarning_level=3 --buildtype=debugoptimized`
Change-Id: Ida8b82dbf2227d3b5339cd4b5756729eeeea9e1d Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
1b42a9c5 | 28-Aug-2023 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Silence false positive for uninitialized variable
g++ sometimes complains that *inputArgs might be uninitialized This is never the case. If the unpacker fails to fill every item in unpackArgs, this
Silence false positive for uninitialized variable
g++ sometimes complains that *inputArgs might be uninitialized This is never the case. If the unpacker fails to fill every item in unpackArgs, this function returns early. So this is just to silence the build.
Change-Id: Ic1e25127227e0b00ee962ba9949de534bdb8a6a2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
ed6f460d | 25-Aug-2023 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Fix for g++-13
g++-13 is complaining about a variable that may be getting used prior to initialization. This is a false alarm, since the only 'using' that the variable gets is assignment, but it is
Fix for g++-13
g++-13 is complaining about a variable that may be getting used prior to initialization. This is a false alarm, since the only 'using' that the variable gets is assignment, but it is simple enough to provide a default constructor to get rid of the warning.
Change-Id: I3312149f32a9a605b522eb6f1f8d9afb982fb3c6 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
69c945ea | 26-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
fix GCC 13 issues
GCC 13 has moved `uint*_t` family from being included in a default include tree. Explicitly add `#include <cstdint>` to give these types.
Also remove one useless `std::move`.
Si
fix GCC 13 issues
GCC 13 has moved `uint*_t` family from being included in a default include tree. Explicitly add `#include <cstdint>` to give these types.
Also remove one useless `std::move`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3e69ff4d3aa4a52856fc57b8d8babd32693324ee
show more ...
|
9cf0838a | 28-Apr-2023 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
move entity_map_json to libipmid
entity_map_json is used by dbus-sdr sensor handling so it needs to be in a common location or loading order matters. This change moves the file from the ipmi20 provi
move entity_map_json to libipmid
entity_map_json is used by dbus-sdr sensor handling so it needs to be in a common location or loading order matters. This change moves the file from the ipmi20 provider library to libipmi, a common library.
Tested: Found that even though the dbus-sdr provider loads before ipmi20, it loads properly without missing symbols.
Change-Id: I9ab6833c78e6f3c89c02cf998ce0a36353059c3d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
23a722ca | 12-May-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Enable Yocto control of the USING_ENTITY_MANAGER_DECORATORS
The USING_ENTITY_MANAGER_DECORATORS compile switch is hard coded to enabled in a header file. The changes here allow the feature to be con
Enable Yocto control of the USING_ENTITY_MANAGER_DECORATORS
The USING_ENTITY_MANAGER_DECORATORS compile switch is hard coded to enabled in a header file. The changes here allow the feature to be controlled in recipes via PACKAGECONFIG entries in bbappend files.
Tested: Applied https://gerrit.openbmc.org/c/openbmc/openbmc/+/63434 Modified internal bbappend file to PACKAGECONFIG:remove entity-manager-decorators Confirmed the code guarded by the ifdef no longer compiled Removed change to bbappend file Confirmed the code guarded by the ifdef was restored.
Change-Id: I4f3072451f893fcb5edaa478d0546253e7005b9f Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
fbc6c9d7 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 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-16 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: I44441096113929ce96eb1439e2932e6ff3c87f27 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
45d41931 | 17-Oct-2022 |
Willy Tu <wltu@google.com> |
cleanup Secure types
Removed `std::allocator::rebind` since it has been (deprecated in C++17)(removed in C++20). Also cleaned up the OPENSSL_cleanse for SecureString and SecureBuffer to just point t
cleanup Secure types
Removed `std::allocator::rebind` since it has been (deprecated in C++17)(removed in C++20). Also cleaned up the OPENSSL_cleanse for SecureString and SecureBuffer to just point to the beginning of the data with `this->data()`.
Change-Id: I3bd5b65171a4c5b49f8747d13984e1ce96c00190 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
76889090 | 17-Oct-2022 |
Willy Tu <wltu@google.com> |
fix clang-tidy error for overriding destructor
Fixing the error like in ``` /usr/local/include/ipmid/types.hpp:294:28: error: non-constexpr declaration of '~basic_string' follows constexpr declarati
fix clang-tidy error for overriding destructor
Fixing the error like in ``` /usr/local/include/ipmid/types.hpp:294:28: error: non-constexpr declaration of '~basic_string' follows constexpr declaration [clang-diagnostic-error] inline ipmi::SecureString::~SecureString() ^ /../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/basic_string.h:794:7: note: previous declaration is here ~basic_string() ^ /usr/local/include/ipmid/types.hpp:300:28: error: non-constexpr declaration of '~vector' follows constexpr declaration [clang-diagnostic-error] inline ipmi::SecureBuffer::~SecureBuffer() ^ /../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:728:7: note: previous declaration is here ~vector() _GLIBCXX_NOEXCEPT
```
Remove using alias and overriding the destructor and inherent the class instead.
Change-Id: Ia8972d8b194d8340e67da3e0f53165e42c25f643 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
4eca2510 | 20-Jun-2022 |
Willy Tu <wltu@google.com> |
dbus-sdr: Remove excessive `Failed to GetAll` error message
The `Failed to GetAll` message will happen if any of the sensor doesn't have `Inventory.Decorator.Ipmi` dbus interface. Instead of making
dbus-sdr: Remove excessive `Failed to GetAll` error message
The `Failed to GetAll` message will happen if any of the sensor doesn't have `Inventory.Decorator.Ipmi` dbus interface. Instead of making a `GetAll` call to all sensors, we will check if the sensor have the interface first before requesting it. This will remove the need to attempt sigificantly amount of unnecessary dbus calls.
Tested: ipmitool sdr return the same sensor as before, but with no excessive error message.
There is also some performance gain after removing the extra dbus calls.
Before, ``` $ time ipmitool sdr | wc -l 346
real 0m13.786s user 0m0.315s sys 0m0.115s
$ time ipmitool sdr | wc -l 346
real 0m14.692s user 0m0.274s sys 0m0.196s ```
After, ``` $ time ipmitool sdr | wc -l 346
real 0m11.765s user 0m0.205s sys 0m0.155s
$ time ipmitool sdr | wc -l 346
real 0m11.403s user 0m0.269s sys 0m0.141s ```
Change-Id: Ieab19fbae9e1fb40c2cfac9cd584cf40dba3f500 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|