| f0b0fbdd | 21-Jan-2026 |
Nathan Jian <Hank.Jian@quantatw.com> |
power-control: Use constexpr string_view
Convert getPowerStateName() and getEventName() to return constexpr std::string_view instead of std::string to avoid heap allocations.
Update logStateTransit
power-control: Use constexpr string_view
Convert getPowerStateName() and getEventName() to return constexpr std::string_view instead of std::string to avoid heap allocations.
Update logStateTransition() and logEvent() to handle unknown enum values by logging an error with the integer value for debugging.
Tested: - Build verification: Compiled successfully with no warnings - Power state transitions on AST2600: All states logged correctly
Change-Id: I644dd2e6ac6502d8a5460be393997a37e8da0134 Signed-off-by: Nathan Jian <Hank.Jian@quantatw.com>
show more ...
|
| 9cf51d8d | 21-Jan-2026 |
Nathan Jian <Hank.Jian@quantatw.com> |
power-control: Remove unreachable breaks
Remove break statements that follow return statements in switch cases. No functional change.
Tested: Build verified
Change-Id: I51ca3cc07f9b4e4c716134ae550
power-control: Remove unreachable breaks
Remove break statements that follow return statements in switch cases. No functional change.
Tested: Build verified
Change-Id: I51ca3cc07f9b4e4c716134ae550cffa533f53de0 Signed-off-by: Nathan Jian <Hank.Jian@quantatw.com>
show more ...
|
| 74eb00d3 | 12-Nov-2025 |
Marc Olberding <molberding@nvidia.com> |
Fix null access on configs with no post complete
Fix null access to unitinialized dbus APIs when we don't provide post complete
Tested: loaded on nvl32-obmc and AC cycled, no dump
Change-Id: Icf88
Fix null access on configs with no post complete
Fix null access to unitinialized dbus APIs when we don't provide post complete
Tested: loaded on nvl32-obmc and AC cycled, no dump
Change-Id: Icf88697a7d3a7a1482f15b665521ed07215aba5e Signed-off-by: Marc Olberding <molberding@nvidia.com>
show more ...
|
| 4ad47bff | 24-Oct-2025 |
Marc Olberding <molberding@nvidia.com> |
power_control: Move post complete to be optional
Moves post complete configuration to be optional. If its not specified, we no longer start the host monitoring interfaces.
Tested: loaded onto nvl32
power_control: Move post complete to be optional
Moves post complete configuration to be optional. If its not specified, we no longer start the host monitoring interfaces.
Tested: loaded onto nvl32-obmc and tested host boot after ac power cycle.
Change-Id: Idb6aae77e61681396504e7ce8035d9732df1e8b2 Signed-off-by: Marc Olberding <molberding@nvidia.com>
show more ...
|
| dc706df9 | 04-Nov-2025 |
Patrick Williams <patrick@stwcx.xyz> |
remove is_method_error call
An `is_method_error` is not appropriate after an sdbus `call` since `call` will always throw an exception. Remove the pointless call and instead catch the exception.
Si
remove is_method_error call
An `is_method_error` is not appropriate after an sdbus `call` since `call` will always throw an exception. Remove the pointless call and instead catch the exception.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ided9cfe572ab8f60bcd4464580d7a0cba30a029d
show more ...
|
| 4d684117 | 17-Aug-2025 |
Willy Tu <wltu@google.com> |
use async getProperty once io_context is running
Prevent the sync dbus call from reading the dbus messages meant for async call and potentially cause the async request to miss the message. The sync
use async getProperty once io_context is running
Prevent the sync dbus call from reading the dbus messages meant for async call and potentially cause the async request to miss the message. The sync call before io_context started running is fine since it will process all the queued up dbus message once it start running.
Tested: The property is able to be refreshed with no issue.
Change-Id: I4a0e42275d42e5348c8ed0e30345b0a94c72d564 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
| 857c558e | 12-Jun-2025 |
Jayanth Othayoth <ojayanth@gmail.com> |
Fix host monitoring for multi-host support
The existing host state monitoring logic used a static D-Bus object path, which caused incorrect behavior in systems with multiple hosts. The monitor was n
Fix host monitoring for multi-host support
The existing host state monitoring logic used a static D-Bus object path, which caused incorrect behavior in systems with multiple hosts. The monitor was not correctly listening to the state changes of the intended host instance, leading to missed or misrouted state updates.
This change dynamically constructs the D-Bus object path using the host node number, ensuring that the signal match is registered for the correct host instance. Additional logging has been added to aid in debugging and to confirm that the correct node is being monitored.
Change-Id: I462450820a60389056bfbad9fb03db61c0548395 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 3547113a | 06-May-2025 |
Jason M. Bills <jason.m.bills@linux.intel.com> |
Change name to just power OK
A system power OK signal may not necessarily be tied to the power supplies, so rename everything to remove reference to the power supply and keep just "power OK".
Teste
Change name to just power OK
A system power OK signal may not necessarily be tied to the power supplies, so rename everything to remove reference to the power supply and keep just "power OK".
Tested: Confirmed that ipmitool power on, off, and cycle all work as expected and there is no mention of power supply in the logs.
Change-Id: I62370f2666602525c6b4564ccff8d18b703744f4 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
show more ...
|
| b84e7893 | 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: I492a63028a624ff502b33ab4ca12da518f92241f 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: I492a63028a624ff502b33ab4ca12da518f92241f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 05e8ea8e | 03-Jul-2024 |
Renze Nicolai <renze@rnplus.nl> |
x86-power-control: add passthrough option
Add a power and reset button passthrough option for emulating button behavior by directly controlling the control output pin.
Change-Id: I50df3e604401b4afd
x86-power-control: add passthrough option
Add a power and reset button passthrough option for emulating button behavior by directly controlling the control output pin.
Change-Id: I50df3e604401b4afd43fa89a0709466bbf01638b Signed-off-by: Renze Nicolai <renze@rnplus.nl>
show more ...
|
| c6d75656 | 10-Sep-2024 |
Jason M. Bills <jason.m.bills@linux.intel.com> |
Update PostComplete polarity
After recent changes adding support for GPIO polarity in the config file and using only active-high polarity for D-Bus, the PostComplete polarity was left out of sync in
Update PostComplete polarity
After recent changes adding support for GPIO polarity in the config file and using only active-high polarity for D-Bus, the PostComplete polarity was left out of sync in a couple places.
This fixes PostComplete, so the correct polarity is used in all cases.
Tested: Confirmed in D-Bus mode that PostComplete correctly initializes the OS State and correctly updates the OS State on PropertiesChanged events.
Change-Id: Iae626de79b5f13292372081f14ca5ca75420a1c2 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
show more ...
|
| a0a39f82 | 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: I474dc261d5698b702bab7b9305c1d6958f43d40f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 1cc7921f | 19-Jun-2024 |
Zev Weiss <zev@bewilderbeest.net> |
Filter more precisely in dbusGPIOMatcher()
Previously we'd been matching only on the interface name. It is possible, however, that there might exist multiple providers of the same interface while w
Filter more precisely in dbusGPIOMatcher()
Previously we'd been matching only on the interface name. It is possible, however, that there might exist multiple providers of the same interface while we only want to match on a specific object from one provider. Since we have the service name and object path available in the config, let's add them to the match filter rule to specify only exactly the signals we're interested in.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ib29c5d021e519c3501b177f6e26eda664cc29964
show more ...
|
| d603dd1b | 19-Jun-2024 |
Zev Weiss <zev@bewilderbeest.net> |
Ensure all dbus inputs are treated as active-high
Previously the polarity member of the ConfigData struct wasn't getting set in loadConfigValues(), so it retained its default value (active-low). Ac
Ensure all dbus inputs are treated as active-high
Previously the polarity member of the ConfigData struct wasn't getting set in loadConfigValues(), so it retained its default value (active-low). Active-low inputs via dbus don't make much sense, so let's normalize them all to be active-high.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I529fd6362db9a49b859f97a231c09d23a782c23d
show more ...
|
| ca47855d | 11-Jun-2024 |
Zev Weiss <zev@bewilderbeest.net> |
Extend dbus config with MatchRegex support
Previously only boolean properties were supported as dbus inputs. For some signals other types may be useful however, one common case being strings for en
Extend dbus config with MatchRegex support
Previously only boolean properties were supported as dbus inputs. For some signals other types may be useful however, one common case being strings for enum values. We can now specify a MatchRegex key in a dbus input's config block to specify a regular expression that determines whether a given string value is converted to true (asserted) or false.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ib048151cb20d4c6a9370587d2ee583cb92f617f6
show more ...
|
| edc86f35 | 06-May-2024 |
Zev Weiss <zev@bewilderbeest.net> |
Respect polarity config on input signals
Previously the polarity setting was (in all but one case) only being used in setting outputs driven by the daemon. With this change we also take it into acc
Respect polarity config on input signals
Previously the polarity setting was (in all but one case) only being used in setting outputs driven by the daemon. With this change we also take it into account in determining whether input signals are asserted or deasserted.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ifd326e9c64de144dc45d217be5212329a5f3d242
show more ...
|
| 33737913 | 22-Feb-2024 |
Potin Lai <potin.lai@quantatw.com> |
Move OS state interface to state/hostX
Move OS state interface from state/os to state/hostX to make it consistent with phosphor-state-manager.
Tested result: ``` root@harma:~# busctl introspect xyz
Move OS state interface to state/hostX
Move OS state interface from state/os to state/hostX to make it consistent with phosphor-state-manager.
Tested result: ``` root@harma:~# busctl introspect xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.OperatingSystem.Status NAME TYPE SIGNATURE RESULT/VALUE FLAGS .OperatingSystemState property s "xyz.openbmc_project.State.OperatingSys… emits-change ```
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: Idd744285ce3c43add37d17ddd2de4eb6c250853d
show more ...
|
| 6af569fd | 11-Mar-2024 |
Tim Lee <timlee660101@gmail.com> |
Correct naming of NMI button in BMCSourceSignal
NMISource related properties already moved from "intel-dbus-interface" to "phospher-dbus-interfaces".
However, the name "FpBtn" is using for "com.int
Correct naming of NMI button in BMCSourceSignal
NMISource related properties already moved from "intel-dbus-interface" to "phospher-dbus-interfaces".
However, the name "FpBtn" is using for "com.intel", not for "xyz.openbmc_project" that is using "FrontPanelButton" according to "xyz/openbmc_project/Chassis/Control/NMISource.interface.yaml".
Thus, need to correct this naming to match current design.
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I9629950fbb077ebf59cd3ef14e382fd40a739895
show more ...
|
| cfc4d25e | 18-Nov-2021 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Add HpmStbyEn signal
HpmStbyEn signal is a special signal that can be found on AMD boards. It indicates that all DC-SCM STBY power rails are enabled and good. The signal enables STBY power rails on
Add HpmStbyEn signal
HpmStbyEn signal is a special signal that can be found on AMD boards. It indicates that all DC-SCM STBY power rails are enabled and good. The signal enables STBY power rails on the HPM. It is a level GPIO, and if it is not activated, onboard CPLD wouldn't relinquish control of power control GPIOs to BMC making it impossible to power on the host. Therefore if this GPIO is present in the JSON configuration activate it in the main function.
Tested on the AMD EthanolX/Onyx CRB Onyx verification: power on/off, application restart at power on/off and bmc reboot.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com> Change-Id: I3a21c2e5214dfcf05cdae8efc2ebbb21c4b4e080
show more ...
|
| dc0bab92 | 07-Feb-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
event: reset button pressed event updates
Existing code doesn't handle "resetButtonPressed" correctly. This commits adds the "resetButtonPressed" event handling during power state on.
Tested: Verif
event: reset button pressed event updates
Existing code doesn't handle "resetButtonPressed" correctly. This commits adds the "resetButtonPressed" event handling during power state on.
Tested: Verified power sequencing on AMD CRB Onyx.
Change-Id: I65e5b2236032f7b04b4345da752b467981409612 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| d394c887 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: Iff253307fce5ebb3dff66b87e2742919cc5b30b8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| edd211e4 | 28-Oct-2022 |
Michal Orzel <michalx.orzel@intel.com> |
Handle possible SdBus exceptions
Right now service allows to access several signals using DBus interface, instead of GPIO pins. In case of that option selected in config, service will try to read gi
Handle possible SdBus exceptions
Right now service allows to access several signals using DBus interface, instead of GPIO pins. In case of that option selected in config, service will try to read given DBus property using function getProperty. Unfortunately that attempt might fail, for example when that specific object doesn't exist yet, which will cause with unhandled exception and evantually service restart.
This change adds handler for that sort of exception. If read property fails, another one will be scheduled in the next second. That process shall be repeated until value is successfully read. As there are several possible properties to read, each one shall utilize its own timer, so that every failure can be handled independently from each other.
Tested: Change has been tested on Intel platform, which showed symptoms described above: service tried to get property which has not yet been created, which caused its crash and restart. With this fix applied, issue stopped reproducing.
Change-Id: Ib9b89e07a348868d2f15ffda31b3dc9a47340873 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
| 891bbde7 | 17-May-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Fix json exception when processing event_configs
power-control is crashing while processing the JSON config:
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::type
Fix json exception when processing event_configs
power-control is crashing while processing the JSON config:
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::type_error' what(): [json.exception.type_error.302] type must be boolean, but is object
due to casting the `events` object to a `bool` when the underlying JSON type is not a boolean.
Tested: Added debug print to show the value of `nmiWhenPoweredOff` and confirmed that it worked for three cases: true, false, and not specified in config (defaults to true).
Change-Id: I0182771a4125234df01ec39374531e5c51dec55a Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
| d7ea283b | 14-Apr-2023 |
Olivier FAURAX <olivier.faurax@eu.equinix.com> |
Add option to only log nmiButtonPress when host is running
While NMI button presses are of little interest when the host is off, some systems (e.g. romed8hm3) generates spurious events on shutdown,
Add option to only log nmiButtonPress when host is running
While NMI button presses are of little interest when the host is off, some systems (e.g. romed8hm3) generates spurious events on shutdown, probably due to some lack of electronic stability. This patch adds an option to disable handling these events when host is off.
Change-Id: Idc74b2dcb7131ddf6d99d1b8c49d947be98de78e Signed-off-by: Olivier FAURAX <olivier.faurax@eu.equinix.com>
show more ...
|
| 48aa1f05 | 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: I844971bd190187ba9ef2e8cf16809e2d16317ec4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|