History log of /openbmc/phosphor-bmc-code-mgmt/common/ (Results 1 – 25 of 48)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e634411b26-Nov-2025 Henry Wu <Henry_Wu@quantatw.com>

common: add GPIO controller function

The CPLD update process requires toggling a GPIO pin to control the
debug card mux. BIOS and EEPROM updates use the same logic, so refactor
the duplicated code i

common: add GPIO controller function

The CPLD update process requires toggling a GPIO pin to control the
debug card mux. BIOS and EEPROM updates use the same logic, so refactor
the duplicated code into a common GPIO controller function. Update BIOS,
EEPROM, and CPLD code paths to use the new helper.

Tested:
- Verified CPLD update with GPIO mux toggling
- Verified BIOS update with GPIO mux toggling

Verified CPLD update with GPIO mux toggling
```
Dec 18 18:33:35 bmc phosphor-cpld-software-update[1064]: Requesting chip gpiochip0, GPIO line debug-card-mux to 1
Dec 18 18:33:35 bmc phosphor-cpld-software-update[1064]: Updating Lattice CPLD firmware
Dec 18 18:33:45 bmc phosphor-cpld-software-update[1064]: [48K blob data]
Dec 18 18:34:14 bmc phosphor-cpld-software-update[1064]: [48K blob data]
Dec 18 18:34:31 bmc phosphor-cpld-software-update[1064]: Successfully updated CPLD
Dec 18 18:34:31 bmc phosphor-cpld-software-update[1064]: Requesting chip gpiochip0, GPIO line debug-card-mux to 0
```

Verified BIOS update with GPIO mux toggling
```
Dec 18 18:45:53 bmc phosphor-bios-software-update[1063]: Requesting chip gpiochip0, GPIO line FM_MUX1_SEL_R to 1
Dec 18 18:46:24 bmc phosphor-bios-software-update[2158]: [14.8K blob data]
Dec 18 18:46:30 bmc phosphor-bios-software-update[2158]: [47.9K blob data]
Dec 18 18:46:37 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:46:44 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:46:51 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:46:58 bmc phosphor-bios-software-update[2158]: [47.9K blob data]
Dec 18 18:46:58 bmc phosphor-bios-software-update[2158]: [4.5K blob data]
Dec 18 18:47:01 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:47:04 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:47:07 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:47:10 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:47:13 bmc phosphor-bios-software-update[2158]: [48K blob data]
Dec 18 18:47:15 bmc phosphor-bios-software-update[2158]: [20.5K blob data]
Dec 18 18:47:17 bmc phosphor-bios-software-update[1063]: Successfully updated SPI flash
Dec 18 18:47:17 bmc phosphor-bios-software-update[1063]: Requesting chip gpiochip0, GPIO line FM_MUX1_SEL_R to 0
```

Change-Id: I8d3c128951fd833a0cd25e1440236f82d37b776f
Signed-off-by: Henry Wu <Henry_Wu@quantatw.com>

show more ...

e1d2fa8404-Dec-2025 Haiyue Wang <haiyuewa@163.com>

common: i2c: Fix 'close()' may close invalid fd

If 'I2C_SLAVE_FORCE' fails, the "close()" will be called twice by the
"open()" and "~I2C()", and the "close()" doesn't check the 'fd' value
valid or n

common: i2c: Fix 'close()' may close invalid fd

If 'I2C_SLAVE_FORCE' fails, the "close()" will be called twice by the
"open()" and "~I2C()", and the "close()" doesn't check the 'fd' value
valid or not.

And "close()" should not be a valid const member function, chang it to
mark the 'fd' invalid if "::close()" is called.

Change-Id: Ibeb923c4e3ea400c2de630ff7223df56c349a941
Signed-off-by: Haiyue Wang <haiyuewa@163.com>

show more ...


