3d506280 | 01-Feb-2025 |
Prithvi Pai <ppai@nvidia.com> |
discover_system_state: apply power restore delay
Introduce option `apply-power-policy-bmc-ready` to control power restore policy application timing. When enabled (default), BMC waits until BMC_READY
discover_system_state: apply power restore delay
Introduce option `apply-power-policy-bmc-ready` to control power restore policy application timing. When enabled (default), BMC waits until BMC_READY before applying power policy. When disabled, BMC waits for the PowerRestoreDelay before applying power policy. This change maintains backward compatibility while allowing more flexible power restoration behavior.
Tested: 1) PSM builds fine 2) When `apply-power-policy-bmc-ready` is disabled, discovery_system_state waits for PowerRestoreDelay as specified by the user.
Change-Id: Ib2381612bdb8cb6960f126228d25d8d43fed1d92 Signed-off-by: Prithvi Pai <ppai@nvidia.com>
show more ...
|
a279f874 | 05-Mar-2025 |
Matt Spinler <spinler@us.ibm.com> |
Add googletest wrap file
With this, unit tests can be run in a standalone session.
Tested: Standalone tests work:
``` 1/4 test_systemd_parser OK 0.01s 2/4 test_syste
Add googletest wrap file
With this, unit tests can be run in a standalone session.
Tested: Standalone tests work:
``` 1/4 test_systemd_parser OK 0.01s 2/4 test_systemd_signal OK 0.01s 3/4 test_hypervisor_state OK 0.01s 4/4 test_scheduled_host_transition OK 0.01s
Ok: 4 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 ```
Change-Id: I434320257498a891af5f15835fdee9927e7d5aee Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
4fae22ad | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Iedf0879cec3cb06c254cf2737c9e365b8882818b Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Iedf0879cec3cb06c254cf2737c9e365b8882818b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
71e399d4 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I441b95b267f2faac23675ec0703aa5474d189be7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
f88281dd | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`)
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`. Switch all uses of `not disabled` to `allowed`.
Change-Id: I88a4676fbcc5ea0ac31835976bb0775867464778 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
a7848f98 | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I7987af58ac980c4ba8ca1a650d17e86a831cbd77 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
1ddddf7d | 06-Dec-2024 |
Adriana Kobylak <anoo@us.ibm.com> |
crit-service: Add new code update service
The Software.BMC.Updater.service is being replaced by default by the new Software.Manager.service. Add the new one to the list so that both the old and new
crit-service: Add new code update service
The Software.BMC.Updater.service is being replaced by default by the new Software.Manager.service. Add the new one to the list so that both the old and new are supported and monitored.
Change-Id: I1d629b940fd3a8463b720892cae268b655eaf71c Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
9f38152a | 17-Oct-2024 |
Thang Tran <thuutran@amperecomputing.com> |
reject Transition request while firmware being flashed
When users request to flash BMC/Host... firmware, the BMC should reject turning on the host or rebooting BMC requests to protect the system. As
reject Transition request while firmware being flashed
When users request to flash BMC/Host... firmware, the BMC should reject turning on the host or rebooting BMC requests to protect the system. As defined in the PDIs [1], the ActivationBlocksTransition interface is used to prevent power-on during flashing. The phosphor-state-manager shall look for this interface to make decision should transition request is executed or not. When BMC rejects the transition request, an error is thrown as defined in PDIs [2].
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Software/ActivationBlocksTransition.interface.yaml [2] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/75231
Tested: Enable check-fwupdate-before-do-transition option 1. Request to flash Host's firmware via Redfish or WebUi 2. Request to turn off the Host. $ipmitool power off 3. BMC turns off the power. 4. Request to turn on the Host. $ipmitool power on 5. BMC rejects above request. No power action is executed. 6. Request to reboot BMC. $ipmitool mc reset cold 7. BMC did not reboot. 8. Request turn on the Host after flashing done. 9. BMC turns on the Power. 10. Request to reboot BMC. 11. BMC reboots.
Disable check-fwupdate-before-do-transition option 1. Request to flash Host's firmware via Redfish or WebUi 2. Request to turn off the Host. $ipmitool power off 3. BMC turns off the power. 4. Request to turn on the Host. $ipmitool power on 5. BMC does not reject this request, but no power action is handled 6. When flashing done, BMC turns on the power.
Change-Id: If3998e58d24cfb72d13b01eb5b8c8cc5a39b3c95 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
d01e1eaa | 03-Dec-2024 |
Eddie James <eajames@linux.ibm.com> |
secure-boot: Update TPM device path
Updates to the device tree necessitate updating this path to check whether the TPM is supposed to be present.
Change-Id: I20e890213c4a990aab8c74dd17b5f7eb4968d11
secure-boot: Update TPM device path
Updates to the device tree necessitate updating this path to check whether the TPM is supposed to be present.
Change-Id: I20e890213c4a990aab8c74dd17b5f7eb4968d112 Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|
29c2a1cb | 25-Nov-2024 |
Peter Delevoryas <peter@pjd.dev> |
phosphor-state-manager: Add -Dbindings=cxx to libgpiod dependency
This option should be specified by default so that `meson setup build` can work out-of-the-box, or else the `libgpiod` dependency wo
phosphor-state-manager: Add -Dbindings=cxx to libgpiod dependency
This option should be specified by default so that `meson setup build` can work out-of-the-box, or else the `libgpiod` dependency won't provide `libgpiodcxx`.
Several other repositories are doing this already:
``` $ rg -t meson "bindings=cxx" host-error-monitor/meson.build 30: default_options: ['bindings=cxx'],
openpower-vpd-parser/meson.build 121: default_options: ['bindings=cxx'],
intel-ipmi-oem/meson.build 65: default_options: ['bindings=cxx'],
openpower-vpd-parser/test/meson.build 16:libgpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
dbus-sensors/meson.build 39:gpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
openpower-proc-control/meson.build 143:libgpiodcxx_dep = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
x86-power-control/meson.build 43: dependency('libgpiodcxx', default_options: ['bindings=cxx']),
phosphor-power/meson.build 71: default_options: ['bindings=cxx'])
YAAP/meson.build 23: default_options: ['bindings=cxx'], ```
Tested:
Before: ``` $ rm -rf build subprojects $ git restore subprojects $ meson setup build --wipe --reconfigure .... Dependency gpioplus from subproject subprojects/gpioplus found: YES 0.1 WARNING: Variable 'gpiodcxx_dep' in the subproject 'subprojects/libgpiod-1.6.3' is not found Dependency libgpiodcxx from subproject subprojects/libgpiod-1.6.3 found: NO
host_condition_gpio/meson.build:5:11: ERROR: Dependency 'libgpiodcxx' is required but not found. ```
After:
``` $ rm -rf build subprojects $ git restore subprojects $ meson setup build --wipe --reconfigure ... Dependency libgpiodcxx from subproject subprojects/libgpiod-1.6.3 found: YES 1.1.2 ... ````
Fixes: ba2241c63673 ("Support checking host status via GPIO pins") Change-Id: I238f785a381b7d0cb4f7002afdd7a2ed3ae2d926 Signed-off-by: Peter Delevoryas <peter@pjd.dev>
show more ...
|
4ab59214 | 04-Sep-2024 |
Tim Lee <timlee660101@gmail.com> |
bmc-state-manager: revise BMC reboot cause
According new design from below commit: https://gerrit.openbmc.org/c/openbmc/docs/+/73678
We need to revise `RebootCause` value as below:
`WDIOF_EXTERN1`
bmc-state-manager: revise BMC reboot cause
According new design from below commit: https://gerrit.openbmc.org/c/openbmc/docs/+/73678
We need to revise `RebootCause` value as below:
`WDIOF_EXTERN1` => `RebootCause::Software` `WDIOF_CARDRESET` => `RebootCause::Watchdog`
Tested: busctl get-property xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC \ LastRebootCause
When unplug/plug in BMC power cable then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.POR"
When executing reboot command then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.Software"
When kernel panic watchdog be triggered then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.Watchdog"
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: Iba7dfe6822d5f2f595c19e77aa559bb3b0a9d69c
show more ...
|
08148283 | 08-Oct-2024 |
Andrew Geissler <geissonator@yahoo.com> |
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Alt
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Although it's a bit of an unusual use case, it's fairly common in the lab/dev environment when users want to quickly ensure their system is in a powered off or on state (without first looking at its current state).
Similar to what is in the host transition services, ensure we only run the chassis transition services once per power on or off.
Tested: - Ensured multiple power off requests will not leave CurrentPowerState in TransitioningToOff state
Change-Id: I4040072ed0b42f37c9488994b0f7a5975a2bb7c9 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
2eb6029c | 13-Aug-2024 |
Amithash Prasasd <amithash@meta.com> |
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedeskto
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedesktop.DBus.ObjectManager \ GetManagedObjects ``` we end up getting no objects `a{oa{sa{sv}}} 0`. This is incorrect and we technically should return the managed objects. Looking further at the spec: ``` All returned object paths are children of the object path implementing this interface, i.e. their object paths start with the ObjectManager's object path plus '/'. ``` This implies that the the path owned by the object manager should not be the hostX sub-entries but `/xyz/openbmc_project/state`
Tested by building a harma image and in qemu calling introspect on each of the object paths and ensuring that we get the correct responses ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ``` Also tested that we get the correct managed object ``` busctl call xyz.openbmc_project.State.Host /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.BMC /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects ```
Change-Id: I525c8719c326cfbbe568c4f1f7fe95e3aa13c660 Signed-off-by: Amithash Prasad <amithash@meta.com>
show more ...
|
f566c964 | 22-Jul-2024 |
Amithash Prasasd <amithash@meta.com> |
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches the code to use those instead of allowing compile time definition of those.
Allowing for compile time definition would probably break clients who are not aware of the new paths anyway.
Tested by build a harma image and loading in qemu to test the added interfaces are unchanged. ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ```
Change-Id: Ib4c77d2789c13f509b75a2b1837ea454e53e8ae9 Signed-off-by: Amithash Prasasd <amithash@meta.com>
show more ...
|
1b2c3c03 | 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: Ic16d6d63213bbdd91fcb8f5aa986b66865efda2f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
b27eef54 | 22-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add few cppcoreguidelines check
These checks cover a wide range of best practices and recommendations aimed at improving the safety, readability, maintainability, and performance of our
clang-tidy: Add few cppcoreguidelines check
These checks cover a wide range of best practices and recommendations aimed at improving the safety, readability, maintainability, and performance of our C++ codebase according to the C++ Core Guidelines.
Change-Id: I6bf6dda6095c95ea782bf5759b83272081cad150 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
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 ...
|
b594ac12 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Change-Id: Ia5924cc4e9dca98cc29bbaa509
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Change-Id: Ia5924cc4e9dca98cc29bbaa50923e3269db22089 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
695888de | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Change-Id: I43e747b95eb042650668da7dd57a8d4b8463426a S
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Change-Id: I43e747b95eb042650668da7dd57a8d4b8463426a Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
319eda48 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. Th
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. This helps clarify the const-ness of the pointed-to object or container elements.
Change-Id: I5fa46006aa5669834ebb144d32014f8882e563e3 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
44bbf11d | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Ch
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Change-Id: I4ad7ec4ddfa4cfe9a0cf0d569d3d81c478c1776a Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
480d430e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - i
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - integer expression/literal to boolean - floating expression/literal to boolean - pointer/pointer to member/nullptr/NULL to boolean - boolean expression/literal to integer - boolean expression/literal to floating
Change-Id: Ifb5d5f402342a2d3cca8378c6549ede3e56e3f38 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
d7a15cb1 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability checks on repo
The readability-* checks in Clang-Tidy focus on improving code readability by enforcing guidelines and suggesting improvements that can enhance the clar
clang-tidy: Enable readability checks on repo
The readability-* checks in Clang-Tidy focus on improving code readability by enforcing guidelines and suggesting improvements that can enhance the clarity and maintainability of C++ code. This enables readability-const-return-type check.
Change-Id: I4737f07188f6a173678dbe0192914dd5df0dd338 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
abfd9d38 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add performance checks
The checks are valuable for improving the runtime efficiency and resource utilization of your programs.
Change-Id: I5bacb8a421d5432fabb47a859dc13e9e1c0c563c Signe
clang-tidy: Add performance checks
The checks are valuable for improving the runtime efficiency and resource utilization of your programs.
Change-Id: I5bacb8a421d5432fabb47a859dc13e9e1c0c563c Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
836ccb33 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable clang-analyzer-deadcode.DeadStores check
This checks for values stored to variables that are never read afterwards. The change is made to avoid flagging this error when a unique_p
clang-tidy: Enable clang-analyzer-deadcode.DeadStores check
This checks for values stored to variables that are never read afterwards. The change is made to avoid flagging this error when a unique_ptr is used rather make it a stack variable. The clang-tidy don't like the unused unique_ptr specifically rather than the unused class instance.
Change-Id: I1c5a6b4032de75b7c8586467425f6fdacace5f31 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|