History log of /openbmc/openpower-pnor-code-mgmt/mmc/item_updater_mmc.cpp (Results 1 – 14 of 14)
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 ...


# 4cf521e3 13-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

prefer std::format over fmt

Use std::format and remove the dependency on fmt.

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


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


# 2b31497e 01-Jul-2022 Marri Devender Rao <devenrao@in.ibm.com>

Guard: Guarded DIMMS/CPU are not enabled back after factory reset

User not able to enable some of the guarded dimm/cpu after host
factory reset even though host cleared the guards in the guard
parti

Guard: Guarded DIMMS/CPU are not enabled back after factory reset

User not able to enable some of the guarded dimm/cpu after host
factory reset even though host cleared the guards in the guard
partition.

BMC will not know that host took a factory reset for it to clear the
disabled flag for the earlier guarded dimm/cpu.

Modified to force enable all the cpu/dimm during host factory reset.
Test result:
openpower-update-manager[2001]:ItemUpdaterMMC::reset
openpower-update-manager[2001]:GardResetMMC::reset
openpower-update-manager[2001]:GardResetMMC::enableInventoryItems
openpower-update-manager[2001]:GardResetMMC::enableInventoryItemsHelper
openpower-update-manager[2001]:enable specified inventory items
OBJ(/xyz/openbmc_project/inventory/system/chassis/motherboard/dcm0/cpu0/core13)
openpower-update-manager[2001]:enable specified inventory items
OBJ(/xyz/openbmc_project/inventory/system/chassis/motherboard/dcm0/cpu0/core14)
openpower-update-manager[2001]:GardResetMMC::enableInventoryItemsHelper
openpower-update-manager[2001]:enable specified inventory items
OBJ(/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0)

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

show more ...


# 295fce09 13-Jun-2022 Adriana Kobylak <anoo@us.ibm.com>

mmc: reset: Add sleep before returning

Add a sleep call to the reset call to allow service files and reset
operations to complete, so that the user can safely reboot the BMC or
power on the system u

mmc: reset: Add sleep before returning

Add a sleep call to the reset call to allow service files and reset
operations to complete, so that the user can safely reboot the BMC or
power on the system until after the reset call returns.

Tested: Verified the curl command returned after 5s. The BMC takes about
3s to start the service files.

$ date; curl -k -H "X-Auth-Token: $token" -X POST
https://${bmc}/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios -d
'{"data":[]}'; date
Mon 13 Jun 2022 03:50:08 PM UTC
Mon 13 Jun 2022 03:50:13 PM UTC

Jun 13 15:35:20 p10bmc phosphor-log-manager[343]: Deleting all log
entries
...
Jun 13 15:35:23 p10bmc systemd[1]: Started OpenPOWER Host
HardwareIsolation.

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

show more ...


# f9a72a7a 20-May-2022 Adriana Kobylak <anoo@us.ibm.com>

mmc: Set clear NVRAM bios attribute during factory reset

During factory reset, instead of calling the PLDM services to delete the
PHYP NVRAM files, set the pvm_clear_nvram bios attribute to Enabled

mmc: Set clear NVRAM bios attribute during factory reset

During factory reset, instead of calling the PLDM services to delete the
PHYP NVRAM files, set the pvm_clear_nvram bios attribute to Enabled to
signal the hypervisor to clear NVRAM when it starts up.

Add the nvram hostfw directory to the list of directories to preserve
during a factory reset because the NVRAM files would now be cleared by
the hypervisor after reading the bios attribute.

Tested: Verified the pvm_clar_nvram bios attribute was set to Enabled as
part of factory reset. Verified a journal error message was logged if
the attribute did not exist and the rest of the factory reset actions
were executed.

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

show more ...


# 6b56bd4b 20-Apr-2022 Ramesh Iyyar <rameshi1@in.ibm.com>

mmc: Add HardwareIsolation service to restart if factory resets

- The HardwareIsolation (daemon) service is dependent on the host partition
to share the host isolated hardware entries through the