/openbmc/phosphor-bmc-code-mgmt/bmc/activation.cpp
/openbmc/phosphor-bmc-code-mgmt/bmc/gen-bios-tar
/openbmc/phosphor-bmc-code-mgmt/bmc/item_updater.cpp
i2c/i2c.cpp
include/i2c/i2c.hpp
/openbmc/phosphor-bmc-code-mgmt/cpld/cpld_interface.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_base_cpld.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_base_cpld.hpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_cpld_factory.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_cpld_factory.hpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_xo3_cpld.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_xo3_cpld.hpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_xo5_cpld.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/lattice_xo5_cpld.hpp
/openbmc/phosphor-bmc-code-mgmt/cpld/meson.build
/openbmc/phosphor-bmc-code-mgmt/cpld/xyz.openbmc_project.Software.CPLD.service
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/i2cvr_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/isl69269/isl69269.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/isl69269/isl69269.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/meson.build
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mp297x.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mp2x6xx.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mp5998.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mps.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mps.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mpx9xx.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/mpx9xx.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/tda38640a/tda38640a.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/tda38640a/tda38640a.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/vr.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/vr.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/xdpe1x2xx/xdpe1x2xx.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/xdpe1x2xx/xdpe1x2xx.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/xyz.openbmc_project.Software.I2CVR.service
/openbmc/phosphor-bmc-code-mgmt/test/common/device/device.cpp
/openbmc/phosphor-bmc-code-mgmt/test/common/device/meson.build
/openbmc/phosphor-bmc-code-mgmt/test/common/exampledevice/example_device.cpp
/openbmc/phosphor-bmc-code-mgmt/test/common/exampledevice/example_device.hpp
/openbmc/phosphor-bmc-code-mgmt/test/common/meson.build
/openbmc/phosphor-bmc-code-mgmt/test/common/software/meson.build
/openbmc/phosphor-bmc-code-mgmt/test/common/software/software.cpp
/openbmc/phosphor-bmc-code-mgmt/test/common/software/software_association.cpp
/openbmc/phosphor-bmc-code-mgmt/test/common/software/software_update.cpp
/openbmc/phosphor-bmc-code-mgmt/test/common/software/software_version.cpp
/openbmc/phosphor-bmc-code-mgmt/test/create_package/component_image_info_area.cpp
/openbmc/phosphor-bmc-code-mgmt/test/create_package/create_pldm_fw_package.hpp
782d6eed19-Aug-2025 FreddieJheng <Freddie.Jheng@quantatw.com>

i2c-vr: add support for MPS MP5998 VR firmware update over I2C

This commit introduces support for programming MPS MP5998 VR devices
over the I2C bus.
Support for the MP5998Firmware type in entity-ma

i2c-vr: add support for MPS MP5998 VR firmware update over I2C

This commit introduces support for programming MPS MP5998 VR devices
over the I2C bus.
Support for the MP5998Firmware type in entity-manager was added in [1].

[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/83114

Tested on the Santabarbara platform:

1. Display the fw inventory
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"
},
{...}
],
"Members@odata.count": 13,
"Name": "Software Inventory Collection"
}
```

2. Query version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_PDB2_VR_MP5998_8692",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "508F"
}
```

3. Trigger the fw update via redfish.
```
curl -k ${creds} \
-H "Content-Type:multipart/form-data" \
-X POST \
-F UpdateParameters="{"Targets":["/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"],"@Redfish.OperationApplyTime":"OnReset"};type=application/json" \
-F "UpdateFile=@${fwpath};type=application/octet-stream" \
https://${bmc}/redfish/v1/UpdateService/update-multipart
```

4. Task is returned
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 0,
"StartTime": "2025-08-22T08:41:47+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Running",
"TaskStatus": "OK"
}
```

5. Query Task status
```
curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0
```

```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2025-08-22T08:41:48+00:00",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 80 percent complete.",
"MessageArgs": [
"0",
"80"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 100 percent complete.",
"MessageArgs": [
"0",
"100"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has completed.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 100,
"StartTime": "2025-08-22T08:41:47+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Completed",
"TaskStatus": "OK"
}
```

6. Display the fw inventory with newly updated fw.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"
},
{...}
],
"Members@odata.count": 16,
"Name": "Software Inventory Collection"
}
```

7. Query the new fw version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_PDB2_VR_MP5998_5612",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "FCFF"
}
```

8. Do AC cycle to make sure the new fw is applied.
```
busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
```

9. Display the fw inventory after AC cycle.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302"
},
{...}
],
"Members@odata.count": 12,
"Name": "Software Inventory Collection"
}
```

10. Query the fw version after AC cycle.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_PDB2_VR_MP5998_302",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "FCFF"
}
```

Change-Id: Ia973a142ac04e041989a74a87e7f1fd8bd16ae3d
Signed-off-by: Freddie Jheng <Freddie.Jheng@quantatw.com>

show more ...

e2cd675915-Aug-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: Add getBusName function

Add this function as 'protected' to be able to call it from test code.

The alternative would be to reconstruct the bus name in test code based
on the unique suffix,

common: Add getBusName function

Add this function as 'protected' to be able to call it from test code.

The alternative would be to reconstruct the bus name in test code based
on the unique suffix, duplicating the code.

Tested: Inspection only.

Change-Id: Iafed55b5869850f8e1d547e580bdaffd5cfbb6eb
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

3f2f3e6a15-Aug-2025 Kevin Tung <Kevin.Tung@quantatw.com>

i2c-vr: add support for MPS MP297X VR firmware update over I2C

This commit introduces support for programming MPS MP297X VR devices
over the I2C bus. It enables firmware updates for VR models such a

i2c-vr: add support for MPS MP297X VR firmware update over I2C

This commit introduces support for programming MPS MP297X VR devices
over the I2C bus. It enables firmware updates for VR models such as
MP2971 and MP2973.
Support for the MP297XFirmware type in EM was added in [1].

[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82949

Tested on the Santabarbara platform:

1. Display the fw inventory
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614"
},
{...}
],
"Members@odata.count": 15,
"Name": "Software Inventory Collection"
}
```

