#
37abe9be |
| 31-Oct-2024 |
Chris Cain <cjcain@us.ibm.com> |
Update occ-control to use lg2 for all logging
Convert existing log<level>() trace statements to lg2::level()
Testing: Verified on Rainier - captured journal traces before and after commit during bo
Update occ-control to use lg2 for all logging
Convert existing log<level>() trace statements to lg2::level()
Testing: Verified on Rainier - captured journal traces before and after commit during boots, mode, pcap and ips changes.
Change-Id: I318fa7bf3902c641b0c28b09190db4b61d0a2fa9 Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
3523cc00 |
| 30-Oct-2024 |
Chris Cain <cjcain@us.ibm.com> |
Add chassis association for total_power sensor
Currently all power and temperatures sensors have an all_sensors chassis association. The total system power sensor is used in bmcweb, but had the sens
Add chassis association for total_power sensor
Currently all power and temperatures sensors have an all_sensors chassis association. The total system power sensor is used in bmcweb, but had the sensor path hardcoded. To prevent users from having to hardcode the sensor path this commit will add a total_power association to the chassis.
Tested on Rainier: ''' a{sv} 1 "Associations" a(sss) 2 "chassis" "all_sensors" "/xyz/openbmc_project/inventory/system/chassis" "chassis" "total_power" "/xyz/openbmc_project/inventory/system/chassis"
as 1 "/xyz/openbmc_project/sensors/power/total_power"
d 366 '''
Change-Id: I11b82e439de6b9d7a9e9e46eee26bb5e22502283 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 ...
|
#
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 ...
|
#
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 ...
|
#
ace67d85 |
| 18-Oct-2021 |
Matt Spinler <spinler@us.ibm.com> |
Add proc IO Ring and core/IO ring DVFS sensors
Add support for the processor IO ring temperature sensor which the OCC uses fru type 9 for. There is one per OCC.
Add support for reading the process
Add proc IO Ring and core/IO ring DVFS sensors
Add support for the processor IO ring temperature sensor which the OCC uses fru type 9 for. There is one per OCC.
Add support for reading the processor core and IO ring DVFS (Dynamic Voltage and Frequency Slewing) temperature values out of the tempN_max files and putting them on D-Bus. These values are the temperatures at which the OCC starts using DVFS to cool the chip and are being put on D-Bus so that fan control can read them and increase fan speeds before then so the OCC doesn't have to do the DVFS.
Even though there is a value in the tempN_max file for every core, there only needs to be one value on D-Bus per OCC. These are put in the sensors namespace using the xyz.openbmc_project.Sensor.Value interface. They do not need associations to the chassis, and they don't need to be set to NaN when the OCCs aren't active, since the values can never change.
There are values in the tempN_max files for most, if not all, other temperature types as well, but the IO ring and core DVFS temps are the only ones that aren't known ahead of time because they come from the processor EEPROM.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I3e3f7a2a5db4053ea055e7baa16f0b0bf6eddbca
show more ...
|
#
5901abda |
| 23-Sep-2021 |
Matt Spinler <spinler@us.ibm.com> |
Add chassis association to sensors
Add an association to the chassis for each sensor so that the Redfish code can find them. The forward association is 'chassis', and the reverse association is 'al
Add chassis association to sensors
Add an association to the chassis for each sensor so that the Redfish code can find them. The forward association is 'chassis', and the reverse association is 'all_sensors'. This matches what other sensor applications do and is documented in sensors-architecture.md in the docs repository.
Tested: Checked the associations were present in the mapper and that the sensors now show up on the sensors page in the web UI.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iefb6d4dc2e5c9399d919e9e1b7c8dd04f20e7a3e
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 ...
|
#
0ad9dd87 |
| 22-Jun-2021 |
George Liu <liuxiwei@inspur.com> |
Verify object path is empty
This commit is verify object path is empty when calling the set method of the occ dbus, and when the object path is empty, return directly.
Signed-off-by: George Liu <li
Verify object path is empty
This commit is verify object path is empty when calling the set method of the occ dbus, and when the object path is empty, return directly.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0d0b01659e43b8ebf7e00bd455dddafebea4a5f0
show more ...
|
#
6f777cda |
| 09-Jun-2021 |
George Liu <liuxiwei@inspur.com> |
Add occ-dbus object
- The intent behind this commit is to add APIs for dynamically createing D-Bus objects.
- When temperature values such as DIMM or Core are monitored, D-Bus objects need to b
Add occ-dbus object
- The intent behind this commit is to add APIs for dynamically createing D-Bus objects.
- When temperature values such as DIMM or Core are monitored, D-Bus objects need to be dynamically created and the corresponding attribute values updated. If the object path exists, only the attribute value needs to be updated.
- Currently supports Sensor and OperationalStatus interfaces.
- Also, added Unit Test to occ_dbus file.
Tested: built openpower-occ-control successfully and UTest pass.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1eac918d6a7a04d6b72b4e68fff868b04dde9c28
show more ...
|