#
03a8fe36 |
| 10-Dec-2024 |
Chris Cain <cjcain@us.ibm.com> |
Update persistent power cap data filename
Renamed the file that holds the persistent power cap limits. Also will only use the data if the version field matches. This will prevent a conflict with the
Update persistent power cap data filename
Renamed the file that holds the persistent power cap limits. Also will only use the data if the version field matches. This will prevent a conflict with the old power cap data.
Verified on Rainier.
Change-Id: Ifc0a16ac8df557b7453a0fb4f4f8962f6fc70a31 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
d6ced7cb |
| 17-Oct-2022 |
Chris Cain <cjcain@us.ibm.com> |
Add CapLimits dbus interface to occ-control app
The power cap limits were previously hosted by Settings, but those are system settings and the limits are not really settings (users can not adjust th
Add CapLimits dbus interface to occ-control app
The power cap limits were previously hosted by Settings, but those are system settings and the limits are not really settings (users can not adjust these). This will allow occ-control to update these limits as required but makes them readonly on dbus. occ-control will now be persisting these limits.
Tested on Rainier:
''' => busctl -l introspect org.open_power.OCC.Control /xyz/openbmc_project/control/host0/power_cap_limits ... xyz.openbmc_project.Control.Power.CapLimits interface - - - .MaxPowerCapValue property u 2777 emits-change .MinPowerCapValue property u 1286 emits-change .MinSoftPowerCapValue property u 556 emits-change
=> hexdump /var/lib//openpower-occ-control/powerCapData 0000000 0001 0000 0001 0000 022c 0000 0506 0000 0000010 0ad9 0000 0000014 '''
Change-Id: I75fd98be18c884961f417cc53213b9cb06a82947 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
f3a4a69f |
| 27-Dec-2021 |
George Liu <liuxiwei@inspur.com> |
Fix some warnings by cppcheck
Warning message: ../../../occ_events.hpp:16:9: warning: Value stored to 'event' is never read [deadcode.DeadStores] event = sd_event_unref(event); ^
Fix some warnings by cppcheck
Warning message: ../../../occ_events.hpp:16:9: warning: Value stored to 'event' is never read [deadcode.DeadStores] event = sd_event_unref(event); ^ ~~~~~~~~~~~~~~~~~~~~~ ../../../occ_events.hpp:26:9: warning: Value stored to 'eventSource' is never read [deadcode.DeadStores] eventSource = sd_event_source_unref(eventSource);
occ_dbus.cpp:34:47: performance: Searching before insertion is not necessary. [stlFindInsert] path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str())); ^ occ_dbus.cpp:61:47: performance: Searching before insertion is not necessary. [stlFindInsert] path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str())); ^ occ_dbus.cpp:88:47: performance: Searching before insertion is not necessary. [stlFindInsert] path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str())); ^ occ_dbus.cpp:115:47: performance: Searching before insertion is not necessary. [stlFindInsert] path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str())); ^ occ_dbus.cpp:158:80: performance: Searching before insertion is not necessary. [stlFindInsert] operationalStatus.emplace(path, std::make_unique<OperationalStatusIntf>( ^ occ_pass_through.hpp:42:5: style: Class 'PassThrough' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] PassThrough(const char* path); ^ powercap.hpp:41:5: style: Class 'PowerCap' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] PowerCap(Status& occStatus, ^ occ_manager.hpp:77:5: style: Struct 'Manager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] Manager(EventPtr& event) : ^ occ_status.hpp:307:26: style: Local variable 'path' shadows outer variable [shadowVariable] auto path = fs::path(estimatedPath); ^ occ_status.hpp:207:17: note: Shadowed declaration std::string path; ^ occ_status.hpp:307:26: note: Shadow variable auto path = fs::path(estimatedPath); ^ pldm.hpp:55:14: warning: Member variable 'Interface::OCCSensorOffset' is not initialized in the constructor. [uninitMemberVar] explicit Interface( ^ pldm.hpp:55:14: warning: Member variable 'Interface::SBESensorOffset' is not initialized in the constructor. [uninitMemberVar] explicit Interface( ^ powermode.hpp:60:5: style: Class 'PowerMode' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] PowerMode(Status& occStatus) : ^ powermode.hpp:96:5: style: Class 'PowerIPS' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] PowerIPS(Status& occStatus) : ^ occ_manager.cpp:321:24: style: The scope of the variable 'path' can be reduced. [variableScope] constexpr auto path = "/org/openpower/dump"; ^ occ_manager.cpp:322:24: style: The scope of the variable 'interface' can be reduced. [variableScope] constexpr auto interface = "xyz.openbmc_project.Dump.Create"; ^ occ_manager.cpp:323:24: style: The scope of the variable 'function' can be reduced. [variableScope] constexpr auto function = "CreateDump"; ^ pldm.cpp:78:16: style: Local variable 'pdr' shadows outer variable [shadowVariable] for (auto& pdr : pdrs) ^ pldm.cpp:48:10: note: Shadowed declaration auto pdr = ^ pldm.cpp:78:16: note: Shadow variable for (auto& pdr : pdrs) ^ pldm.cpp:248:16: style: Local variable 'pdr' shadows outer variable [shadowVariable] for (auto& pdr : pdrs) ^ pldm.cpp:221:10: note: Shadowed declaration auto pdr = ^ pldm.cpp:248:16: note: Shadow variable for (auto& pdr : pdrs) ^ powermode.cpp:28:22: style: Variable 'pmode' is assigned a value that is never used. [unreadVariable] SysPwrMode pmode = SysPwrMode::NO_CHANGE;
Tested: Use cppcheck to build successfully and eliminate the above warning message.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I72751dc94db684fc558b4bb57b1924be64ce6760
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 <liuxiwei@inspur.com> Cha
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 ...
|
#
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 operations D-Bus o
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 ...
|
#
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 with the existing c
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 name to write to cha
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 ...
|
#
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/master/cpp-style-an
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 ...
|
#
85e6520e |
| 08-Apr-2018 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: Ia7364
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: Ia7364df04fb1f1842d07b41da23a6fc7c7bd6b3c Signed-off-by: Gunnar Mills <gmills@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-Id: Ia63070d63f4392cc4b084a
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 ...
|
#
6ac874e1 |
| 10-Jul-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Notify OCC of pcap setting changes
Resolves openbmc/openbmc#948
Change-Id: I03193b07ddaf380468bd0c0e62a41220bdeaecce Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
#
4cea4d2b |
| 10-Jul-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Determine pcap value to send to occ
Change-Id: Ie60aac151f5fd8ce091020ce756834e4877cbc93 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
#
52cf26a8 |
| 06-Jul-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Create pcap object and log monitored events
Change-Id: I2d7b3a449e2c9c1d5a0627161f8e85dcaca1e087 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
#
32016d18 |
| 20-Jun-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Register callbacks for pcap property changes
Change-Id: I39b38a931ffdf260d9ee45f02cdd31e9e884b04d Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|