2. Query version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_PEX0_8614",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "30EA058B"
}
```

3. Trigger the fw update via redfish.
```
curl -k ${creds} \
-H "Content-Type:multipart/form-data" \
-X POST \
-F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" \
-F "UpdateFile=@${fwpath};type=application/octet-stream" \
https://${bmc}/redfish/v1/UpdateService/update-multipart
```

4. Task is returned
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_3.Task",
"HidePayload": false,
"Id": "1",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has started.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 1",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 0,
"StartTime": "2025-08-20T01:51:20+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1",
"TaskState": "Running",
"TaskStatus": "OK"
}
```

5. Query Task status
```
curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/1
```

```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2025-08-20T01:51:24+00:00",
"HidePayload": false,
"Id": "1",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has started.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has changed to progress 50 percent complete.",
"MessageArgs": [
"1",
"50"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has changed to progress 80 percent complete.",
"MessageArgs": [
"1",
"80"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has changed to progress 100 percent complete.",
"MessageArgs": [
"1",
"100"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has completed.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 1",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 100,
"StartTime": "2025-08-20T01:51:20+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1",
"TaskState": "Completed",
"TaskStatus": "OK"
}
```

6. Display the fw inventory with newly updated fw.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614"
},
{...}
],
"Members@odata.count": 16,
"Name": "Software Inventory Collection"
}
```

7. Query the new fw version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_PEX0_272",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "E68829FD"
}
```

8. Do AC cycle to make sure the new fw is applied.
```
busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
```

9. Display the fw inventory after AC cycle.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790"
},
{...}
],
"Members@odata.count": 15,
"Name": "Software Inventory Collection"
}
```

10. Query the fw version after AC cycle.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_PEX0_3790",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "E68829FD"
}
```

Change-Id: I0162bf6335ec673dd8c2a1cfb358c4c2a010570e
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>

show more ...

dcf4b60704-Jul-2025 Kevin Tung <Kevin.Tung@quantatw.com>

i2c-vr: add support for MPS MP2X6XX VR firmware update over I2C

This commit introduces support for programming MPS MP2X6XX VR devices
over the I2C bus. It enables firmware updates for VR models such

i2c-vr: add support for MPS MP2X6XX VR firmware update over I2C

This commit introduces support for programming MPS MP2X6XX VR devices
over the I2C bus. It enables firmware updates for VR models such as
MP2869(A), MP29612(A), and MP29608(A).
Support for the MP2X6XXFirmware type in EM was added in [1].

[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82575

Tested on the Santabarbara platform:

1. Display the fw inventory
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228"
},
{...}
],
"Members@odata.count": 13,
"Name": "Software Inventory Collection"
}
```

2. Query version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_CPU1_4228",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "1F88"
}
```

3. Trigger the fw update via redfish.
```
curl -k ${creds} \
-H "Content-Type:multipart/form-data" \
-X POST \
-F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" \
-F "UpdateFile=@${fwpath};type=application/octet-stream" \
https://${bmc}/redfish/v1/UpdateService/update-multipart
```

