History log of /openbmc/phosphor-psu-code-mgmt/src/ (Results 26 – 50 of 70)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
33cf9f0817-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: Icafafe827d67c9b6cc5c3f6bfb204fe425e91a32
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

3f6c12b820-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: I732e5e7e4a76173d0018b1cd540c3b9b4adee83e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

5670b18810-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: Idb72665dbadfa8afd569a2e0e254d84f0a2108d3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

374fae5622-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: Ie530f2c63000bbfac7c5fbbc74ebe6bc8c07fb1a

show more ...

b5f9b82916-Jun-2022 Patrick Williams <patrick@stwcx.xyz>

remove std::experimental usage

The bug previously referenced that instigated the usage of
std::experimental::any instead of std::any has long been fixed in
GCC/libstdc++. Switch back to use the non

remove std::experimental usage

The bug previously referenced that instigated the usage of
std::experimental::any instead of std::any has long been fixed in
GCC/libstdc++. Switch back to use the non-experimental library.

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

show more ...

434ae48316-Apr-2022 Tang Yiwei <tangyiwei.2022@bytedance.com>

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` or `action::emit_interface_added`.

Signed-off-by: Tang Yiwei <tangyiwei.2022@bytedance.com>
Change-Id: Ibb77315bca56d6cebfb540976f44ee362534f942

show more ...

0b7c7b3a07-Feb-2022 George Liu <liuxiwei@inspur.com>

openssl: stop using deprecated SHA512_* functions

The openssl/sha.h header is deprecated for OpenSSL 3 along with all the
functions in it. Switch to use the EVP_MD interfaces.

Signed-off-by: Georg

openssl: stop using deprecated SHA512_* functions

The openssl/sha.h header is deprecated for OpenSSL 3 along with all the
functions in it. Switch to use the EVP_MD interfaces.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I17f9cd3652d92caab1baf29829e8e0cd6f781142

show more ...

6d62ceb302-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

Signed-off-

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

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

show more ...

de27029312-Jun-2020 George Liu <liuxiwei@inspur.com>

sdbusplus: replace message::variant with std::variant

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id94a72c3195a2ffefac9b47eb77cd7748f4e61bc

bfa8d16f13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: replace message::variant with std::variant

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

2e9a3b2913-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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

f356fdc901-Mar-2020 Albert Zhang <zhanghaodi@inspur.com>

Cleanup the code related to emit_interface_added

sdbusplus now supports action::emit_interface_added() when an object is
constructed, so the code that manually invokes emit_interface_added()
could b

Cleanup the code related to emit_interface_added

sdbusplus now supports action::emit_interface_added() when an object is
constructed, so the code that manually invokes emit_interface_added()
could be cleaned up and use the above action instead.

Tested:Tested on fp5280g2, and psu update is normal.

Signed-off-by: Albert Zhang <zhanghaodi@inspur.com>
Change-Id: I0ca12a0941c1d45c860478c6f0d72675668de653

show more ...

a8b966f117-Mar-2020 Lei YU <mine260309@gmail.com>

Add updateable association

Add 'updateable' association to the functional PSU firmware.
This 'updateable' association can be used to mark all the
firmware components which can be programmable from B

Add updateable association

Add 'updateable' association to the functional PSU firmware.
This 'updateable' association can be used to mark all the
firmware components which can be programmable from BMC
interfaces like Redfish.

Resolves openbmc/phosphor-psu-code-mgmt#2

Tested: Verify unit tests success;
Verify the updateable associations are created for PSU firmware
objects on Witherspoon, and the Redfish has "Updateable": true
for the PSU images.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I579121587b0d2c14f08beceaa68e380eaf1eefd9

show more ...

8afeee5621-Oct-2019 Lei YU <mine260309@gmail.com>

Activation: add BMC reboot guard

BMC shall not reboot during PSU update, otherwise it has the risk of
putting the PSU in a bad state.
So add BMC reboot guard in ActivationBlocksTransition to enable

Activation: add BMC reboot guard

BMC shall not reboot during PSU update, otherwise it has the risk of
putting the PSU in a bad state.
So add BMC reboot guard in ActivationBlocksTransition to enable reboot
guard when PSU update is started, and disable it when it's finished or
failed.

During test, it's found that the ActivationBlocksTransition is created
too early before checking the PSU compatibility, it is fixed by
constructing ActivationBlocksTransition after the check.

Tested: Verify the BMC guard is enabled and disabled during PSU update.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I405fe640929aa91ecbcb3d48e19309d38b6849e5

show more ...

d0f8bbb318-Oct-2019 Lei YU <mine260309@gmail.com>

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed stri

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed string contains '\r' and it incorrectly parses the string.

Add a piece of code to support CRLF line feed so support such MANIFEST
files.

Tested: Added a unit test case to verify CRLF is correctly handled.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I99e146717b815e3e40c232376555b2b48d77bc56

show more ...

2d15625217-Oct-2019 Lei YU <mine260309@gmail.com>

Fix an incorrect logging

It was incorrectly using "%d" to log a "METHOD" string.
Fix it.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I792f82feb894f5d5a83c4d4f60f52135f6d08dd0

1517f5f614-Oct-2019 Lei YU <mine260309@gmail.com>

Check and sync PSU image when PSU is plugged in

When a PSU is plugged out and in, the service shall check the version
and do update if it is with an old software.
When the PSU is plugged in, the mod

Check and sync PSU image when PSU is plugged in

When a PSU is plugged out and in, the service shall check the version
and do update if it is with an old software.
When the PSU is plugged in, the model is not available for a while, so
the service subscribe the model property as well, and only create the
software object when both present and model properties are set.

Tested: With dummy update service, verify on Witherspoon that when PSU
is plugged out (by setting "Present" property in inventory), the
software object is removed, and when it's pluggd int (by setting
"Present" property), the software object is created after the
model is got, and is upgraded by a newer image stored in BMC
filesystem.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia7516e5bc9c642158b216036bcddf404157f9204

show more ...

ffb3653915-Oct-2019 Lei YU <mine260309@gmail.com>

Activation: remove old objects after update done

The update on PSUs is one-by-one, after each PSU is updated, notify
ItemUpdater by onUpdateDone() so that the old object for the PSU is
removed.

Tes

Activation: remove old objects after update done

The update on PSUs is one-by-one, after each PSU is updated, notify
ItemUpdater by onUpdateDone() so that the old object for the PSU is
removed.

Tested: With dummy PSU image and update service, verify the old
objects are removed on Witherspoon.

Change-Id: I212b8cba9570ad96083d362bf57691fdabb4e42f

show more ...

63f9e71212-Oct-2019 Lei YU <mine260309@gmail.com>

Sync PSU images on service startup

On service startup, it shall check the PSU images, find a latest
version, and update to the PSUs that are not with this version.

Tested: With dummy image and serv

Sync PSU images on service startup

On service startup, it shall check the PSU images, find a latest
version, and update to the PSUs that are not with this version.

Tested: With dummy image and service, test on Witherspoon with 2
different running PSU software:
* When startup without stored image, the serive tries to update an older
PSU but it does not have PSU image, so it's skipped with below journal
log:
Automatically update PSU
No image for the activation, skipped
* When startup with an older image stored in BMC, it behaves the same as
above.
* When startup with a new image stored in BMC, it updates the PSUs, with
below example journal log:
Automatically update PSU
Starting Update PSU
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
/var/lib/obmc/psu/2B1D...
Started Update PSU
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
/var/lib/obmc/psu/2B1D.
Starting Update PSU
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
/var/lib/obmc/psu/2B1D...
Started Update PSU
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
/var/lib/obmc/psu/2B1D.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I6d676c5a4441685fb2b5920455f439c00f6097af

show more ...

4b9ac39211-Oct-2019 Lei YU <mine260309@gmail.com>

utils: Add function to check if PSU is associated

Add a helper function to check if a PSU is in an association list, which
will be used in future commits to check if a PSU is running a software
imag

utils: Add function to check if PSU is associated

Add a helper function to check if a PSU is in an association list, which
will be used in future commits to check if a PSU is running a software
image.

Tested: added unit test case and verify it passes.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I99b5d3d8d09f8e09a1eb42ba104a4804b7214cf1

show more ...

6520748d11-Oct-2019 Lei YU <mine260309@gmail.com>

utils: Add function to get the latest version

This repo does not know which PSU version is the latest, and it lets the
vendor tool to decide which one is the latest.

This commit defines PSU_VERSION

utils: Add function to get the latest version

This repo does not know which PSU version is the latest, and it lets the
vendor tool to decide which one is the latest.

This commit defines PSU_VERSION_COMPARE_UTIL which is expected to be a
tool that accepts arguments of a list of versions, and returns the
latest version string.

Tested: Put and configure to use the example get_latest_version on
Witherspoon, verify the versionId with a larger version string
is returned.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ic5a10d3724cf6a98b3979486c72d54f8deac7038

show more ...

e8945ea629-Sep-2019 Lei YU <mine260309@gmail.com>

Activation: support updating PSU from stored image

The previous code assume the image to update is from IMG_DIR.
Now it needs to update PSU from pre-built or stored images.

This commit adds the sup

Activation: support updating PSU from stored image

The previous code assume the image to update is from IMG_DIR.
Now it needs to update PSU from pre-built or stored images.

This commit adds the support, by constructing the systemd unit based on
Activation's Path property instead of IMG_DIR.

Tested: Verify on Witherspoon that it is able to activate a stored
image.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I0936bb921b22c7f67aee9689e3695e6b21703a29

show more ...

58c26e3f27-Sep-2019 Lei YU <mine260309@gmail.com>

Scan directories that store PSU images on start

When the service starts, scan the directories that store PSU images,
including the built-in images, and the saved images during PSU update.

When the

Scan directories that store PSU images on start

When the service starts, scan the directories that store PSU images,
including the built-in images, and the saved images during PSU update.

When the scanned image is different than the running images, create
activation/version object;
When the scanned image is the same as the running images, update the
version object's path to indicate the PSU image path, so it could be
used for future update in case a PSU is replaced with a different
software.

Tested: On Witherspoon, fake create a dummy PSU image with a different
version than running PSU, verify a new object is created on
restart;
fake creating a dummy PSU image with a same version as a running
PSU, verify no new object is created, but the "Path" property is
set to the PSU image directory.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I860b978250a718eb82d948a1c88bd8f41bb2b2e3

show more ...

2e0e2de526-Sep-2019 Lei YU <mine260309@gmail.com>

Activation: store PSU image in persistent storage

When an activation succeeds, store the PSU image into persistent
storage, which will be used in future in case a PSU is replaced, and the
BMC will n

Activation: store PSU image in persistent storage

When an activation succeeds, store the PSU image into persistent
storage, which will be used in future in case a PSU is replaced, and the
BMC will need to update the replaced PSU's firmware.
Only the latest image is saved, and old ones are removed for each model.

Tested: On witherspoon, verify the PSU image is saved in persistent
storage after a successful activation with dummy service, and
the FilePath inteface is updated with the stored path.
And after another successful activation, the new image is saved
and the old one is removed in persistent storage.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I11f3d4a91d045d2316242d8eef968f05250d862e

show more ...

9930137b29-Sep-2019 Lei YU <mine260309@gmail.com>

Refactor: Make Activation inherit FilePath interface

Previously Version inherits FilePath interface to provide the
information of the file path property of a software, and Activation was
using pre-d

Refactor: Make Activation inherit FilePath interface

Previously Version inherits FilePath interface to provide the
information of the file path property of a software, and Activation was
using pre-defined location to find the image path (IMG_DIR / versionId).

Now the code is going to support pre-built image and stored image during
update, the Activation class needs to know the file path to perform the
update.

So this commit "moves" the FilePath from Version to Activation.

Tested: Verify the "Path" property on FilePath still exists on the DBus
object after uploading a tarball.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I37b41eaa93cd239ab7732f6fac9400410995ca71

show more ...

123