History log of /openbmc/openpower-pnor-code-mgmt/item_updater.cpp (Results 1 – 25 of 70)
Revision Date Author Comments
# 7fb6c346 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: I4530f5b9df4f5898e26a2eef7efcf82e9728197f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 0dea1992 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: If9a7314dade153dd7dbd149a76352aca8257839d

show more ...


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

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

show more ...


# 8facccfa 04-Nov-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: Ifecce87b6aa64a2800dab3ba1e09ae415accb548
Signed-off-by: Brad Bishop <bradle

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: Ifecce87b6aa64a2800dab3ba1e09ae415accb548
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 3c81037e 15-Jul-2020 Adriana Kobylak <anoo@us.ibm.com>

pnor: Add updatable association to active PNOR FW

Add 'updateable' association to the active PNOR
firmware version object. This 'updateable' association
can be used to mark all the f

pnor: Add updatable association to active PNOR FW

Add 'updateable' association to the active PNOR
firmware version object. This 'updateable' association
can be used to mark all the firmware components
which can be programmable from pnor interfaces like
Redfish.

Signed-off-by: Miguel Gomez <mgomez@mx1.ibm.com>
Change-Id: I33f7ac70c8bfa446aeb045c65c741e2d72ce108a

show more ...


# 573552ae 05-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

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

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


# 212102e6 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

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

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


# 550f31b3 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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


# b8cb0cc9 31-May-2019 Adriana Kobylak <anoo@us.ibm.com>

Remove deprecated is_method_error code

The is_method_error() function is no longer needed, instead a
try-catch block should be used instead.
Reference:
https://lists.ozlabs.org/p

Remove deprecated is_method_error code

The is_method_error() function is no longer needed, instead a
try-catch block should be used instead.
Reference:
https://lists.ozlabs.org/pipermail/openbmc/2018-October/013696.html

Tested: Code update with field mode enabled, and ran Delete while
host powered on, to check things still worked as expected.

Change-Id: I8ba8da32fe787c3151cc5be7cb9f55d1901e57cd
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# a9ac9279 22-Feb-2019 Lei YU <mine260309@gmail.com>

Refactor: Make createActivation() common

The function is almost the same for ubi and static layout, except a few
differences that creates the ubi objects.

Add below pure virtual

Refactor: Make createActivation() common

The function is almost the same for ubi and static layout, except a few
differences that creates the ubi objects.

Add below pure virtual functions for ubi to create ubi specific objects
* createActivationObject()
* createVersionObject()

Then it is possible to move most of the code in createActivation() into
the commone one.

Tested: On the last commit of the patch series, run code update and
factory reset on Witherspoon and all work fine.

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

show more ...


# f3ce4337 21-Feb-2019 Lei YU <mine260309@gmail.com>

Refactor: Split item_updater to common and ubi

The existing item_updater is highly coupled with ubifs.
It will support static layout and ubi in future.
So split the functions in to c

Refactor: Split item_updater to common and ubi

The existing item_updater is highly coupled with ubifs.
It will support static layout and ubi in future.
So split the functions in to common ones and ubi specific ones, and move
the ubi specific code in ubi dir.

1. Keep common functions and make them virtual for extension.
createActiveAssociation()
updateFunctionalAssociation()
removeAssociation()
erase()
2. Create ubi/item_updater_ubi and move other functions into it.
3. Change updateFunctionalAssociation() parameter for future use.

To support static layout, a new item_updater_static will be written.

Tested: On the last commit of the patch series, run code update and
factory reset on Witherspoon and all work fine.

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

show more ...


# ae81da46 23-Jan-2019 Lei YU <mine260309@gmail.com>

Allow delete functional PNOR if only 1 PNOR is allowed

When a system only supports 1 PNOR (e.g. 64MiB chip), it shall define
ACTIVE_PNOR_MAX_ALLOWED to 1.
In this case, the PNOR code

Allow delete functional PNOR if only 1 PNOR is allowed

When a system only supports 1 PNOR (e.g. 64MiB chip), it shall define
ACTIVE_PNOR_MAX_ALLOWED to 1.
In this case, the PNOR code update shall delete the exising functional
PNOR to free the space for the new PNOR, otherwise there will be not
enough space for the new PNOR, and the code update will fail.

So change the logic in freeSpace() to allow delete functional PNOR if
ACTIVE_PNOR_MAX_ALLOWED is defined to 1.