4. Task is returned
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 0,
"StartTime": "2025-07-29T08:51:41+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Running",
"TaskStatus": "OK"
}
```

5. Query Task status
```
curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0
```

```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2025-07-29T08:51:46+00:00",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 20 percent complete.",
"MessageArgs": [
"0",
"20"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 50 percent complete.",
"MessageArgs": [
"0",
"50"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 80 percent complete.",
"MessageArgs": [
"0",
"80"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 100 percent complete.",
"MessageArgs": [
"0",
"100"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has completed.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 100,
"StartTime": "2025-07-29T08:51:41+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Completed",
"TaskStatus": "OK"
}
```

6. Display the fw inventory with newly updated fw.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453"
},
{...}
],
"Members@odata.count": 14,
"Name": "Software Inventory Collection"
}
```

7. Query the new fw version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_CPU1_5453",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "42C3"
}
```

8. Do AC cycle to make sure the new fw is applied.
```
busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
```

9. Display the fw inventory after AC cycle.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249"
},
{...}
],
"Members@odata.count": 13,
"Name": "Software Inventory Collection"
}
```

10. Query the fw version after AC cycle.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Santabarbara_MB_VR_CPU1_2249",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "42C3"
}
```

Change-Id: Ifa6fdd79f5d087adb6037e0043897fa6199ae097
Signed-off-by: Kevin Tung <Kevin.Tung@quantatw.com>

show more ...

0d1c20b021-Sep-2025 Kevin Tung <kevin.tung@quantatw.com>

common: host power utility: add host-state-transition-timeout option

Introduce a configurable host-state-transition-timeout to control
how long the utility waits for a host state change. The previou

common: host power utility: add host-state-transition-timeout option

Introduce a configurable host-state-transition-timeout to control
how long the utility waits for a host state change. The previous 12s
timeout was insufficient for a graceful power off, leading to false
timeout errors.

This option is used by the bios-software-update service to control
the host state transition timeout when turning the host off and on
before and after a BIOS update.

Change-Id: I9209d8f06f55eaf181235198c20c32c93861f841
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>

show more ...

c538727d28-Jul-2025 Kevin Tung <kevin.tung@quantatw.com>

TPM code updater

This commit introduces a TPM code updater that currently supports
reading the firmware version for both Infineon and Nuvoton TPM 2.0.
Support for firmware updates will be introduced

TPM code updater

This commit introduces a TPM code updater that currently supports
reading the firmware version for both Infineon and Nuvoton TPM 2.0.
Support for firmware updates will be introduced in a future patch.

The updater's configuration are managed by the EM [1].
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82416

Tested on Yosemite5 with the following steps:

1. Display the fw inventory:
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Members": [
{...},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945"
},
{...}
],
"Members@odata.count": 4,
"Name": "Software Inventory Collection"
}
```

2. Query TPM version:
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Yosemite5_TPM_4945",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": false,
"Version": "15.23"
}
```

Change-Id: I42568242356d55fe005ba1f41ddf8aaf9f682fc8
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>

show more ...


/openbmc/phosphor-bmc-code-mgmt/bios/bios_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/bios/spi_device.cpp
/openbmc/phosphor-bmc-code-mgmt/bmc/item_updater.cpp
include/utils.hpp
src/utils.cpp
/openbmc/phosphor-bmc-code-mgmt/cpld/cpld_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/eeprom-device/eeprom_device.cpp
/openbmc/phosphor-bmc-code-mgmt/eeprom-device/eeprom_device_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/i2cvr_device.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/i2cvr_device.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/i2cvr_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/isl69269/isl69269.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/isl69269/isl69269.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/vr.hpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/xdpe1x2xx/xdpe1x2xx.cpp
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/xdpe1x2xx/xdpe1x2xx.hpp
/openbmc/phosphor-bmc-code-mgmt/meson.build
/openbmc/phosphor-bmc-code-mgmt/meson.options
/openbmc/phosphor-bmc-code-mgmt/test/common/exampledevice/example_device.cpp
/openbmc/phosphor-bmc-code-mgmt/tpm/README.md
/openbmc/phosphor-bmc-code-mgmt/tpm/meson.build
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm2/tpm2.cpp
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm2/tpm2.hpp
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm_device.cpp
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm_device.hpp
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm_software_manager.cpp
/openbmc/phosphor-bmc-code-mgmt/tpm/tpm_software_manager.hpp
/openbmc/phosphor-bmc-code-mgmt/tpm/xyz.openbmc_project.Software.TPM.service
953fdc5c13-Aug-2025 Kevin Tung <kevin.tung@quantatw.com>

common: trim null bytes from filename in readNotifyAsync()

readNotifyAsync() uses inotify_event to monitor filesystem changes.
The name field in inotify_event contains a null-terminated name, and
ma

common: trim null bytes from filename in readNotifyAsync()

readNotifyAsync() uses inotify_event to monitor filesystem changes.
The name field in inotify_event contains a null-terminated name, and
may include additional null bytes to pad the structure for alignment as
mentioned in [1] inotify(7).

If the padded name (including extra null bytes) is passed directly to
processUpdate(), the comparison against the expected filename will
fail, even when the visible parts of the names match.

This change ensures the filename is trimmed at the first null byte
before being passed to processUpdate(), preventing false mismatches
and ensuring correct processing.

Tested on Yosemite5, and confirmed that the BIOS version is retrieved
correctly when host0_bios_version.txt is created.

[1] https://www.man7.org/linux/man-pages/man7/inotify.7.html

Change-Id: Ic0ccd7f4e163eb650baa65045c9af1e7be01964b
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>

show more ...

f9cfdca908-Aug-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: update: fix error handling

An empty string is not a valid object path [1].

Handle the error by throwing a generated exception as per the
example [3]. This should result in bmcweb receiving

common: update: fix error handling

An empty string is not a valid object path [1].

Handle the error by throwing a generated exception as per the
example [3]. This should result in bmcweb receiving the error.

The exception is generated from [2] and caught in a wrapper function to
set the error.

Tested: on Tyan S8030

First, apply patch to disallow the `OnReset` apply time.

Then trigger the update with a tiny pldm package.

```
curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_4102"],"@Redfish.OperationApplyTime":"OnReset"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-fake.bin;type=application/octet-stream' ${bmc}/redfish/v1/UpdateService/update-multipart
```

Instead of a task we now get
```
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request failed due to an internal service error. The service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.19.InternalError",
"MessageSeverity": "Critical",
"Resolution": "Resubmit the request. If the problem persists, consider resetting the service."
}
],
"code": "Base.1.19.InternalError",
"message": "The request failed due to an internal service error. The service is still operational."
}
}
```

The updater log is

```
Aug 11 14:16:43 s8030-bmc-30303035c0c1 phosphor-bios-software-update[1101]: the selected apply time xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset is not allowed by the device
Aug 11 14:16:43 s8030-bmc-30303035c0c1 phosphor-bios-software-update[1101]: The system component has a software version which is incompatible with the new image or the image is not meant for the system component.
```

The bmcweb log is

```
Aug 11 14:16:43 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:876] Found 2 software version paths
Aug 11 14:16:43 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:894] Found software version path /xyz/openbmc_project/software/HostSPIFlash_4102 serviceName xyz.openbmc_project.Software.BIOS
Aug 11 14:16:43 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:831] error_code = Input/output error [generic:5]
Aug 11 14:16:43 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:832] error msg = Input/output error
Aug 11 14:16:43 s8030-bmc-30303035c0c1 bmcwebd[431]: [error_messages.cpp:1250] Internal Error ../git/redfish-core/lib/update_service.hpp(833:32) `void redfish::handleStartUpdate(const std::shared_ptr<bmcweb::AsyncResp>&, task::Payload, const std::string&, const boost::system::error_code&, const sdbusplus::message::object_path&)`:
```

Now testing the second case, started an immediate update with a real fw
image which will be running for some time.

```
curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_4102"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-v4.03.bin;type=application/octet-stream' ${bmc}/redfish/v1/UpdateService/update-multipart
```

get following task

```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_3.Task",
"HidePayload": false,
"Id": "1",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has started.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 1",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"TargetUri": "/redfish/v1/UpdateService/update-multipart"
},
"PercentComplete": 0,
"StartTime": "2025-08-11T14:27:25+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1",
"TaskState": "Running",
"TaskStatus": "OK"
}
```

and bmcweb logs
```
Aug 11 14:31:24 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:876] Found 2 software version paths
Aug 11 14:31:24 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:894] Found software version path /xyz/openbmc_project/software/HostSPIFlash_4102 serviceName xyz.openbmc_project.Software.BIOS
Aug 11 14:31:24 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:838] Call to StartUpdate on /xyz/openbmc_project/software/HostSPIFlash_4102 Success, retPath = /xyz/openbmc_project/software/HostSPIFlash_2903
```

Now quickly start a second update to get following logs

Redfish response:
```
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request failed due to an internal service error. The service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.19.InternalError",
"MessageSeverity": "Critical",
"Resolution": "Resubmit the request. If the problem persists, consider resetting the service."
}
],
"code": "Base.1.19.InternalError",
"message": "The request failed due to an internal service error. The service is still operational."
}
}
```

Updater:
```
Aug 11 14:31:24 s8030-bmc-30303035c0c1 phosphor-bios-software-update[1101]: An update is already in progress, cannot update.
Aug 11 14:31:24 s8030-bmc-30303035c0c1 phosphor-bios-software-update[1101]: The service is temporarily unavailable.
```

bmcweb logs:
```
Aug 11 14:31:25 s8030-bmc-30303035c0c1 bmcwebd[431]: [error_messages.cpp:1250] Internal Error ../git/redfish-core/lib/update_service.hpp(833:32) `void redfish::handleStartUpdate(const std::shared_ptr<bmcweb::Asyn
cResp>&, task::Payload, const std::string&, const boost::system::error_code&, const sdbusplus::message::object_path&)`:
Aug 11 14:31:25 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:832] error msg = Input/output error
Aug 11 14:31:25 s8030-bmc-30303035c0c1 bmcwebd[431]: [update_service.hpp:831] error_code = Input/output error [generic:5]
```

So in both error cases both daemons stay running, but the error
reporting to the user can be improved in bmcweb to let them know the
failure reason.

References:

[1] https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
[2] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Software/Update.interface.yaml
[3] https://github.com/openbmc/sdbusplus/blob/7413ccc1740397239eee9ba79973c285bf6b3e5d/example/calculator-aserver.cpp#L28

Change-Id: I292687652dbeefb15a150757289aebe8fd763482
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

dbb7015e07-Aug-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: make Software::objectPath const

Software::objectPath is initialized in the constructor and should not be
modified later on.

Can also be protected instead of public.

Tested: Inspection only

common: make Software::objectPath const

Software::objectPath is initialized in the constructor and should not be
modified later on.

Can also be protected instead of public.

Tested: Inspection only.

Change-Id: I9404fc46b6d039d7a7e96ebb232e34ee0aa978e8
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

53c7c0e529-Jul-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: split inventory association function

Create Software::createInventoryAssociation to split the
object mapper call from actually creating the association.

This makes unit testing the function

common: split inventory association function

Create Software::createInventoryAssociation to split the
object mapper call from actually creating the association.

This makes unit testing the functions easier and provides a clean
separation between the logic provided by common code versus the external
information we are fetching.

Tested: Inspection only.

Change-Id: I0147480219b9c9fbc709699b9e50411fb11bea6e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

b0cfda6f18-Jul-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: fix Software::getPurpose error path

'version' cannot be dereferenced if it is not initialized.

Change the API to return an std::optional and handle in the caller.

Change-Id: Iac7badf145dad

common: fix Software::getPurpose error path

'version' cannot be dereferenced if it is not initialized.

Change the API to return an std::optional and handle in the caller.

Change-Id: Iac7badf145dad64e21ede5e81f0b4b761ff6c89d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

0fdb612409-Jul-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: fix: add emit_added calls

Add these calls to make bmcweb and mapper aware of our DBus interfaces.

Adding emit_added() should be safe to do since the interface already
exists and the functio

common: fix: add emit_added calls

Add these calls to make bmcweb and mapper aware of our DBus interfaces.

Adding emit_added() should be safe to do since the interface already
exists and the function is idempotent.

Also set the activation status of the current software version to
'Active' after 'initDevice' returns.

Tested: on Tyan S8030

Restarting BIOS sw manager without this patch yields

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_7868",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_7868",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "Unknown"
}
```