mmc: Add HardwareIsolation service to restart if factory resets

- The HardwareIsolation (daemon) service is dependent on the host partition
to share the host isolated hardware entries through the external
interface (for example Redfish).

- But, If we attempted to do the factory reset then, the host partition
gets deleted and recreated back so due to this the HardwareIsolation
daemon is unable to handle the host partition.

- Fixed the above mentioned issue by restarting the HardwareIsolation daemon.

- Note, start unit won't help if the service is already running like a daemon
so, we need to use restart method for the HardwareIsolation so modified
the code to use a method based on the services that's need to consider
in the host factory reset.

Tested:

- Verified by the host factory reset.

```
Apr 20 11:59:33 bmc_system phosphor-log-manager[339]: Deleting all log entries
Apr 20 11:59:33 bmc_system systemd[1]: Starting Setup Host FW directories...
Apr 20 11:59:33 bmc_system systemd[1]: Starting Create patch directory for Host FW...
Apr 20 11:59:33 bmc_system systemd[1]: Stopping OpenPOWER Host HardwareIsolation...
Apr 20 11:59:33 bmc_system systemd[1]: Starting Reset PHYP-NVRAM-CKSUM file...
Apr 20 11:59:33 bmc_system systemd[1]: Starting Reset PHYP-NVRAM file...
Apr 20 11:59:33 bmc_system systemd[1]: org.open_power.HardwareIsolation.service: Deactivated successfully.
Apr 20 11:59:33 bmc_system systemd[1]: Stopped OpenPOWER Host HardwareIsolation.
Apr 20 11:59:33 bmc_system systemd[1]: pldm-reset-phyp-nvram-cksum.service: Deactivated successfully.
Apr 20 11:59:33 bmc_system systemd[1]: Finished Reset PHYP-NVRAM-CKSUM file.
Apr 20 11:59:33 bmc_system systemd[1]: Starting Create empty PHYP-NVRAM-CKSUM file...
Apr 20 11:59:33 bmc_system dd[9688]: 1+0 records in
Apr 20 11:59:33 bmc_system dd[9688]: 1+0 records out
Apr 20 11:59:33 bmc_system systemd[1]: pldm-create-phyp-nvram-cksum.service: Deactivated successfully.
Apr 20 11:59:33 bmc_system systemd[1]: Finished Create empty PHYP-NVRAM-CKSUM file.
Apr 20 11:59:33 bmc_system systemd[1]: obmc-flash-bios-patch.service: Deactivated successfully.
Apr 20 11:59:33 bmc_system systemd[1]: Finished Create patch directory for Host FW.
Apr 20 11:59:33 bmc_system systemd[1]: pldm-reset-phyp-nvram.service: Deactivated successfully.
Apr 20 11:59:33 bmc_system systemd[1]: Finished Reset PHYP-NVRAM file.
Apr 20 11:59:34 bmc_system systemd[1]: Starting Create empty PHYP-NVRAM file...
Apr 20 11:59:39 bmc_system systemd[1]: obmc-flash-bios-init.service: Deactivated successfully.
Apr 20 11:59:39 bmc_system systemd[1]: Finished Setup Host FW directories.
Apr 20 11:59:39 bmc_system systemd[1]: Starting Set POWER host firmware well-known names...
Apr 20 11:59:39 bmc_system dd[9692]: 145408+0 records in
Apr 20 11:59:39 bmc_system dd[9692]: 145408+0 records out
Apr 20 11:59:39 bmc_system systemd[1]: pldm-create-phyp-nvram.service: Deactivated successfully.
Apr 20 11:59:39 bmc_system systemd[1]: Finished Create empty PHYP-NVRAM file.
Apr 20 11:59:41 bmc_system systemd[1]: openpower-process-host-firmware.service: Deactivated successfully.
Apr 20 11:59:41 bmc_system systemd[1]: Finished Set POWER host firmware well-known names.
Apr 20 11:59:41 bmc_system systemd[1]: Starting Update BIOS attr table with host firmware well-known names...
Apr 20 11:59:41 bmc_system systemd[1]: openpower-update-bios-attr-table.service: Deactivated successfully.
Apr 20 11:59:41 bmc_system systemd[1]: Finished Update BIOS attr table with host firmware well-known names.
Apr 20 11:59:41 bmc_system systemd[1]: Starting OpenPOWER Host HardwareIsolation...
Apr 20 11:59:41 bmc_system systemd[1]: Started OpenPOWER Host HardwareIsolation.
```

Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
Change-Id: I37ae2862d105ff3901e408df15f58d7653e95ad3