Tested: Enable openpower-ubi on Romulus and verify PNOR code update
succeeds.

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

show more ...


# b5237174 30-Oct-2018 Adriana Kobylak <anoo@us.ibm.com>

item_updater: Call remove association on delete

The remove association function was supposed to be called
on delete but was never implemented so if the associations
are queried but t

item_updater: Call remove association on delete

The remove association function was supposed to be called
on delete but was never implemented so if the associations
are queried but the version has been deleted, that'd be
false information, so call to remove the associations on delete,
also rename it to delete all associations, because the
functional pnor version can be deleted if the chassis state
is off and the delete function already made that determination.

Tested: Verified all associations (active and functional) are
deleted with a DeleteAll call.

Change-Id: I6e5589256dd8f62ac2ecf7574b9d08920b8b5e3d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# f6ed5897 07-Sep-2018 Gunnar Mills <gmills@us.ibm.com>

clang-format: Update to match docs repo

Update the .clang-format file.
Now includes header sorting and updating PointerAlignment.

Change-Id: I7119c12f1cc0a461cb7e4576dff6a02dcc9

clang-format: Update to match docs repo

Update the .clang-format file.
Now includes header sorting and updating PointerAlignment.

Change-Id: I7119c12f1cc0a461cb7e4576dff6a02dcc95cbc4
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# c39d923f 20-Jul-2018 Adriana Kobylak <anoo@us.ibm.com>

deleteAll: Delete functional version if chassis off

The deleteAll function was skipping to delete the functional
version, which should be allowed if the chassis state is not on.
The

deleteAll: Delete functional version if chassis off

The deleteAll function was skipping to delete the functional
version, which should be allowed if the chassis state is not on.
The erase function already supports that so the user can
individually delete the functional version, just the delete
would not work via the DeleteAll call.

Tested: All PNOR versions, including the functional one, get
deleted at chassis power off via the DeleteAll method.

Change-Id: Ib390545f3ade68e2a3182064549e05994e7f7191
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 0bd65051 09-Jul-2018 Adriana Kobylak <anoo@us.ibm.com>

reset: Call Suspend / Resume mbox

During factory reset, call to suspend and resume mbox
to notify the host that it should not access the flash
during this operation.

Closes

reset: Call Suspend / Resume mbox

During factory reset, call to suspend and resume mbox
to notify the host that it should not access the flash
during this operation.

Closes openbmc/openbmc#3210

Tested: Ran factory reset with host running and verified
there were no error messages or failed services.

Change-Id: Id881e5b4021744637d3988e57f784223957562b5
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# ca9ba069 09-Jul-2018 Adriana Kobylak <anoo@us.ibm.com>

reset: Replace service files with filesystem APIs

In the factory reset function, the read-write and preserved
partitions are cleared via systemd service files. The call
to run these

reset: Replace service files with filesystem APIs

In the factory reset function, the read-write and preserved
partitions are cleared via systemd service files. The call
to run these services is asynchronous.
Replace these services files with C++ filesystem APIs so
that it is known when the file deletion starts and completes
to be able to notify the host when a reset operation is
taking place.

Part of openbmc/openbmc#3210

Tested: Verified factory reset still clears the read-write
and preserved partitions.

Change-Id: I7575a2e97a544b1e8692148e8664bdd14fdfb90f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# afd0a45c 30-May-2018 Joseph Reynolds <jrey@us.ibm.com>

Use s.c_str() in log messages

Part of a series of commits that resolve openbmc 2905

Here is something funny: in item_updater.cpp:300 is a string
and on line 316 it is const char

Use s.c_str() in log messages

Part of a series of commits that resolve openbmc 2905

Here is something funny: in item_updater.cpp:300 is a string
and on line 316 it is const char*. It may be confusing to
have the same variable name with two different related types.

Tested: static_assert only

Change-Id: I59556fc184ef1f1047bd8a76062598b7518c36ae
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>

show more ...


# 70dcb63a 27-Feb-2018 Adriana Kobylak <anoo@us.ibm.com>

Enable clang code format

Change-Id: I4490e930459a7eab6f6dd15198418c5314755d3f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>


# 40ecdb6b 20-Nov-2017 Michael Tritz <mtritz@us.ibm.com>

Host updater: Back up version priority in environment variables