which is wrong since there is currently a sw version enabled.

First testing update process without this patch

```
curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_7868"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-v4.01.bin;type=application/octet-stream' https://${bmc}/redfish/v1/UpdateService/update-multipart
```

yields

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_5637",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_5637",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "mycompversion"
}
```

BIOS update process completes and bmcweb shows fw inventory as expected

Starting the update process (with this patch):
```
curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_8460"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-v4.01.bin;type=application/octet-stream' https://${bmc}/redfish/v1/UpdateService/update-multipart
```

Task returned from starting update process
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/2",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "2",
"TaskState": "Running",
"TaskStatus": "OK"
}
```

After update:
```
curl --insecure --user root:root https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_918
```

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_918",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_918",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "mycompversion"
}
```

So we concluded that the fw inventory is correct even without the patch
but on initial start of the BIOS sw manager the fw inventory is not
correct.

After restarting the BIOS sw manager with this patch:

```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2291",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_2291",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "Unknown"
}
```

Change-Id: I3aee245311b30e1ceba50d16598f940bb87626b0
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

d73d564223-Jul-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: create initial associations

Associations to the inventory item were created during the update
process but not for the initial software version.

```
common/src/device.cpp
206: co_awai

common: create initial associations

Associations to the inventory item were created during the update
process but not for the initial software version.