show more ...


# 267c413f 25-Feb-2022 Adriana Kobylak <anoo@us.ibm.com>

mmc: reset: Delete all BMC error logs

During a bios factory reset, the partition where hostboot stores their
error logs is cleared. Need to clear the BMC error logs too to avoid
discrepancies.

Test

mmc: reset: Delete all BMC error logs

During a bios factory reset, the partition where hostboot stores their
error logs is cleared. Need to clear the BMC error logs too to avoid
discrepancies.

Tested: Verified the /var/lib/phosphor-logging/extensions/pels/logs/
directory was cleared after a bios factory reset except for the
'archive' subdirectory.

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

show more ...


# 56a46771 25-Feb-2022 Adriana Kobylak <anoo@us.ibm.com>

mmc: reset: Clear the HMC-managed bios attr

Set the pvm_hmc_managed bios attribute to Disabled during a factory
reset to clear the indicator that says the system is HMC managed since a
factory reset

mmc: reset: Clear the HMC-managed bios attr

Set the pvm_hmc_managed bios attribute to Disabled during a factory
reset to clear the indicator that says the system is HMC managed since a
factory reset is expected to remove the HMC information. The reset
function is already deleting the HMC save area directory created by
bmcweb.

Tested: Set the pvm_hmc_managed attribute to Enabled, then verified that
after a bios factory reset it's set to Disabled.

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

show more ...


# bde5d7d4 14-Sep-2021 Isaac Kurth <isaac.kurth@ibm.com>

item_updater_mmc: Add service calls to bios reset

Added calls to pldm-reset-phyp-nvram.service and
pldm-reset-phyp-nvram-cksum.service to item_updater_mmc::reset.
Also added a sectio

item_updater_mmc: Add service calls to bios reset

Added calls to pldm-reset-phyp-nvram.service and
pldm-reset-phyp-nvram-cksum.service to item_updater_mmc::reset.
Also added a section that deletes files created by the bmcweb app.

Tested: Ran the reset method and verified that the new services
ran based on their journalctl output. Verified that the code deleted
bmcweb app files.

Change-Id: Id2e5272048707487ee480f8435da41be56787548
Signed-off-by: Isaac Kurth <isaac.kurth@ibm.com>

show more ...


# 0ddd4fad 14-Jul-2021 Isaac Kurth <blisaac91@gmail.com>

item_updater_mmc: Implement bios factory reset

Implemented the method ItemUpdaterMMC::reset. It clears files in
/media/hostfw/ related to managing console and virtualization
informat

item_updater_mmc: Implement bios factory reset

Implemented the method ItemUpdaterMMC::reset. It clears files in
/media/hostfw/ related to managing console and virtualization
information, then recreates those files using bus calls to service
files. Added checks to obmc-flash-bios so it doesn't cause problems
when its methods are run multiple times. Modified latest services to
allow them to run more than once. Services which depend on the init
service will run after it.

Tested: Created extra files in the directories that the reset method
removes. Called the reset method using busctl. Verified that the
added files were removed and that the removed files that belong were
recreated. Verified that all services called were run.

Signed-off-by: Isaac Kurth <blisaac91@gmail.com>
Change-Id: I1e04e97a7c5c9e3fa8b5ee7af47b7320ff3e91d3

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