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 ...
|
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 ...
|
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 ...
|
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 ...
|
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 ...
|
b53049e8 | 02-Apr-2022 |
Albert Zhang <zhanghaodi@inspur.com> |
Adding a yielding option callDbusMethod
Currently there are a lot of yielding options that takes in utils.hpp the ipmi::Context::ptr, but without callDbusMethod, Now add this method to meet the need
Adding a yielding option callDbusMethod
Currently there are a lot of yielding options that takes in utils.hpp the ipmi::Context::ptr, but without callDbusMethod, Now add this method to meet the needs.
Tested: The callDbusMethod method is called in a library, the compilation is passed, and the functional test is successful.
Signed-off-by: Albert Zhang <zhanghaodi@inspur.com> Change-Id: Id46f93708728b4449804ceedfa6d269071e52278
show more ...
|
5d82f474 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibd2a0b512bfb7caf65bfab64b271d194da520aac
show more ...
|
7d7a6858 | 25-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
avoid non-virtual-dtor warnings
``` ../subprojects/phosphor-host-ipmid/include/ipmid/handler.hpp:157:7: error: base class ‘class ipmi::HandlerBase’ has accessible non-virtual destructor [-Werror=non
avoid non-virtual-dtor warnings
``` ../subprojects/phosphor-host-ipmid/include/ipmid/handler.hpp:157:7: error: base class ‘class ipmi::HandlerBase’ has accessible non-virtual destructor [-Werror=non-virtual-dtor] ../subprojects/phosphor-host-ipmid/include/ipmid/filter.hpp:37:7: error: ‘class ipmi::FilterBase’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib1f8befabc6ea4564524c474118b78f05403413d
show more ...
|
b4905919 | 17-Jun-2022 |
Tim Lee <timlee660101@gmail.com> |
ipmid: message: fix pack/unpack compile error at aarch64 platform
After debugging with boost/multiprecision owner jzmaddock. We have found the root cause why boost v1.79.0 got this compile error in
ipmid: message: fix pack/unpack compile error at aarch64 platform
After debugging with boost/multiprecision owner jzmaddock. We have found the root cause why boost v1.79.0 got this compile error in ipmid. More detail you can refer from https://github.com/boostorg/multiprecision/issues/472
Root cause: Boost changed all bit counts from unsigned to std::size_t, specifically for platforms like arm64 (and windows!) where unsigned is narrower than size_t so that the maximum representable number isn't unnecessarily constrained.
This then changes the interface for cpp_int_backend to use size_t rather than unsigned for the bit counts. On most platforms and most use cases, this makes no perceptible difference, but unfortunately this appears to be one situation where it really does make a difference.
Apparently this is true even though:
template <unsigned N> using fixed_uint_t = boost::multiprecision::number<boost::multiprecision::cpp_int_backend< N, N, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>;
Is declared with an unsigned parameter, when partially specializing for fixed_uint_t you need to use the actual type of the template parameter in the underlying template, not the type used in the template alias!
Solution: Change all usage of unsigned for bitcounts to a new typedef bitcount_t which is size_t for Boost-1.79 and later, and unsigned for Boost-1.78 and earlier.
Verified: No compile error at aarch64 platform and test ipmitool sdr command is pass.
Signed-off-by: jzmaddock <john@johnmaddock.co.uk> Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: Id7a7c86ef854f4b9c06fc4da054c8021f76812b8
show more ...
|
11d68897 | 20-Jan-2022 |
Willy Tu <wltu@google.com> |
cleanup: Remove all warning errors for the Meson build support
Remove all the build warning to prepare for the meson build. Meson build will be in https://gerrit.openbmc-project.xyz/c/openbmc/phosph
cleanup: Remove all warning errors for the Meson build support
Remove all the build warning to prepare for the meson build. Meson build will be in https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/47748
Tested: Ipmi command works fine the cleanup. ``` $ systemctl status phosphor-ipmi-host ● phosphor-ipmi-host.service - Phosphor Inband IPMI Loaded: loaded (/lib/systemd/system/phosphor-ipmi-host.service; enabled; vendor preset: enabled) Active: active (running) since Thu 1970-01-08 21:20:56 UTC; 21s ago Main PID: 24987 (ipmid) CGroup: /system.slice/phosphor-ipmi-host.service └─24987 /tmp/ipmid
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X30] for Ethstats Commands Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X30] for Ethstats Commands Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X32] for Sys Commands Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X02] for I2C Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X02] for I2C Jan 08 21:20:56 $HOST ipmid[24987]: I2C_WHITELIST_CHECK is disabled, do not populate whitelist Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X04] for Manual Zone Control Jan 08 21:20:56 $HOST systemd[1]: Started Phosphor Inband IPMI. Jan 08 21:20:56 $HOST ipmid[24987]: Loading whitelist filter Jan 08 21:20:56 $HOST ipmid[24987]: Set restrictedMode = true (reverse-i-search)`ipmi': systemctl status phosphor-^Cmi-host
$ ipmitool mc info Device ID : 32 Device Revision : 1 Firmware Revision : 0.00 IPMI Version : 2.0 Manufacturer ID : 7244 Manufacturer Name : Quanta Computer Inc. Product ID : 14426 (0x385a) Product Name : Unknown (0x385A) Device Available : yes Provides Device SDRs : yes Additional Device Support : Sensor Device SEL Device FRU Inventory Device Chassis Device Aux Firmware Rev Info : 0x00 0x00 0x00 0x00 ```
Change-Id: I372c9433a274bc633a24d213b7a1bc205531e33d Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
33457108 | 26-Apr-2022 |
Jian Zhang <zhangjian.3032@bytedance.com> |
Add data types to Value to extend setDbusProperty
Add new data types std::vector<uint8_t>, std::vector<uint16_t>, std::vector<uint32_t> to support setDbusProperty to get/set the corresponding type o
Add data types to Value to extend setDbusProperty
Add new data types std::vector<uint8_t>, std::vector<uint16_t>, std::vector<uint32_t> to support setDbusProperty to get/set the corresponding type of data.
Change-Id: I2a67f13273c8c317c2481184101b4b09392bf829 Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
show more ...
|
30f88f02 | 11-Feb-2022 |
Lei YU <yulei.sh@bytedance.com> |
ipmid: message: pack: Fix cast issue
clang-tidy finds an issue related to below line:
uint64_t bits = t;
where if t is something like unit24_t, it gets compile error:
/usr/local/include/i
ipmid: message: pack: Fix cast issue
clang-tidy finds an issue related to below line:
uint64_t bits = t;
where if t is something like unit24_t, it gets compile error:
/usr/local/include/ipmid/message/pack.hpp:141:18: error: no viable conversion from 'const fixed_uint_t<24U>' (aka 'const number<boost::multiprecision::cpp_int_backend<24U, 24U, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>') to 'uint64_t' (aka 'unsigned long') [clang-diagnostic-error]
Fix it by using static_cast.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I8cda6ec7dc48cab0da38cd1c587eb2da2121d287
show more ...
|
8e8152c5 | 06-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
sensor-cache: Use async calls in get sensor reading
Use the async calls in ipmiSensorGetSensorReading() for cached sensors.
Note that the code was using sdbusplus::message as the parameter for the
sensor-cache: Use async calls in get sensor reading
Use the async calls in ipmiSensorGetSensorReading() for cached sensors.
Note that the code was using sdbusplus::message as the parameter for the getFunc(), now it could be simplified to ipmi::PropertyMap and unify the two cases: property update callback and getting property.
Tested: Verify the ipmi sensor list works fine.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: If7afed410f794a5317b8d4b4965cac291a735d12
show more ...
|