```
common/src/device.cpp
206: co_await softwarePending->createInventoryAssociations(true);
212: co_await softwarePending->createInventoryAssociations(false);
```

Fix this in the common code.

Also reorder the calls there so the interfaces added signal gets emitted
with the correct property value.

Tested: on Tyan S8030. Association appears as expected.
Re-Tested for Patchset 3, same result.

```
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: [Software] enabling update of /xyz/openbmc_project/software/HostSPIFlash_3216 (adding the update interface)
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: set version Unknown
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: setting association definitions
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: inventory item at path /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: found associated inventory item for HostSPIFlash: /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: creating 'running' association to /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: Done with initial configuration
```

```
busctl get-property xyz.openbmc_project.Software.BIOS /xyz/openbmc_project/software/HostSPIFlash_3216 xyz.openbmc_project.Association.Definitions Associations
a(sss) 1 "running" "ran_on" "/xyz/openbmc_project/inventory/system/board/chassis"
```

The signal is emitted correctly for object mapper as well
```
object path "/xyz/openbmc_project/software/HostSPIFlash_3216"
array [
dict entry(
string "xyz.openbmc_project.Association.Definitions"
array [
dict entry(
string "Associations"
variant array [
struct {
string "running"
string "ran_on"
string "/xyz/openbmc_project/inventory/system/board/chassis"
}
]
)
]
)
]
```

Change-Id: Ie3d76d3bdf445a53c578c3a827b90950fa4bda0a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

7f26589808-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

meson: fix missing i2c header

