#
a1c0e5c7 |
| 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers readability-static-accessed-through -instance check as we are trying to access a static member function through an instance.
Change-Id: I887b514a8478abedc24d5495d057b9d3e7dc9bdf Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
#
9a286db2 |
| 17-Jan-2024 |
Patrick Williams <patrick@stwcx.xyz> |
reduce dbus string constants
There are a large number of dbus constants scattered throughout the code that could/should be obtained from phosphor-dbus-interface values. Perform minor refactoring to
reduce dbus string constants
There are a large number of dbus constants scattered throughout the code that could/should be obtained from phosphor-dbus-interface values. Perform minor refactoring to greatly reduce the number of string constants.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie8700bc90611d21eee7160f4686bc978fe0a0eb4
show more ...
|
#
7e969cb9 |
| 23-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the new namespace names.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9f67e74a02616d8ea2241c18758308f2b669672d
show more ...
|
#
928bbf15 |
| 14-Feb-2023 |
Andrew Geissler <geissonator@yahoo.com> |
move systemd subscribe to util function
This code is replicated in multiple source files in this repo, put it in the util repo so everyone can call it in one place.
Tested: - Verified systemd signa
move systemd subscribe to util function
This code is replicated in multiple source files in this repo, put it in the util repo so everyone can call it in one place.
Tested: - Verified systemd signals seen and system boots
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8bf0343c79012cc91dea033038894a011fd37ef5
show more ...
|
#
bd28f025 |
| 22-Nov-2022 |
William A. Kennington III <wak@google.com> |
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Ke
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
f053e6fe |
| 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: I41103c892db258a85640aa1442acd9a295c8a847
show more ...
|
#
e4bdc7c6 |
| 25-May-2022 |
Andrew Geissler <andrewg@us.ibm.com> |
update to latest openbmc clang format standards
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com> Change-Id: Ibb0e97e8850bbd3c1eff82f4630328e2b5d15220
|
#
77a91831 |
| 11-May-2022 |
Andrew Geissler <geissonator@yahoo.com> |
call auto power restart when chassis power recovers
When the power status transitions from bad to good, call the Auto Power-on Restart (APR) functionality to see if the system should be automaticall
call auto power restart when chassis power recovers
When the power status transitions from bad to good, call the Auto Power-on Restart (APR) functionality to see if the system should be automatically powered back on.
In most cases, a power issue to the system will result in the BMC losing power as well. The APR functionality already runs as a part of the BMC boot. However there are a few situations where the chassis power may need to be turned off but the BMC will continue to operate on standby power. This commit addresses that scenario, where once the chassis power can be turned back on, the BMC runs the APR logic.
This allows systems to get up and running automatically after brownout and UPS battery low issues.
Note that a change to phosphor-state-manager-systemd-links.inc is required here to make the APR service a WantedBy vs. RequiredBy relationship. Restarting a service that is required by multi-user.target restarts all the other oneshot service in multi-user.target which is not wanted here. This change will be included with the bump of this function.
Tested: - Verified system called APR when CurrentPowerStatus went from UninterruptiblePowerSupply to Good - Verified system did not power on when APR was not set to AlwaysOn - Verified system did power on when APR was set to AlwaysOn
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: If9a5e1a91eb8da6e39e021900ad07848eebbdd02
show more ...
|
#
66aacdc4 |
| 11-May-2022 |
Andrew Geissler <geissonator@yahoo.com> |
ensure power status is always correct
There's a slight bug here in that anytime determineStatusOfPower() is called, the PowerStatus was set to Good for a period of time. This can cause confusion on
ensure power status is always correct
There's a slight bug here in that anytime determineStatusOfPower() is called, the PowerStatus was set to Good for a period of time. This can cause confusion on clients monitoring the property. Instead of defaulting it to good, set it after the true status is known.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: If48eb5bd1c2bd94d51d12aff54a186aba295b179
show more ...
|
#
ba182f0c |
| 23-Mar-2022 |
Allen.Wang <Allen_Wang@quantatw.com> |
phosphor-state-manager: Support multi-host for persist files
phosphor-host-state-manager and phosphor-chassis-state-manager store informations in files then restore that on service starting. Since s
phosphor-state-manager: Support multi-host for persist files
phosphor-host-state-manager and phosphor-chassis-state-manager store informations in files then restore that on service starting. Since state-managers already change to multi-host now, information should store into different files from each service instance.
forbackward capability, if there are legacy persist file exist, rename it to the new file format of instance ;0',i.e, rename files: 'requestedHostTransition' to 'host0-PersistData', 'POHCounter' to 'chassis-POHCounter', 'chassisStateChangeTime' to 'chassis0-StateChangeTime'
Changes: a.phosphor-host-state-manager: '/var/lib/phosphor-state-manager/requestedHostTransition' this file not only store requestedHostTransition now, rename to PersistData and add host-N prefix for each service. For example, bus xyz.openbmc_project.State.Host1 store data to '/var/lib/phosphor-state-manager/host1-PersistData' xyz.openbmc_project.State.Host2 store date to '/var/lib/phosphor-state-manager/host2-PersistData'
b.phosphor-chassis-state-manager:
There are two files to store informations '/var/lib/phosphor-state-manager/POHCounter', '/var/lib/phosphor-state-manager/chassisStateChangeTime' change to: '/var/lib/phosphor-state-manager/chassis1-POHCounter', '/var/lib/phosphor-state-manager/chassis2-POHCounter' ... '/var/lib/phosphor-state-manager/chassis1-StateChangeTime' '/var/lib/phosphor-state-manager/chassis2-StateChangeTime' ... for each service.
Tested on Bletchley HW,
set xyz.openbmc_project.State.Host1 RequestedHostTransition to On 'busctl set-property xyz.openbmc_project.State.Host1 /xyz/openbmc_project/state/host1 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.On"'
This request will store in file: 'cat /var/lib/phosphor-state-manager/host1-PersistData' { "value0": { "cereal_class_version": 1, "value0": "xyz.openbmc_project.State.Host.Transition.On", "value1": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified", "value2": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive" }
restart xyz.openbmc_project.State.Host1~Host6 or reboot BMC, 'RequestedHostTransition' for host1 still "On" 'busctl get-property xyz.openbmc_project.State.Host1 /xyz/openbmc_project/state/host1 xyz.openbmc_project.State.Host RequestedHostTransition' s "xyz.openbmc_project.State.Host.Transition.On" 'RequestedHostTransition' of the rest 5 Hosts are default value "xyz.openbmc_project.State.Host.Transition.Off"
Also, set POHCounter of xyz.openbmc_project.State.Chassis2 'busctl set-property xyz.openbmc_project.State.Chassis2 /xyz/openbmc_project/state/chassis2 xyz.openbmc_project.State.PowerOnHours POHCounter u 5' it will restore after service restart or BMC reboot, 'busctl get-property xyz.openbmc_project.State.Chassis2 /xyz/openbmc_project/state/chassis2 xyz.openbmc_project.State.PowerOnHours POHCounter' u 5
Change-Id: I739c62707bb805e7c25f399a2fea06beee5543a0 Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
show more ...
|
#
76070747 |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5cfac1360e8c769889b33bef98cfd44778018a44
show more ...
|
#
6ed41eab |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
filesystem: use non-experimental version
std::experimental::filesystem has been deprecated since at least C++17. Switch to the std::filesystem one.
Signed-off-by: Patrick Williams <patrick@stwcx.x
filesystem: use non-experimental version
std::experimental::filesystem has been deprecated since at least C++17. Switch to the std::filesystem one.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7717a804a3d5c96f8717764c088529d65ad4e96c
show more ...
|
#
396ed8a5 |
| 22-Mar-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
chassis: Monitor the PowerSystemInputs for power status
In addition to the uPower interface, monitor the PowerSystemInputs interface to detect a Brownout condition. Reference: https://gerrit.openbmc
chassis: Monitor the PowerSystemInputs for power status
In addition to the uPower interface, monitor the PowerSystemInputs interface to detect a Brownout condition. Reference: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/48015
Tested: In simulation, trigger a power supply brownout and clear it, verify that phosphor-chassis-check-power-status detects the condition:
Mar 29 19:02:21 p10bmc phosphor-chassis-state-manager[1101]: Power System Inputs status changed to xyz.openbmc_project.State.Decorator.PowerSystemInputs.Status.Fault Mar 29 19:02:21 p10bmc phosphor-chassis-state-manager[1101]: Power System Inputs status is in Fault state
root@p10bmc:~# /usr/bin/phosphor-chassis-check-power-status --chassis 0 <3> Chassis power status is not good: xyz.openbmc_project.State.Chassis.PowerStatus.BrownOut Mar 29 19:08:20 p10bmc phosphor-chassis-check-power-status[1133]: Chassis power status is not good: xyz.openbmc_project.State.Chassis.PowerStatus.BrownOut Mar 29 19:08:20 p10bmc phosphor-log-manager[319]: Created PEL 0x50000004 (BMC ID 4) with SRC BDA13402 Mar 29 19:08:20 p10bmc phosphor-ledmanager[447]: SAI: FRU path: /xyz/openbmc_project/inventory/system
Mar 29 19:02:21 p10bmc phosphor-chassis-state-manager[1101]: Power System Inputs status changed to xyz.openbmc_project.State.Decorator.PowerSystemInputs.Status.Good Mar 29 19:02:21 p10bmc phosphor-chassis-state-manager[1101]: determineStatusOfPSUPower(): Good
root@p10bmc:~# /usr/bin/phosphor-chassis-check-power-status --chassis 0 <6> Chassis power status good, start power on
Change-Id: I6adbb6474155e50219b6a48dd9b2cf872934f4a6 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
70f36d8e |
| 14-Mar-2022 |
Potin Lai <potin.lai@quantatw.com> |
chassis-state-manager: Add multi-chassis support
Add multi-chassis management support, each chassis bus separates by giving a unique chassis id.
Current code only support single chassis, and alway
chassis-state-manager: Add multi-chassis support
Add multi-chassis management support, each chassis bus separates by giving a unique chassis id.
Current code only support single chassis, and alway assume bus name is "xyz.openbmc_project.State.Chassis".
This patch allow user to launch chassis-state-manager with a chassis id, and chassis id is added into service bus name for identification.
Because there are many places hardcode with bus name "xyz.openbmc_project.State.Chassis", if chassis id is 0, chassis-state-manager will request both "xyz.openbmc_project.State.Chassis" and "xyz.openbmc_project.State.Chassis0" bus name to meet backwards compatibility.
Tested on Bletchley: root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis0 root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis0 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis0 root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis1 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis1 ......
patch dependencies: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/51465
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I2ce3e9ab2c95a2688143f4e3775da164a5c33c19
show more ...
|
#
be6efabc |
| 01-Mar-2022 |
Matthew Barth <msbarth@us.ibm.com> |
host-sensors: Reset when system off but last state was on
When power was on before a BMC reboot and system is now off, the host sensors need to be reset to show the correct system state of `off` now
host-sensors: Reset when system off but last state was on
When power was on before a BMC reboot and system is now off, the host sensors need to be reset to show the correct system state of `off` now. This is done by starting the `phosphor-reset-sensor-states@0.service` unit, which handles setting the appropriate dbus properties.
Tested: Power on system and then remove/add AC Check BootProgress, etc.. properties set by reset service
Change-Id: I4928a231495a1295425dc828606b40de03253bab Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
2cf2a268 |
| 02-Feb-2022 |
Andrew Geissler <geissonator@yahoo.com> |
ups: watch for property changes
Monitor for any changes to the properties the chassis manger is interested in with the UPower interface.
Tested: - Changed the properties via busctl after the chassi
ups: watch for property changes
Monitor for any changes to the properties the chassis manger is interested in with the UPower interface.
Tested: - Changed the properties via busctl after the chassis manager was running and verified the chassis power status was updated correctly
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I13f23d33581c2339506f9c4739ce36bf07aef46e
show more ...
|
#
8b1f8620 |
| 28-Jan-2022 |
Andrew Geissler <geissonator@yahoo.com> |
ups: check state on startup and update power status
Look for a UPS (uninterruptible power supply) D-Bus object on chassis startup. If found, read its State and BatteryLevel properties to check the c
ups: check state on startup and update power status
Look for a UPS (uninterruptible power supply) D-Bus object on chassis startup. If found, read its State and BatteryLevel properties to check the condition of the power to the chassis. Update the CurrentPowerStatus property hosted by the chassis state manager based on this information.
Tested: - Utilized ibm-ups feature to start in debug mode so all properties could be manually set. Validated good path and bad paths for all properties and ensured CurrentPowerStatus was set as expected for each test.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I064a9e7fecbed8f859828359a761877e0fa95251
show more ...
|
#
2c36e5ad |
| 12-Jul-2021 |
Ben Tyner <ben.tyner@ibm.com> |
Chassis: Check for standby voltage regulator fault
When an unexpected power down is detected check the standby voltage regulator fault gpio for a latched fault event. If a regulator fault was detect
Chassis: Check for standby voltage regulator fault
When an unexpected power down is detected check the standby voltage regulator fault gpio for a latched fault event. If a regulator fault was detected then log the event.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com> Change-Id: I98729118332c7a7785f9048f6ac7cfe1ce882bb6
show more ...
|
#
54d72838 |
| 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
cleanup sdbus CAMELCASE define
The transition from 45a1ed71bc3743a6107c94e25275e21fdbefa90e is complete so clean up the old defines.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I
cleanup sdbus CAMELCASE define
The transition from 45a1ed71bc3743a6107c94e25275e21fdbefa90e is complete so clean up the old defines.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I54ba6d2f1e29a036aa3e2680327517c24d958c41
show more ...
|
#
45a1ed71 |
| 30-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
use new sdbus++ camelcase for POHCounter
Change I17a8d7479556596a3cf252b3f4eae9c8df547189 will change how sdbus++ generates names which start with an acronym. Prepare for this by keying off the SDBU
use new sdbus++ camelcase for POHCounter
Change I17a8d7479556596a3cf252b3f4eae9c8df547189 will change how sdbus++ generates names which start with an acronym. Prepare for this by keying off the SDBUSPP_NEW_CAMELCASE define to use the new format.
Changes: pOHCounter() -> pohCounter()
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I70e9ab549d408b9bb56d63692e8384cf13a2b459
show more ...
|
#
e426b589 |
| 28-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I5b80bb568451706afb6d268b41e1a5357a
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I5b80bb568451706afb6d268b41e1a5357a2ca6db
show more ...
|
#
769a62f1 |
| 06-Dec-2019 |
Andrew Geissler <geissonator@yahoo.com> |
meson: fix up compile errors found by meson
meson enables more error checking by default so in preperation for moving to it, fix all errors in the code it has found.
This breaks down into the follo
meson: fix up compile errors found by meson
meson enables more error checking by default so in preperation for moving to it, fix all errors in the code it has found.
This breaks down into the following issues: - Unused variables: remove where applicable, otherwise void out - Extra ';' - Local includes need to use ""
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I94d9b4d2ffc85ae46d941e1a190fafd4ba5bd893
show more ...
|
#
d998f82b |
| 18-Oct-2018 |
William A. Kennington III <wak@google.com> |
timer: Replace with sdeventplus/timer
This is aimed at replacing the ad-hoc timer implementation contained in each of our openbmc daemons, with a single well-tested timer implementation.
Tested:
timer: Replace with sdeventplus/timer
This is aimed at replacing the ad-hoc timer implementation contained in each of our openbmc daemons, with a single well-tested timer implementation.
Tested: Compiled
Change-Id: I3e562ab72820442aa137a2d517e476192ea6c1bd Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
9eab9861 |
| 11-Jul-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add LastStateChangeTime to chassis manager
This property is set to the timestamp of the last time the chassis power state changed. It is persisted so it survives reboots.
Resolves openbmc/openbmc#
Add LastStateChangeTime to chassis manager
This property is set to the timestamp of the last time the chassis power state changed. It is persisted so it survives reboots.
Resolves openbmc/openbmc#3300
Tested: Various incantations of power cycling, reboots, and AC pulls.
Change-Id: I19f244e0490bc9b921454e393989a9cbd283e2dd Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
81957841 |
| 11-Jul-2018 |
Matt Spinler <spinler@us.ibm.com> |
Minor power on hours serialization changes
In preparation for the chassis manager class persisting another data member, some changes need to be made to the POH serialization code to make it consiste
Minor power on hours serialization changes
In preparation for the chassis manager class persisting another data member, some changes need to be made to the POH serialization code to make it consistent with saving individual data members in separate files.
1) Remove the load()/save() functions from the Chassis class. Cereal only requires those when archiving a custom object, like when the Host class uses oarchive(*this).
2) Remove the Cereal version define from the Chassis class. That is also only used when a custom object is serialized, and in fact the version wasn't being stored in the serialized data anyway.
3) Rename the POH serialization/deserialization functions to be specifically for the POH counter.
These don't affect how or where POH value is persisted.
Tested: Verify the POH value still increments and survives reboots.
Change-Id: I065e1a24e018b66f284c6a00f9a34d24eaaedc36 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|