#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
9714050f |
| 17-Sep-2021 |
Lei YU <yulei.sh@bytedance.com> |
sensor-cache: Implement reading data
Implement reading data in property changed callback. With sensor-cache, the sensor's property is returned by the callback of propertiesChanged match, parse the p
sensor-cache: Implement reading data
Implement reading data in property changed callback. With sensor-cache, the sensor's property is returned by the callback of propertiesChanged match, parse the property from the message and generate the sensor's response.
Tested: Verify the sensors using `readingData` have valid values in QEMU, e.g.
Inlet_Temp | 20.000 | degrees C | ok | na | 0.000 | 5.000 | 38.000 | 43.000 | na
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I2c6328cb6001d0daf2045d17e73773dccf55d521
show more ...
|
#
8c2c048e |
| 16-Sep-2021 |
Lei YU <yulei.sh@bytedance.com> |
sensor-cache: Use new get function
The get function for sensor-cache will use the sdbusplus message to get the sensor data instead of making DBus calls, where the sdbusplus message could be a signal
sensor-cache: Use new get function
The get function for sensor-cache will use the sdbusplus message to get the sensor data instead of making DBus calls, where the sdbusplus message could be a signal callback, or the getAllProperty's reply message.
So the get function's prototype is changed.
Tested: Verify the build is OK when enable or disable the sensor-cache option.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ife2f55d87ce2b0941a4efdb599e46d80d827c2ff
show more ...
|
#
997952af |
| 30-Jul-2021 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add a SecureBuffer class SecureBuffer is like SecureString, but a specialization of std::vector<uint8_t> that cleans up after itself Tested: Executed various ipmi commands to se
Add a SecureBuffer class SecureBuffer is like SecureString, but a specialization of std::vector<uint8_t> that cleans up after itself Tested: Executed various ipmi commands to see that they still work Change-Id: Ifd255ef682d6e46d981de6a5a294d12f3666698b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
c5324251 |
| 31-Oct-2019 |
Tony Lee <tony.lee@quantatw.com> |
Fix issues and support signed sensor values Sensor will get "disable" when the command "ipmitool sdr elist" is executed that if sensorReadingType is 0x6F. sensor_units_1 is alwa
Fix issues and support signed sensor values Sensor will get "disable" when the command "ipmitool sdr elist" is executed that if sensorReadingType is 0x6F. sensor_units_1 is always set to 0 currently. To support the display of signed sensor values, we add the attribute "sensorUnits1" to the sensor mapping yaml. This attribute can be used to determine whether the sensor is signed. It were making negative values 0 in get::readingData(). Fix the issue by using a int32_t and add an overflow check. Change-Id: I705defcf18805db9ada7d0de0738a59aedab61df Signed-off-by: Tony Lee <tony.lee@quantatw.com>
show more ...
|
#
745164cc |
| 25-Jun-2021 |
Snehalatha Venkatesh <snehalathax.v@intel.com> |
Move SecureString class to ipmid/types.hpp SecureString class doesn't have access in user_library to use in other files Tested: Added class to ipmid/types.hpp from user_chan
Move SecureString class to ipmid/types.hpp SecureString class doesn't have access in user_library to use in other files Tested: Added class to ipmid/types.hpp from user_channel/user_mgmt.hpp Build got successful. Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> Change-Id: I5e0c4bb0744113e70540b272f16a5116421048fb
show more ...
|
#
d2afd054 |
| 10-Dec-2020 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: ipmiSetSensorReading handles discrete event for VR Add the functionality for setting Voltage Regulator Mode as a writable discrete sensor. Move sensor related helper functions
dbus-sdr: ipmiSetSensorReading handles discrete event for VR Add the functionality for setting Voltage Regulator Mode as a writable discrete sensor. Move sensor related helper functions into the namespace of sensor. The VR Controller is distinguished as having an interface of xyz.openbmc_project.Control.VoltageRegulatorMode: https://github.com/openbmc/phosphor-dbus-interfaces/blob/a7a6db3f770f5a1a5fd660ba3f6a611c435db616/xyz/openbmc_project/Control/VoltageRegulatorMode.interface.yaml Tested = integrate-tested with VR daemon and ipmitool: Example Tests, // Setting to profileB (4) $ ipmitool raw 0x4 0x30 0xb4 0 0 4 0 0 0 0 0 0 -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x30 data_len=10) RAW REQUEST (10 bytes) b4 00 00 04 00 00 00 00 00 00 RAW RSP (0 bytes) // Setting to profileA (2) $ ipmitool raw 0x4 0x30 0xb4 0 0 2 0 0 0 0 0 0 -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x30 data_len=10) RAW REQUEST (10 bytes) b4 00 00 02 00 00 00 00 00 00 RAW RSP (0 bytes) $ journalctl -u vr_sensor_profiled.service --since "1 min ago" | tee -- Logs begin at Thu 1970-01-01 00:00:25 UTC, end at Thu 1970-01-01 00:49:52 UTC. -- Jan 01 00:49:11 $HOST vr_sensor_profiled[4195]: Info: Transition VR Sensor 0 profile from profileA to profileB Jan 01 00:49:52 $HOST vr_sensor_profiled[4195]: Info: Transition VR Sensor 0 profile from profileB to profileA Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I9d6d2e8e5fa6b2be804a2657c6db079562247d90 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
de54f486 |
| 26-Jan-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: Initial Dynamic Sensor Stack Migrate intel-ipmi-oem dynamic sensor stack into phosphor-host-ipmid for more general use. The files are copied from https://gerrit.op
dbus-sdr: Initial Dynamic Sensor Stack Migrate intel-ipmi-oem dynamic sensor stack into phosphor-host-ipmid for more general use. The files are copied from https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/39743 https://gerrit.openbmc-project.xyz/plugins/gitiles/openbmc/intel-ipmi-oem/+/b910987a7d832e38e9342f0946aeb555a48f9cb0 Created `libdynamiccmds` to enable dynamic sensor stack. Minor changes in the migration include: 1, Removing the use of `commandutils.hpp` in all files since it is only used for ``` static constexpr bool debug = false; ``` It is added to `sdrutils.hpp` instead. 2, Update lastWriteAddr to size_t to match the vector.size() type during comparison. 3, Renamed the sensorcommand unit test to sensorcommands_unitest.cpp 4, Removed unused variables. - sensorcommands ``` constexpr uint8_t thresholdMask = 0xFF; ``` - sensorcommands_unitest ``` double yError = std::abs(y - yRoundtrip); ``` 5, Removed Intel Specific Changes - Redfish logs - node manager/ME - BIOS to SEL event 6, Removed externing a global variable for sensorTree. - Replaced it with a method that returns a singleton - auto& sensorTree = getSensorTree(); for access 7, Replaced intel_oem namespace with dynamic_sensors 8, Removed types.hpp and use `ipmid/types.hpp` directly - Updated the types to match ipmid/types - Added Association and std::vector<Association>> under Value. 9, Add cpp files for sdrutils and sensorutils. 10, link libipmid as it is required for getManagedObjects needed by sensorcommands.cpp Signed-off-by: Willy Tu <wltu@google.com> Change-Id: If944620c895ecf4c9f4c3efe72479f4de276f4fb Signed-off-by: Vijay Khemka <vijaykhemkalinux@gmail.com>
show more ...
|
#
be4ffa87 |
| 10-Aug-2020 |
Jeremy Kerr <jk@codeconstruct.com.au> |
sensor yaml: allow custom sensor names Currently, we can only name sensors based on data from the dbus object implementing a sensor's interface. While this mostly works, there may no
sensor yaml: allow custom sensor names Currently, we can only name sensors based on data from the dbus object implementing a sensor's interface. While this mostly works, there may not be a sensible name to extract in all cases. This change introduces an optional sensorName property to the sensor YAML description, which allows a custom name to be used. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Change-Id: I3f3b8ef581c70fbde94db122d4f3c0ca181c6ff7
show more ...
|
#
4cc42556 |
| 11-Sep-2019 |
Sui Chen <suichen@google.com> |
Refactor ipmi::sensor::GetSensorResponse away from std::array This change refactors GetSensorResponse from std::array to struct. This change depends on change #23544. GetSensorR
Refactor ipmi::sensor::GetSensorResponse away from std::array This change refactors GetSensorResponse from std::array to struct. This change depends on change #23544. GetSensorResponse is an internal, intermediate structure, an unpacked form of a Get Sensor Reading response, providing direct access to its fields. Its life time is: GetReadingResponse -> GetSensorResponse -> ipmi::RspType. It is written to in 5 functions in the ipmi::sensor::get namespace, by four setter functions (setOffset, setReading, setAssertionBytes, enableScanning). It is currently read from by 1 function (ipmiSensorGetSensorReading) for transforming to an ipmi::RspType. Originally, the setter functions assumed bitwise equivalence between GetSensorResponse and GetReadingResponse, and the setter functions used reinterpret_cast to assign to a GetSensorResponse as if it were a GetReadingResponse. With this change, the reinterpret_cast's are removed, and the set functions now accept GetSensorResponse instead of GetReadingResponse, so the code gets a bit easier to read. Tested: Tested using a server with a BMC; sensor readings obtained through `ipmitool` appear to be correct (the reading might change within a small range): # ipmitool raw 0x04 0x2d 0x16 9B 40 00 00 Signed-off-by: Sui Chen <suichen@google.com> Change-Id: I5d454d6249f5431fb98169e6ef7c585c34024004
show more ...
|
#
c514d874 |
| 06-Apr-2019 |
William A. Kennington III <wak@google.com> |
transporthandler: Rewrite + New Handler This rewrites the old transport handler to use the new ipmi handler registration functions. It attempts to clean up the old code, by refactori
transporthandler: Rewrite + New Handler This rewrites the old transport handler to use the new ipmi handler registration functions. It attempts to clean up the old code, by refactoring any business logic out of the code that parses the IPMI messages. This makes the code paths easier to understand and allows for better code re-use. This also gets rid of the concept of the settings change timer. Clients expect to see their settings take effect as soon as they are set, regardless of the "Set In Progress" flag. This means we no longer need a cache for our network settings that are about to be set by the daemon, and a client can hold the BMC in "Set In Progress" while it verifies settings like other BMC implementations. Change-Id: I5406a674f087600afdfc2c0b3adeacde10986abc Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
16b8693d |
| 01-May-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
remove usage of sdbusplus::message::variant sdbusplus has had its alias of std::variant in place for long enough. This changes all ipmid references to use std::variant directly inste
remove usage of sdbusplus::message::variant sdbusplus has had its alias of std::variant in place for long enough. This changes all ipmid references to use std::variant directly instead of the sdbusplus alias. Tested-by: building and running ipmid Change-Id: Id5b4136d4589aa598815edd3ef4202e64a7698e2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
33250240 |
| 12-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
move types.hpp to ipmid/types.hpp for export types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory,
move types.hpp to ipmid/types.hpp for export types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory, changes the Makefile to export it, and changes all the files that include it so it can be found in the right place. Change-Id: I30ec365446e4de466c266ec4faa327478460ec05 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|