Subproject builds result in the following compile error:
```
In file included from ../common/i2c/i2c.cpp:1:
../common/include/i2c/i2c.hpp:7:10: fatal error: sdbusplus/a

meson: fix missing i2c header

Subproject builds result in the following compile error:
```
In file included from ../common/i2c/i2c.cpp:1:
../common/include/i2c/i2c.hpp:7:10: fatal error: sdbusplus/async.hpp: No such file or directory
7 | #include <sdbusplus/async.hpp>
| ^~~~~~~~~~~~~~~~~~~~~
```

Add the missing dependency in the common/i2c subdirectory.

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

show more ...

a2eb951f05-May-2025 Kevin Tung <Kevin.Tung@quantatw.com>

common: move asyncSystem() to common

asyncSystem() is shared across updaters, so moved to common.

Change-Id: I3545d34ecc1f1bf8a226d020267ae00bcf42c5f9
Signed-off-by: Kevin Tung <Kevin.Tung@quantatw

common: move asyncSystem() to common

asyncSystem() is shared across updaters, so moved to common.

Change-Id: I3545d34ecc1f1bf8a226d020267ae00bcf42c5f9
Signed-off-by: Kevin Tung <Kevin.Tung@quantatw.com>

show more ...

7dfe072524-Jun-2025 Alexander Hansen <alexander.hansen@9elements.com>

pldm package parser: fix caller

While porting [1] in [2] i had missed to also adapt the caller for the
PackageParser to the new API.

Adapting the caller to pass the full package as done in [1].

Te

pldm package parser: fix caller

While porting [1] in [2] i had missed to also adapt the caller for the
PackageParser to the new API.

Adapting the caller to pass the full package as done in [1].

Tested: Unit Tests [3] for common code are passing again

```
ninja: Entering directory `build'
[17/18] Running all tests
1/11 test_device_specific_update_function OK 0.06s
2/11 test_device_start_update_async_immediate_success OK 0.05s
3/11 test_device_start_update_async_onreset_success OK 0.05s
4/11 test_software OK 0.04s
5/11 test_software_association OK 0.03s
6/11 test_software_version OK 0.02s
7/11 test_software_get_random_softwareid OK 0.02s
8/11 test_software_config OK 0.02s
9/11 test_device_start_update_async_invalid_fd OK 0.04s
10/11 test_software_update OK 2.02s
11/11 utest OK 6.12s

Ok: 11
Fail: 0
```

References:
[1] https://gerrit.openbmc.org/c/openbmc/pldm/+/81162
[2] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/81195
[3] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/77236

Change-Id: Ic080483510ed921ca64695a7599fbbd3f27185cb
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

37a3014312-Jun-2025 Daniel Hsu <Daniel-Hsu@quantatw.com>

common: i2c: Add non-coroutine sendReceive()

This commit introduces a non-coroutine version of `sendReceive()` in the
common I2C module. The new implementation avoids potential stack buffer
issues b

common: i2c: Add non-coroutine sendReceive()

This commit introduces a non-coroutine version of `sendReceive()` in the
common I2C module. The new implementation avoids potential stack buffer
issues by ensuring synchronous execution.

Change-Id: I1d308f24fafa6e0d68ffcc67073e0a2e67a6b419
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>

show more ...

df62819618-Jun-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: use aserver property constructor

Since PDI gen code now [1] supports constructing DBus interfaces with
property values, simplify the common code to use that API.

Tested: Unit Tests Pass

Re

common: use aserver property constructor

Since PDI gen code now [1] supports constructing DBus interfaces with
property values, simplify the common code to use that API.

Tested: Unit Tests Pass

References:
[1] https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/78790

Change-Id: Ic29531b391f8609377105dbcbac2e8a55b29746c
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

a92e727b03-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

clang-tidy: remove NOLINT for PackageParser

The code for PackageParser was taken from 'pldm' repo, and had to have a
few NOLINT applied for clang-tidy to pass.

Removing those NOLINTs upon request,

clang-tidy: remove NOLINT for PackageParser

The code for PackageParser was taken from 'pldm' repo, and had to have a
few NOLINT applied for clang-tidy to pass.

Removing those NOLINTs upon request, with minimal code changes.

Change-Id: Iec1937738c7667b0bfbf75b1cb9aa14e93daadb1
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

692d67ef17-Jun-2025 Alexander Hansen <alexander.hansen@9elements.com>

pldm: Fix parser error for libpldm API changes

Fix adapted from [1] in pldm repo, which was already merged.

Tested: [1]

References:
[1] https://gerrit.openbmc.org/c/openbmc/pldm/+/81162

Change-Id

pldm: Fix parser error for libpldm API changes

Fix adapted from [1] in pldm repo, which was already merged.

Tested: [1]

References:
[1] https://gerrit.openbmc.org/c/openbmc/pldm/+/81162