This enhancement to the host updater adds an extra location for storing
redundancy priority values for host software versi

Host updater: Back up version priority in environment variables

This enhancement to the host updater adds an extra location for storing
redundancy priority values for host software versions. Priority values
are stored as environment variables in the format
pnor-[versionId]=[priority]. This addresses any scenario in which the
Cereal files storing these priority values are deleted, including (but
not limited to) a BMC factory reset.

Additionally, priority files are no longer removed during a host factory
reset. Removing these files makes restoration of the priority on reboot
impossible.

Resolves openbmc/openbmc#2666

Change-Id: I6b528e75785d48bbb5c8782e879b061934ad9432
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>

show more ...


# fedbf3d3 17-Jan-2018 Gunnar Mills <gmills@us.ibm.com>

fix item updater freeSpace()

Fixed freeSpace() to remove more than 1 version if that is what is
needed to get the number of active PNOR versions at
ACTIVE_PNOR_MAX_ALLOWED -1. Curren

fix item updater freeSpace()

Fixed freeSpace() to remove more than 1 version if that is what is
needed to get the number of active PNOR versions at
ACTIVE_PNOR_MAX_ALLOWED -1. Currently, ACTIVE_PNOR_MAX_ALLOWED is
set to 2. We have seen cases where there are 3 active PNOR versions.
In those cases, freeSpace() only removes 1 active PNOR version, when
it should remove 2 to bring the total number of active PNOR
versions to 1.

Resolves openbmc/openbmc#2806

Change-Id: I0e9f5b6835298ae86091848f889bbc316e0a7f57
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# bb31f028 22-Nov-2017 Michael Tritz <mtritz@us.ibm.com>

Clear files in pnor-patch directory on host factory reset

This patch extends the functionality of the host factory reset by
clearing the pnor-patch directory at /usr/local/share/pnor.

Clear files in pnor-patch directory on host factory reset

This patch extends the functionality of the host factory reset by
clearing the pnor-patch directory at /usr/local/share/pnor.

Change-Id: I9d4e3838eee3e743bd954fad697ae84deda0518c
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>

show more ...


# 7f80e0b5 22-Oct-2017 Saqib Khan <khansa@us.ibm.com>

PNOR: Fix the delete implementation

- In order to remove the delete object from functional
image, the delete interface is moved inside the
version class so that both item_updater

PNOR: Fix the delete implementation

- In order to remove the delete object from functional
image, the delete interface is moved inside the
version class so that both item_updater and image_manager
can make use of the same implementation.
- To avoid having two delete objects attached to the same
HOST version (item_updater and image_manager), we are now
deleting the image_manager object once the activation
is complete.

Partially resolves openbmc/openbmc#2490

Change-Id: Ie515cc01d5f154e6e55b9a3fb71d831730cd46f6
Signed-off-by: Saqib Khan <khansa@us.ibm.com>

show more ...


# 5b75651b 06-Oct-2017 Michael Tritz <mtritz@us.ibm.com>

Host updater: Remove the Object.Delete interface from functional version

This commit enhances the host updater by dynamically removing the
Object.Delete interface from a host activation

Host updater: Remove the Object.Delete interface from functional version

This commit enhances the host updater by dynamically removing the
Object.Delete interface from a host activation that is currently
running. Once the host isn't running anymore, the interface is re-added
so that the activation may be deleted.

Additionally, isVersionFunctional() from the parent updater is exposed,
since this function is needed to determine whether a given activation
is currently running on the host.

Add the Delete interface to all interfaces when the item updater starts
up, because the chassis state would be off initially, and in the case
where it automatically powers on because the BMC rebooted while the host
was on, the chassis property signal would cause the Delete interface to
be removed.

Change-Id: I4afcc1ebe2e8a3ce212b426749295e79b68cac62
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>

show more ...


# 795d984d 07-Nov-2017 Marri Devender Rao <devenrao@in.ibm.com>

Fix up InternalFailure to include metadata

Scope is to add missing logs for InternalFailure errors

Change-Id: I91dce3221b54b55fd562d2ed730614c489eecb55
Signed-off-by: Marri Deve

Fix up InternalFailure to include metadata

Scope is to add missing logs for InternalFailure errors

Change-Id: I91dce3221b54b55fd562d2ed730614c489eecb55
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>

show more ...


123