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

show more ...


# b4813bdf 06-Aug-2024 Adriana Kobylak <anoo@us.ibm.com>

Add Blueridge and Fuji systems

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


# 749bdcc9 17-Jan-2024 Adriana Kobylak <anoo@us.ibm.com>

functions: Replace IBMCompatibleSystem with Compatible

The Compatible interface will be replacing the IBMCompatibleSystem
interface. Reference:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-int

functions: Replace IBMCompatibleSystem with Compatible

The Compatible interface will be replacing the IBMCompatibleSystem
interface. Reference:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/68125
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/68128

Tested: Verified the symlinks for the PNOR files were created
successfully on a Rainier 4U system with the new Compatible interface
changes.

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

show more ...


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

show more ...


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


# 9b837f61 23-Feb-2023 Adriana Kobylak <anoo@us.ibm.com>

item_updater: Add Bonnell compatible system

Add support for the P10 Bonnell system, it was added to the EM
Compatible Systems with:
```
https://github.com/openbmc/entity-manager/commit/0b5b122fe93f0

item_updater: Add Bonnell compatible system

Add support for the P10 Bonnell system, it was added to the EM
Compatible Systems with:
```
https://github.com/openbmc/entity-manager/commit/0b5b122fe93f02fe79e0f8263a9c9e2c6d5c8c5e
```

Tested: Verified the symlinks were created on a Bonnell system.

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

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


# ebf67bf7 21-Jun-2021 Adriana Kobylak <anoo@us.ibm.com>

functions: bios-attr: Add match for PLDM

Add a match to watch for PLDM name owner change to detect when PLDM
starts. The callback would check if the new owner is set, which means
the

functions: bios-attr: Add match for PLDM

Add a match to watch for PLDM name owner change to detect when PLDM
starts. The callback would check if the new owner is set, which means
the service started instead of stopped, and then gets the properties
from entity manager to call the function that parse the json file and
sets the bios attr. If the entity manager interfaces are empty, it just
returns and the entity manager callback would take over when entity
manager starts.

This bios attr subcommand is now a vector to be able to return the two
matches, the one for EM and the new PLDM one.

Tested: Verify the bios attr was set when EM and PLDM were stopped and
EM was started then PLDM, and also having PLDM start first then EM.

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

show more ...


# ae0998f1 16-Jun-2021 Adriana Kobylak <anoo@us.ibm.com>

functions: Parse json file to set bios attr table

The elements.json file have entries as follow:
"lids": [
{
"element_name": "HBD.RAINIER_2U_XML",

functions: Parse json file to set bios attr table

The elements.json file have entries as follow:
"lids": [
{
"element_name": "HBD.RAINIER_2U_XML",
"short_lid_name": "81e00630",
},
{
"element_name": "HBD.RAINIER_2U_XML.iplTime",
"short_lid_name": "81e0068d",
},
{
"element_name": "NVRAM.P10",
"short_lid_name": "81e0066b",
},
{
"element_name": "HDAT.RAINIER_4U_XML",
"short_lid_name": "81e00675",
},

Need to parse the element name and lid name depending on the system. The
.P10 files are common to all P10 systems, the .<system> applies only to
the system name provided by Entity Manager. The .iplTIme takes
precedence and should be the lid number that it's picked up, so use []
instead of insert to overwrite an entry if it had already being set.

In the example above, the string for a rainier 2U should look like:
HBD=81e0068d,NVRAM=81e0066b.

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

show more ...


# 53a27395 14-Jun-2021 Adriana Kobylak <anoo@us.ibm.com>

mmc: Add update-bios-attr-table subcommand

Add the update-bios-attr-table subcommand to update the bios attribute
table with the host firmware well-known names based on system type. The

mmc: Add update-bios-attr-table subcommand

Add the update-bios-attr-table subcommand to update the bios attribute
table with the host firmware well-known names based on system type. The
system type is provided by Entity Manager, and this new subcommand uses
some of the existing infrastructure that the process-host-firmware
subcommand has to determine the system type.

Add a new service file to run this new subcommand so that it can block
waiting for the entity manager interface to appear on D-Bus.

Subsequent commands will add parsing the JSON file to build the bios
attribute string and set the bios attribute property.

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

show more ...


# a30fc13e 12-Mar-2021 Andrew Geissler <geissonator@yahoo.com>

config: add rainier 1s4u support

IBM is introducing a new variant of its rainier 4u machine that requires
a different entity manager config. From a host data perspective though,
ever

config: add rainier 1s4u support

IBM is introducing a new variant of its rainier 4u machine that requires
a different entity manager config. From a host data perspective though,
everything is the same so just point to the same data.

Tested:
- Booted up system with 1s4u IM keyword and new entity manager config
and verified correct links for host data were still in place.
i.e. DEVTREE -> DEVTREE.RAINIER_4U_XML

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

show more ...


# 0529d284 16-Dec-2020 Andrew Geissler <geissonator@yahoo.com>

config: add new everest machine support

The upcoming IBM everest system will be supported within the "rainier"
flash image.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com

config: add new everest machine support

The upcoming IBM everest system will be supported within the "rainier"
flash image.

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

show more ...


# 4dcf55d4 16-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

updater: Add missing static keyword

Earlier refactoring introduced a regresssion where the object manager is
briefly created and then destroyed. This means the application doesn't
e

updater: Add missing static keyword

Earlier refactoring introduced a regresssion where the object manager is
briefly created and then destroyed. This means the application doesn't
emit ObjectManager signals when processing new images - or any other
activity that results in new dbus objects, and any subsequent downstream
logic that relies on these signals is not triggered.

The object manager is meant to be created and remain for the lifetime of
the daemon so make it static.

Change-Id: I086c7ba108d05c8783497d0e255187c3b149a2a8
Fixes: 1ee9095b28861cbff63b350625e407faa1936430
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 099543e4 09-Nov-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

updater: add process-host-firmware subcommand

Add general support for subcommands. Do this by bringing in the the
CLI11 library, and by skipping over dbus service initialization if a

updater: add process-host-firmware subcommand

Add general support for subcommands. Do this by bringing in the the
CLI11 library, and by skipping over dbus service initialization if a
subcommand is specified on the command line.

Implement the first subcommand: process-host-firmware. If no subcommand
is specified on the command line, openpower-update-manager continues to
launch as a dbus service.

Introduce functions.cpp/functions.hpp. functions.cpp is intended to be
a module in which process-hostfirmware and future openpower-item-updater
subcommands can be implemented. functions.hpp should be used to export
declarations to unit tests or item_updater_main.cpp.

The IBM POWER host firmware runtime looks for data and/or additional
code while bootstraping in locations with well-known names.
Additionally, the host firmware runtime relies on an external party to
map platform specific data and/or code to the well known names. The
process-host-firmware command maintains that mapping on behalf of the
host firmware and ensures the correct blob files exist in the well-known
locations prior to starting the host firmware runtime.

The process-host-firmware subcommand registers for callbacks from entity
manager when entity manager adds new DBus interfaces. Interfaces other
than IBMCompatibleSystem are ignored. Entity manager is started with
dbus activation if it is not already running. If IBMCompatibleSystem is
found and a set of host firmware blob filename extensions are mapped,
they are used to write "well-known" names into the filesystem for use by
the host firmware runtime.

Once the well-known names are written to the filesystem the program will
exit.

If entity manager does not publish an IBMCompatibleSystem interface the
command will wait indefinitely for it to appear. For this reason it is
not recommended to run the process-host-fimrware subcommand if
IBMCompatibleSystem is not implemented.

If IBMCompatibleSystem is implemented but no host firmware blob filename
extensions are mapped, the program will exit without doing anything.

Testcases are provided.

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

show more ...


# 1ee9095b 09-Nov-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

main: refactor service initialization

The service initialization tasks currently consist of:
- Instantiating freedesktop.ObjectManager
- Instantiating an updater instance and providi

main: refactor service initialization

The service initialization tasks currently consist of:
- Instantiating freedesktop.ObjectManager
- Instantiating an updater instance and providing it with a dbus
connection
- Instantiating a watch instance and attaching it to the program event
loop
- Claiming a well known name on DBus

Move these service initialization tasks to a new function. This opens
the door to _not_ performing service initialization in an easy to read
way.

A couple of subtle ordering changes have occurred:
- The bus socket callbacks are attached to the event loop as soon as the
event loop is instantiated. This change doesn't have any functional
impact; any data waiting in the dbus socket isn't processed until
loop.loop() is called anyway. What the relocation does enable is access
to the event loop in the new method, via the of the bus.get_event()
method.
- watch is now instantiated prior to claiming a busname. That's ok
because that doesn't result in any observable difference to client
applications that may be watching for signals.

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

show more ...


# 0283f7cb 09-Nov-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

main: use sdeventplus

Make use of the RAII that comes with the sdeventplus c++ bindings for
the sd_event library.

Change-Id: Ie655766fdc625e1150c956b2eb16e0352e7c3859
Signed

main: use sdeventplus

Make use of the RAII that comes with the sdeventplus c++ bindings for
the sd_event library.

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

show more ...


# c8f22502 06-Nov-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

fix compiler warnings

Fix a couple unused-parameter warnings so we can turn the warnings all
the way up.

Change-Id: I36c611da5a10732dbb89e289e42a870c902dd245
Signed-off-by:

fix compiler warnings

Fix a couple unused-parameter warnings so we can turn the warnings all
the way up.

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

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


# 8bc2ab4e 15-Jul-2020 Adriana Kobylak <anoo@us.ibm.com>

Add MMC layout

Add support for eMMC layout. The actual update of the image will
be handled by the BMC updater since the image file will be
packaged in a single tarball, but the eMMC

Add MMC layout

Add support for eMMC layout. The actual update of the image will
be handled by the BMC updater since the image file will be
packaged in a single tarball, but the eMMC still needs to have
some services to setup the host firmware mounts for the virtual
pnor configuration to use. Therefore the functions are empty.

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

show more ...


# 1db9adf3 05-Mar-2019 Lei YU <mine260309@gmail.com>

Refactor: Fix issues found by cppcheck

Resolve several issues found by cppcheck:

[msl_verify.hpp:28]: (style) Class 'MinimumShipLevel' has a constructor with 1 argument that is

Refactor: Fix issues found by cppcheck

Resolve several issues found by cppcheck:

[msl_verify.hpp:28]: (style) Class 'MinimumShipLevel' has a constructor with 1 argument that is not explicit.
[ubi/watch.hpp:21]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[item_updater_main.cpp:22] -> [item_updater_main.cpp:49]: (style) Local variable rc shadows outer symbol
[serialize.cpp:19]: (performance) Function parameter 'versionId' should be passed by const reference.
[ubi/watch.hpp:43]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit.
[serialize.cpp:52]: (performance) Function parameter 'versionId' should be passed by const reference.
[serialize.cpp:116]: (performance) Function parameter 'versionId' should be passed by const reference.
[activation.cpp:115] -> [activation.cpp:152]: (style) Local variable mapperResponseMsg shadows outer symbol
[version.hpp:114]: (performance) Variable 'eraseCallback' is assigned in constructor body. Consider performing initialization in initialization list.
[image_verify.hpp:53]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit.
[ubi/item_updater_ubi.cpp:192]: (performance) Function parameter 'versionId' should be passed by const reference.
[ubi/item_updater_ubi.cpp:203]: (performance) Function parameter 'versionId' should be passed by const reference.

Tested: Verify the code compiles and cppcheck does not report the above
issues.

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

show more ...


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

Static layout: Add dummy item_updater

This commit only adds the functions without implementation.

Tested: Verify the code compiles with or without static layout.

Change-Id:

Static layout: Add dummy item_updater

This commit only adds the functions without implementation.

Tested: Verify the code compiles with or without static layout.

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

show more ...


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

Refactor: Move watch to ubi

watch is ubi specific functions, move it to ubi dir.

Tested: On the last commit of the patch series, run code update and
factory reset on Wit

Refactor: Move watch to ubi

watch is ubi specific functions, move it to ubi dir.

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

Change-Id: Ia7f6b6de845ddd40e2a32ad626d3b7af9074c7f3
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 ...


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


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


12