Change-Id: Idf034a98c671d53cf2e867fb5a9ada9f75568e67
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

bd5081f004-Jun-2025 Alexander Hansen <alexander.hansen@9elements.com>

clang-tidy: remove some NOLINTS

Since readability-static-accessed-through-instance check has been
disabled in [1], the NOLINTs can be removed.

References:

[1] https://gerrit.openbmc.org/c/openbmc/

clang-tidy: remove some NOLINTS

Since readability-static-accessed-through-instance check has been
disabled in [1], the NOLINTs can be removed.

References:

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/80392

Change-Id: If7e80a0bc447bfbd054b6c007d230c2d14a54f41
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

a2f860be12-Jun-2025 Patrick Williams <patrick@stwcx.xyz>

markdownlint: minor fixes

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

886e14e709-Jun-2025 Daniel Hsu <Daniel-Hsu@quantatw.com>

fw update: common: Update software_config regex patterns

Update regex patterns in software_config.cpp to match
the latest hardware compatible scheme.

Test on Harma:
EM settings:
``` json
{
"Add

fw update: common: Update software_config regex patterns

Update regex patterns in software_config.cpp to match
the latest hardware compatible scheme.

Test on Harma:
EM settings:
``` json
{
"Address": "0x61",
"Bus": 28,
"FirmwareInfo": {
"CompatibleHardware":
"com.meta.Hardware.Harma.VR.ISL69269_vcore0",
"VendorIANA": 40981
},
"Name": "Harma_MB_vr_cpu0_vcore0",
"Type": "ISL69269Firmware"
},
{
"Address": "0x62",
"Bus": 28,
"FirmwareInfo": {
"CompatibleHardware":
"com.meta.Hardware.Harma.VR.ISL69269_vcore1",
"VendorIANA": 40981
},
"Name": "Harma_MB_vr_cpu0_vcore1",
"Type": "ISL69269Firmware"
},
{
"Address": "0x63",
"Bus": 28,
"FirmwareInfo": {
"CompatibleHardware":
"com.meta.Hardware.Harma.VR.ISL69269_pvdd11",
"VendorIANA": 40981
},
"Name": "Harma_MB_vr_cpu0_pvdd11",
"Type": "ISL69269Firmware"
}
```
Harma updater log
``` bash
root@bmc:~#
/usr/libexec/phosphor-code-mgmt/phosphor-i2cvr-software-update
<7> requesting dbus name xyz.openbmc_project.Software.I2CVR
<7> Initialized SoftwareManager
<7> [config] looking for dbus interface ...XDPE1X2XXFirmware
<7> [config] looking for dbus interface ...ISL69269Firmware
<7> Found configuration interface at xyz.openbmc_project.EntityManager,
/.../board/Harma_MB/Harma_MB_vr_cpu0_pvdd11
<7> [config] Voltage regulator device type:
ISL69269Firmware on Bus: 28 at Address: 99
<7> Harma_MB_vr_cpu0_pvdd11_3351: created dbus interfaces on path
/xyz/openbmc_project/software/Harma_MB_vr_cpu0_pvdd11_3351
<7> Harma_MB_vr_cpu0_pvdd11_3351: set version 4294049940
<7> [Software] enabling update of
/.../Harma_MB_vr_cpu0_pvdd11_3351 (adding the update interface)
<7> Found configuration interface at xyz.openbmc_project.EntityManager,
/.../board/Harma_MB/Harma_MB_vr_cpu0_vcore0
<7> [config] Voltage regulator device type:
ISL69269Firmware on Bus: 28 at Address: 97
<7> Harma_MB_vr_cpu0_vcore0_916: created dbus interfaces on path
/xyz/openbmc_project/software/Harma_MB_vr_cpu0_vcore0_916
<7> Harma_MB_vr_cpu0_vcore0_916: set version 4283812141
<7> [Software] enabling update of
/.../Harma_MB_vr_cpu0_vcore0_916 (adding the update interface)
<7> Found configuration interface at xyz.openbmc_project.EntityManager,
/.../board/Harma_MB/Harma_MB_vr_cpu0_vcore1
<7> [config] Voltage regulator device type:
ISL69269Firmware on Bus: 28 at Address: 98
<7> Harma_MB_vr_cpu0_vcore1_3742: created dbus interfaces on path
/xyz/openbmc_project/software/Harma_MB_vr_cpu0_vcore1_3742
<7> Harma_MB_vr_cpu0_vcore1_3742: set version 4292870292
<7> [Software] enabling update of
/.../Harma_MB_vr_cpu0_vcore1_3742 (adding the update interface)
<7> Done with initial configuration
```

Change-Id: I2d3155733d6c65e76f4ea6dd9814e6b51b83c228
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>

show more ...

12