#
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
|
#
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 ...
|
#
36f9cded |
| 22-Nov-2021 |
Chris Cain <cjcain@us.ibm.com> |
Add support for OEM Power Modes
- Allow mode to be set via PassThrough interface - Allow non-customer OEM power modes to be persisted - Persist any OEM power mode settings - moved mode related code
Add support for OEM Power Modes
- Allow mode to be set via PassThrough interface - Allow non-customer OEM power modes to be persisted - Persist any OEM power mode settings - moved mode related code from Status to PowerMode object - merged PowerIPS into PowerMode object
Tested on Everest and Rainier. Setting mode through PassThrough/ce-login: busctl call org.open_power.OCC.Control /org/open_power/control/occ0 org.open_power.OCC.PassThrough SetMode yq 11 3600 Trace (via PassThrough interface) openpower-occ-control[4440]: PassThrough::setMode() Setting Power Mode 11 (data: 3600) openpower-occ-control[4440]: PowerMode::sendModeChange: SET_MODE(11,3600) command to OCC0 (9 bytes) Trace (setting mode via GUI/Redfish): openpower-occ-control[4440]: Power Mode Change Requested: xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance openpower-occ-control[4440]: PowerMode::sendModeChange: SET_MODE(12,0) command to OCC0 (9 bytes) Verified when system in any OEM mode that Redfish also reports OEM Verified all modes are persisted across PM Complex resets and reboots
Change-Id: Idd0be05cb6fd74dbd0776145f212c49addd1c365 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 ...
|
#
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 ...
|
#
a8857c50 |
| 27-Jan-2021 |
Chris Cain <cjcain@us.ibm.com> |
Trigger periodic OCC POLL commands when the OCCs are running
The OCC control app will periodically trigger kernel poll commands to the OCC when the OCCs are active. Code change also adds an interfac
Trigger periodic OCC POLL commands when the OCCs are running
The OCC control app will periodically trigger kernel poll commands to the OCC when the OCCs are active. Code change also adds an interface to allow any OCC command to be sent to an OCC. The pass-through interface was also updated to use the new command object.
Tested: I did several IPLs on multiple Rainier systems to verify the changes. I forced OCC resets to ensure polling stopped when OCCs were disabled and restarted after it came out of reset.
Change-Id: I56970e781a988bb94f17ac38173ace8a68bb5fad Signed-off-by: Chris Cain <cjcain@us.ibm.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/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 ...
|
#
4f4712d8 |
| 21-Jun-2018 |
Eddie James <eajames@us.ibm.com> |
passthrough: only open /dev/occX during the operation
The file handle was left open constantly, resulting in dead file handles when FSI is rescanned.
Change-Id: I1ca8b330131eaad3e3672f5e8fbc3b994e8
passthrough: only open /dev/occX during the operation
The file handle was left open constantly, resulting in dead file handles when FSI is rescanned.
Change-Id: I1ca8b330131eaad3e3672f5e8fbc3b994e8c34d6 Signed-off-by: Eddie James <eajames@us.ibm.com>
show more ...
|
#
3e5422ed |
| 10-Aug-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Delay opening OCC device until bind
Fixes openbmc/openbmc#2118
Change-Id: If9e2610fe7443daa2196b0e5989f81bc544266b2 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
#
2180b2da |
| 28-Jun-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Change occ control service name
Currently, only thing that OCC controller does is create PassThrough objects. However, there is a need now to create OCC Status objects and hence some restructuring i
Change occ control service name
Currently, only thing that OCC controller does is create PassThrough objects. However, there is a need now to create OCC Status objects and hence some restructuring is needed to consume that.
Since OCC control now is doing more than one thing, service name is changed to map to that.
Change-Id: I466979a873d6f14385eb59d0e9d9f3a8b3f95a9b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
fd358d18 |
| 08-May-2017 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
Create OCC pass-through objects
Create OCC pass-through d-bus objects when corresponding CPU objects are created in the inventory.
Resolves openbmc/openbmc#1450.
Change-Id: I8da879f51ebef8dcc3d253
Create OCC pass-through objects
Create OCC pass-through d-bus objects when corresponding CPU objects are created in the inventory.
Resolves openbmc/openbmc#1450.
Change-Id: I8da879f51ebef8dcc3d25358def81c5e0dce0617 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|
#
d13694a0 |
| 01-Jun-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Use /dev/occ instead of /dev/occfifo
Initially, the occ fifo devices were named as /dev/occfifo1..N but it has been renamed to /dev/occ1..N.
Fixes openbmc/openbmc#1696
Change-Id: Ibf37cc3f61a85a46
Use /dev/occ instead of /dev/occfifo
Initially, the occ fifo devices were named as /dev/occfifo1..N but it has been renamed to /dev/occ1..N.
Fixes openbmc/openbmc#1696
Change-Id: Ibf37cc3f61a85a46accd678a55e1b2b6019bd6e5 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
9bb065b8 |
| 18-Apr-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Commit errorlog and exit the application on error scenarios
This application interacts with OCC driver and hence its good to terminate when there is an error during IO since it would mostly mean a f
Commit errorlog and exit the application on error scenarios
This application interacts with OCC driver and hence its good to terminate when there is an error during IO since it would mostly mean a faulty hardware.
Fixes openbmc/openbmc#1428
Change-Id: I48bc7b2cf19922a7a53dbab78cdd4f2338a7431b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
38b08d79 |
| 14-Apr-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Open device and populate file descriptor
Change-Id: I8159f71ff3dd087f10cdf3b013e1acb60d4758fb Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
#
afd21a65 |
| 13-Apr-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Populate device entry based on position
Communicating to OCC from BMC in PassThrough mode involves 2 drivers, namely;
1) SBE FIFO driver --> Used to communicate with SBE 2) OCC driver --> Which use
Populate device entry based on position
Communicating to OCC from BMC in PassThrough mode involves 2 drivers, namely;
1) SBE FIFO driver --> Used to communicate with SBE 2) OCC driver --> Which uses FIFO driver to write data to OCC at a predefined address and reads it back from a predefined OCC address.
Device entry that is of interest here belongs to #2 above. This will map occ0 to fifo1, occ2 to fifo2 and so on. Until the udev rules are in place to make sure that a particular entry always maps to correct device not caring the probing order, this change here is a best guess that cpu0 and cpu1 would mostly in all cases be probed in that order.
Change-Id: I485e0ea4eab1b4c6f59ee4b68c0725f9633cd933 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
6b492fbf |
| 18-Mar-2017 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
Implement org.open_power.OCC.PassThrough
This d-bus interface is implemented by the open_power::occ::pass_through::PassThrough class.
Change-Id: I6bce9e609b7b977418bcfee15e97432cb7d9e6b3 Signed-off
Implement org.open_power.OCC.PassThrough
This d-bus interface is implemented by the open_power::occ::pass_through::PassThrough class.
Change-Id: I6bce9e609b7b977418bcfee15e97432cb7d9e6b3 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|