#
d7542c83 |
| 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: I94e2bfdc8fae9bc14e30c701a0e622709ee9b0fe Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
48002498 |
| 13-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
prefer std::format over fmt
Switch to std::format to remove the dependency on fmt.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id3a1295ba8a90fb756cfc500892dcc5b3235e27b
|
#
a49c987e |
| 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: I39f8c77091744c8516e043054b4ed7207d85aa08 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
af40808f |
| 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: I9541d521bf67882215a4a66dce020e38ac2df065
show more ...
|
#
81c83430 |
| 27-Jun-2022 |
Chris Cain <cjcain@us.ibm.com> |
Validate user power cap changes fall within limits
Add validation of the user power cap when changed via Redfish or during boot. Validation also needs to ensure the correct power types are being co
Validate user power cap changes fall within limits
Add validation of the user power cap when changed via Redfish or during boot. Validation also needs to ensure the correct power types are being compared (input/AC vs output/DC).
Verified on hardware with limits set via GUI and Redfish.
Change-Id: Ic0d8ce2df6fdb803bbede7e42f10f34c142c6b07 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
613dc90d |
| 08-Apr-2022 |
Chris Cain <cjcain@us.ibm.com> |
Create PowerMode object before status objects
Need to create the PowerMode object right away so that the Mode/IPS DBus parameters are available to users as soon as service starts. Previously it was
Create PowerMode object before status objects
Need to create the PowerMode object right away so that the Mode/IPS DBus parameters are available to users as soon as service starts. Previously it was only created when the OCC status objects were created.
Also populate the MinSoftPowerCapValue on DBus.
Change-Id: Ia0c7b5ba72a492b14bea7befe4f28c8b99e19ebd Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
d4c19a07 |
| 22-Apr-2022 |
Chris Cain <cjcain@us.ibm.com> |
Prevent updating power cap sysfs file when OCC not active
The power cap can be updated at any time, but occ-control should only update the sysfs files when the OCCs are active. Also prevent sending
Prevent updating power cap sysfs file when OCC not active
The power cap can be updated at any time, but occ-control should only update the sysfs files when the OCCs are active. Also prevent sending pass through commands when OCC is not active.
Change-Id: I7e5d5ad0b897b55a00e4d07c62b917aa62b7f9ef Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
e2d0a43c |
| 28-Mar-2022 |
Chris Cain <cjcain@us.ibm.com> |
Handle file errors when device path gets unbound
occ-control was asserting when the hwmon path would get removed due to device being unbound. This change will gracefully handle the path getting remo
Handle file errors when device path gets unbound
occ-control was asserting when the hwmon path would get removed due to device being unbound. This change will gracefully handle the path getting removed / added back.
Tested on Raininer by unbind/bind of devices: echo occ-hwmon.2 > /sys/bus/platform/drivers/occ-hwmon/unbind echo occ-hwmon.2 > /sys/bus/platform/drivers/occ-hwmon/bind
Change-Id: I46fd2c2c54868ffb8183d3dc49cd0c2751165d3b Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
8676e037 |
| 24-Mar-2022 |
Chris Cain <cjcain@us.ibm.com> |
Convert power cap limits to input power for users
The OCC power values are output/DC power values. Users specify the power values as input/AC power. The bounds/limits come from OCC, so they need to
Convert power cap limits to input power for users
The OCC power values are output/DC power values. Users specify the power values as input/AC power. The bounds/limits come from OCC, so they need to be converted.
input power = output power / efficiency
Change-Id: I65754ce20d02a274416ec6eba240eeb471d900cf Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
40501a23 |
| 14-Mar-2022 |
Chris Cain <cjcain@us.ibm.com> |
Monitor for power cap changes when occ-control started
The object that is monitoring for power cap changes needs to get created when occ-control is started so that changes are not missed. Added vali
Monitor for power cap changes when occ-control started
The object that is monitoring for power cap changes needs to get created when occ-control is started so that changes are not missed. Added validation check to ensure that the value sent to the OCC matches the user configured value on dbus.
Verified on Raininer
Change-Id: I0d77f4569e5459ff58d6fc72147153133d2104a3 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
5d66a0aa |
| 09-Feb-2022 |
Chris Cain <cjcain@us.ibm.com> |
Expose power cap min/max on dbus
The min and max power cap values will be read from sysfs files and then the data will be put on the dbus. This will allow users to know the valid range of power cap
Expose power cap min/max on dbus
The min and max power cap values will be read from sysfs files and then the data will be put on the dbus. This will allow users to know the valid range of power cap available.
The PowerCap object was moved from Manager to Status.
Change-Id: I5196cc8645f84c31a5282cf844109bae47b09bf7 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
1be4337b |
| 09-Dec-2021 |
Chris Cain <cjcain@us.ibm.com> |
Read default power mode & IPS parameters from DBus
If the power mode or idle power saver parameters have never been set, they will be read from a set of default parameters that are on DBus. This all
Read default power mode & IPS parameters from DBus
If the power mode or idle power saver parameters have never been set, they will be read from a set of default parameters that are on DBus. This allows individual systems to have different default settings. Mode/IPS parameters moved from Settings to OCC.Control
Code verified on Everest hardware with multiple scenarios including host reboots, BMC reboots, OCC resets.
Change-Id: Id02613455db7f382791ff37c7dc420dbea1e0906 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
b6535e89 |
| 21-Jan-2022 |
Chris Cain <cjcain@us.ibm.com> |
Prevent hwmon pcap path from getting truncated
When the file path was begin built, one of the subdirectories was prefixed with '/' when ended up making that the base directory. Fix removes the '/' f
Prevent hwmon pcap path from getting truncated
When the file path was begin built, one of the subdirectories was prefixed with '/' when ended up making that the base directory. Fix removes the '/' from the subdirectory
Tested on Everest: ever38bmc openpower-occ-control[5590]: Power Cap Property Change (cap=980W, enabled=n) ever38bmc openpower-occ-control[5590]: PowerCap::writeOcc: path=/sys/bus/platform/drivers/occ-hwmon/occ-hwmon.1/hwmon ever38bmc openpower-occ-control[5590]: Writing pcap value to hwmon
Change-Id: Ia47249cdea06225ebb5869a63582851e4dff4efa Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
bcef3b48 |
| 09-Sep-2021 |
George Liu <liuxiwei@inspur.com> |
Replace std::experimental::filesystem with std::filesystem Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I91d2f1b7a8858ba8c676b68693863bb35b56dffc
|
#
b5ca1015 |
| 09-Sep-2021 |
George Liu <liuxiwei@inspur.com> |
Update clang-format refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format Tested: built openpower-occ-control successfully. Signed-off-by: George Liu <
Update clang-format refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format Tested: built openpower-occ-control successfully. Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I136870023229ff906d471dd4d8debfd404812ff1
show more ...
|
#
25613624 |
| 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
exception: switch to public sdbus exception SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I03198711b6d148e82106ca6ff809c25d814ad201
show more ...
|
#
f3b7514e |
| 09-Jun-2021 |
George Liu <liuxiwei@inspur.com> |
Refactor D-Bus object - The intent behind this commit is to refactor D-Bus, and abstract the bus, getService, getProperty and other methods into the utils file, and other file op
Refactor D-Bus object - The intent behind this commit is to refactor D-Bus, and abstract the bus, getService, getProperty and other methods into the utils file, and other file operations D-Bus only need to include uitls.hpp. - We can also continue to add other general methods such as setPropery, getSubTree in the utils file in the future. - Also, removed redundant files(occ_finder.hpp and occ_finder.cpp). Tested: built openpower-occ-control successfully and worked. Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I53e61e30a76173c154a9f47fc122936468abbc4b
show more ...
|
#
e0962703 |
| 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I46bdb828379d72e16a95fe1bc3cb578bfdfce80c
|
#
305ff8b1 |
| 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7d0f3f6f5249eccaeee4898f2f46cc4b8b882f22
|
#
00a64780 |
| 24-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
Use experimental::filesystem for the power cap Using std::filesystem changes the behavior of the path::/ operator compared to std::experimental::filesystem, and this doesn't work wit
Use experimental::filesystem for the power cap Using std::filesystem changes the behavior of the path::/ operator compared to std::experimental::filesystem, and this doesn't work with the existing code. Specifically, appending a path that starts with a '/' which is done here completely overwrites the base path instead of appending. Change back to using std::experimental::filesytem to keep things consistent with the rest of the code base. If a move to std::filesystem is desired in the future the whole codebase can be changed and tested at once. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2b1cbbbc0ab13f1a0a5bf85494302e68e7adcab3
show more ...
|
#
eaaf3b28 |
| 16-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
Power cap fixes required for the 5.0 kernel The OCC device driver changed in the 5.0 kernel which requires 2 user space changes when setting the OCC user power cap: 1) The file
Power cap fixes required for the 5.0 kernel The OCC device driver changed in the 5.0 kernel which requires 2 user space changes when setting the OCC user power cap: 1) The file name to write to changed to powerX_cap_user, where X is some number. 2) The value changed to microWatts, from Watts. This commit uses a regular expression to find the filename. An alternative method would have been to find the X value by finding which powerX_label file contained the word 'system'. Tested: Ran the ipmitool dcmi commands to set and activate the power cap. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I4f086b2d80944c3bd0ebc627e4df92935d27a5a3
show more ...
|
#
29a8ed18 |
| 06-Nov-2018 |
William A. Kennington III <wak@google.com> |
powercap: Fix std::variant usage Only mapbox has the .get() member function. Use the std::get compatible function instead. Change-Id: If132312404d1a0322889d6ad7bdb6b1cb399e075
powercap: Fix std::variant usage Only mapbox has the .get() member function. Use the std::get compatible function instead. Change-Id: If132312404d1a0322889d6ad7bdb6b1cb399e075 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
94df8c90 |
| 14-Sep-2018 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: Update to match docs repo Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/mas
clang-format: Update to match docs repo Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
13ae5003 |
| 30-May-2018 |
Joseph Reynolds <jrey@us.ibm.com> |
Use s.c_str() in log messages Partly resolves openbmc/openbmc 2905 Also, fixed related problem with parenthesis in occ_presence.cpp. Tested: static_assert only Cha
Use s.c_str() in log messages Partly resolves openbmc/openbmc 2905 Also, fixed related problem with parenthesis in occ_presence.cpp. Tested: static_assert only Change-Id: Ib0dbf9c895e9f636ddc873221fd1ef93980c0353 Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
show more ...
|
#
41470e56 |
| 30-Nov-2017 |
Lei YU <mine260309@gmail.com> |
Powercap: add p8 support P8 uses i2c-occ and powercap is not created. Add P8 support by creating powercap object with i2c device name. Fixes openbmc/openbmc#2688 Change
Powercap: add p8 support P8 uses i2c-occ and powercap is not created. Add P8 support by creating powercap object with i2c device name. Fixes openbmc/openbmc#2688 Change-Id: Ia63070d63f4392cc4b084ab628cdbdcf4206c883 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|