History log of /openbmc/phosphor-state-manager/bmc_state_manager.hpp (Results 1 – 21 of 21)
Revision Date Author Comments
# 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 ...


# 3ff5a360 17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I1068afac44652ab3d9bfe58bb6e19d359d84f20e
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# 30538e82 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: I6c35c476f2c7238321c6e9a2662d7f5d4377c64a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# bd1eebd9 05-Oct-2023 Willy Tu <wltu@google.com>

bmc_state: Update last update time after timesync

Currently the lastRebootTime is updated at service boot up and reuses
the values on future requests. This can cause incorrect values like

```
$ bus

bmc_state: Update last update time after timesync

Currently the lastRebootTime is updated at service boot up and reuses
the values on future requests. This can cause incorrect values like

```
$ busctl get-property xyz.openbmc_project.State.BMC /xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC LastRebootTime
t 1680555476000
$ uptime
11:23:05 up 1 day, 24 min, load average: 3.08, 2.89, 2.84
```

1680555476000 -> Mon Apr 03 2023 20:57:56 GMT+0000
which is more than 1 day and 24 minutes ago.

The change will detect property changes to `time-sync.target` which
would be activated after timesync happens. It will then deactivate the
matcher after update the lastReboot time once.

Tested:
After bootup and timesync, the lastReboot time is now correct.

Change-Id: Iee8a0bc9f0c5b22d5010f1a677011e44b5d425d3
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 564eb4fa 07-Sep-2023 Willy Tu <wltu@google.com>

Set lastRebootTime once at startup only

The lastRebootTime doesn't change once the daemon starts, so we only
need to fetch the info once and save the time instead of calculating it
everytime.

Chang

Set lastRebootTime once at startup only

The lastRebootTime doesn't change once the daemon starts, so we only
need to fetch the info once and save the time instead of calculating it
everytime.

Change-Id: I5e665d637f122727be9bb8f0e7b731d75a567f02
Signed-off-by: Willy Tu <wltu@google.com>

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 ...


# 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 ...


# 2774c788 17-Feb-2022 Andrew Geissler <geissonator@yahoo.com>

crit-service: refactor unit state checking

Break this out into generic function so it can be utilized to also look
at the new new quiesce target in a future commit

Signed-off-by: Andrew Geissler <g

crit-service: refactor unit state checking

Break this out into generic function so it can be utilized to also look
at the new new quiesce target in a future commit

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I1277606d10c1d8e0eafc120ad1fd6cdf80013abd

show more ...


# 2bfb1efc 16-Mar-2021 Tim Lee <timlee660101@gmail.com>

bmc-state-manager: Add support BMC Reboot Cause feature

Below is patch supporting this change.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/41359

Test

bmc-state-manager: Add support BMC Reboot Cause feature

Below is patch supporting this change.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/41359

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.Watchdog"

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I4e12f1df96cc1321beee0c4eae648d71e2d4a3b9

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: I5b80bb56845170

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 ...


# e6710b7e 12-Jul-2018 Matt Spinler <spinler@us.ibm.com>

BMC state manager support for LastRebootTime

Use the uptime value to calculate the time of the last
BMC reboot when the LastRebootTime property is read.

Calculates it on the fly

BMC state manager support for LastRebootTime

Use the uptime value to calculate the time of the last
BMC reboot when the LastRebootTime property is read.

Calculates it on the fly instead of once at startup so that
if someone changes the BMC time the value will still be
accurate.

Resolves openbmc/openbmc#3159

Tested: Verify the property returns the right value.

Change-Id: I4bc8d2cdf18c225b24c98d9567d053c3246b7506
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 58a18013 19-Jan-2018 Andrew Geissler <geissonator@yahoo.com>

Apply clang code format to this state repo

Change-Id: I232af39d8ded90fa3eb37b74d1435ddbf19fffb1
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>


# d32f8181 05-May-2017 Patrick Williams <patrick@stwcx.xyz>

bmc: use latest sdbusplus match APIs

Change-Id: I02aca5f8c7e633c6de7608194a0bdb0874ef2090
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>


# d3e58474 02-Feb-2017 Josh D. King <jdking@us.ibm.com>

Add discovery of initial state

Added the method discoverInitialState that will be
used to determine if the obmc-standby.target is
either active or inactive. This catches the race

Add discovery of initial state

Added the method discoverInitialState that will be
used to determine if the obmc-standby.target is
either active or inactive. This catches the race
condition that could happen if just our app was
restarted and the signal had already been given
and we had missed it.

Change-Id: Iadcdcbd2d1045fa62491e9af6e2402d4b17c4a60
Signed-off-by: Josh D. King <jdking@us.ibm.com>

show more ...


# d613b816 19-Dec-2016 Josh D. King <jdking@us.ibm.com>

Process system state changes

We are currently subscribed to the systemd to get
a signal notifying us when the obmc-standby.target
is ready. Things may change in the future but this

Process system state changes

We are currently subscribed to the systemd to get
a signal notifying us when the obmc-standby.target
is ready. Things may change in the future but this
is what we have decided to do for now.

Change-Id: I81ecdcb45123feb611cf88916c0f9caadcd82dfe
Signed-off-by: Josh D. King <jdking@us.ibm.com>

show more ...


# 5162a7b7 19-Dec-2016 Josh D. King <jdking@us.ibm.com>

Add BMC state transition of reboot

This commit should support the transition to
reboot a BMC using systemd. Later commits will
handle the remaining transition monitoring for
upd

Add BMC state transition of reboot

This commit should support the transition to
reboot a BMC using systemd. Later commits will
handle the remaining transition monitoring for
updating the current state.

Change-Id: I1fb14b8775de4d2cbc522aa3405c8917291bf3cc
Signed-off-by: Josh D. King <jdking@us.ibm.com>

show more ...


# 6db3822d 19-Dec-2016 Josh D. King <jdking@us.ibm.com>

Subscribe to systemd on startup

Added code for the implementation of the method
subscribeToSystemdSignals. The reason for this is
because we want to catch the obmc-standby.target

Subscribe to systemd on startup

Added code for the implementation of the method
subscribeToSystemdSignals. The reason for this is
because we want to catch the obmc-standby.target
signal and be notified when it is done which means
the BMC is READY.

Change-Id: I824b83676db8cb211f5bee954f98a719a773a62b
Signed-off-by: Josh D. King <jdking@us.ibm.com>

show more ...


# bdd9cb71 19-Dec-2016 Josh D. King <jdking@us.ibm.com>

Add base support for BMC state management

This is the starting code needing to
build the application. Still more to do,
this is just the layout for the additional
commits that w

Add base support for BMC state management

This is the starting code needing to
build the application. Still more to do,
this is just the layout for the additional
commits that will be done for the state
management.

Change-Id: Ief1dc96c84b34630e60ef40c99d4faf5b6f6e02e
Signed-off-by: Josh D. King <jdking@us.ibm.com>

show more ...