Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yosemite4: Support update single blade PLDM Firmware Device
Summary: # Description - Support update single blade PLDM firmware device. - This commit support updating BICs and CXLs. - Support update single blade SD/FF/WF BIC. - Support update single CXL on specific blade. # Motivation - User unable to update single blade BIC FW by BMC, BMC will update for all available blades together. X-link: facebookexternal/openbmc.wiwynn#2998 Test Plan: - User can update single blade SD/FF/WF BIC. - User can update single CXL on specific blade. - Test Log [Update single blade SD BIC] [Recovery] root@bmc:~# bic-update.sh sd --rcvy 5 /tmp/uart_Y4BSD.bin /tmp/pldm_sd_bic_image_with_slot Start to Recovery slot 5 sd BIC UART is ttyS5 i2c bus is 4 Setting BIC boot from UART Doing the recovery update... Recovery BIC is finished. Restart MCTP/PLDM daemon `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3207297738 Waiting for updating... 14 sec Update done. slot5: Do 12V cycle Done [BIC console] [00:00:36.312,000] <inf> pldm: package loaded: 88% [00:00:36.459,000] <inf> pldm: package loaded: 89% [00:00:36.610,000] <inf> pldm: package loaded: 90% [00:00:36.743,000] <inf> pldm: package loaded: 91% [00:00:36.873,000] <inf> pldm: package loaded: 92% [00:00:37.005,000] <inf> pldm: package loaded: 93% [00:00:37.146,000] <inf> pldm: package loaded: 94% [00:00:37.304,000] <inf> pldm: package loaded: 95% [00:00:37.453,000] <inf> pldm: package loaded: 96% [00:00:37.602,000] <inf> pldm: package loaded: 97% [00:00:37.738,000] <inf> pldm: package loaded: 98% [00:00:37.896,000] <inf> pldm: package loaded: 99% [00:00:38.032,000] <inf> pldm: package loaded: 100% [00:00:38.064,000] <inf> util_spi: Update success [00:00:38.074,000] <inf> pldm: Component 0 update success! [00:00:38.074,000] <inf> pldm: Transfer complete [00:00:38.076,000] <inf> pldm: Verify complete [00:00:38.078,000] <inf> pldm: Apply complete [00:00:38.082,000] <inf> pldm: Activate firmware [Update Single blade SD BIC] root@bmc:~/chris# ./bic-update.sh sd 5 ./pldm_sd_bic_image_with_slot `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3207297738 Waiting for updating... 14 sec Update done. Done (BIC console was checked to make sure only slot 5 is updated) [Update all SD BICs] root@bmc:~/chris# bic-update.sh sd pldm_sd_bic_image_main WARNING! This will automatically update all BICs. Continue? [y/N] y `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3207297738 Waiting for updating... 17 sec Update done. Done (BIC console was checked to make sure all slots are updated) [Check Desciptors] root@bmc:~# pldmtool fw_update QueryDeviceIdentifiers -m 50 -v pldmtool: Tx: 80 05 01 pldmtool: Rx: 00 05 01 00 1c 00 00 00 03 01 00 04 00 00 00 a0 15 00 01 02 00 00 00 07 01 0a 00 35 00 00 00 00 00 00 00 00 00 Unknown descriptor type, type=263 { "EID": 50, "Descriptors": [ { "Type": "IANA Enterprise ID", "Value": [ "0000a015" ] }, { "Type": "PCI Device ID", "Value": [ "0000" ] } ] } [WF BIC] [Recovery] root@bmc:~# bic-update.sh wf --rcvy 5 ~/chris/uart_Y4BWF_with_slot.bin ~/chris/pldm_wf_bic_image_with_slot Start to Recovery slot 5 wf BIC Check Power : On UART is ttyS5 i2c bus is 4 Setting BIC boot from UART Doing the recovery update... Recovery BIC is finished. pldmtool: Tx: 80 02 39 01 01 01 01 01 pldmtool: Rx: 00 02 39 00 Restart MCTP/PLDM daemon `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 |- /xyz/openbmc_project/mctp/1/53 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3648103133 Waiting for updating... 20 sec Update done. slot5: Do 12V cycle Done [DC on to make sure WF BIC is online] root@bmc:~# busctl set-property xyz.openbmc_project.State.Host${slot} /xyz/openbmc_project/state/host${slot} xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.On" root@bmc:~# systemctl restart mctpd root@bmc:~# busctl tree xyz.openbmc_project.MCTP `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 `- /xyz/openbmc_project/mctp/1/8 [Update single blade of WF BIC] root@bmc:~# bic-update.sh wf 5 ~/chris/pldm_wf_bic_image_with_slot `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3648103133 Waiting for updating... 16 sec Update done. Done root@bmc:~# pldmtool fw_update QueryDeviceIdentifiers -m 52 -v pldmtool: Tx: 80 05 01 pldmtool: Rx: 00 05 01 00 1c 00 00 00 03 01 00 04 00 00 00 a0 15 00 01 02 00 00 02 07 01 0a 00 35 00 00 00 00 00 00 00 00 00 Unknown descriptor type, type=263 { "EID": 52, "Descriptors": [ { "Type": "IANA Enterprise ID", "Value": [ "0000a015" ] }, { "Type": "PCI Device ID", "Value": [ "0002" ] } ] } [FF BIC] [Recovery] root@bmc:~# bic-update.sh ff --rcvy 5 ~/chris/uart_Y4BFF_with_slot.bin ~/chris/pldm_ff_bic_image_with_slot Start to Recovery slot 5 ff BIC Check Power : On UART is ttyS5 i2c bus is 4 Setting BIC boot from UART Doing the recovery update... Recovery BIC is finished. pldmtool: Tx: 80 02 39 01 01 01 01 01 pldmtool: Rx: 00 02 39 00 Restart MCTP/PLDM daemon `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 |- /xyz/openbmc_project/mctp/1/54 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3463480235 Waiting for updating... 115 sec Update done. slot5: Do 12V cycle Done [DC on to make sure FF BIC is online] root@bmc:~# busctl set-property xyz.openbmc_project.State.Host${slot} /xyz/openbmc_project/state/host${slot} xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.On" root@bmc:~# systemctl restart mctpd root@bmc:~# busctl tree xyz.openbmc_project.MCTP `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 `- /xyz/openbmc_project/mctp/1/8 [Update single blade of FF BIC] root@bmc:~# bic-update.sh ff 5 ~/chris/pldm_ff_bic_image_with_slot `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp `- /xyz/openbmc_project/mctp/1 |- /xyz/openbmc_project/mctp/1/50 |- /xyz/openbmc_project/mctp/1/51 |- /xyz/openbmc_project/mctp/1/52 |- /xyz/openbmc_project/mctp/1/54 |- /xyz/openbmc_project/mctp/1/55 `- /xyz/openbmc_project/mctp/1/8 Start to Update BIC software_id = 3463480235 Waiting for updating... 16 sec Update done. Done root@bmc:~# pldmtool fw_update QueryDeviceIdentifiers -m 51 -v pldmtool: Tx: 80 05 01 pldmtool: Rx: 00 05 01 00 1c 00 00 00 03 01 00 04 00 00 00 a0 15 00 01 02 00 00 01 07 01 0a 00 35 00 00 00 00 00 00 00 00 00 Unknown descriptor type, type=263 { "EID": 51, "Descriptors": [ { "Type": "IANA Enterprise ID", "Value": [ "0000a015" ] }, { "Type": "PCI Device ID", "Value": [ "0001" ] } ] } [Update CXL2] [Check original version] root@bmc:~# cxl-fw-update version -m 55 Get Firmware Info for EID: 55 FW Slots Supported: 2 Active FW Slot: 1 Staged FW Slot: 2 FW Activation Capabilities: 1 Slot 1 FW Revision: 2.0.5-b5d9fe65c Slot 2 FW Revision: Slot 3 FW Revision: Slot 4 FW Revision: [Update] root@bmc:~# cxl-fw-update.sh 5 2 pldm_wf_cxl_2.0.7 software_id = 3648103133 Waiting for updating... 393 sec Update done. Update done. Please conduct DC cycle to load the new firmware. [Reboot Host] root@bmc:~# busctl set-property xyz.openbmc_project.State.Host5 /xyz/openbmc_project/state/host5 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Reboot" [Check the version again] root@bmc:~# cxl-fw-update version -m 55 Get Firmware Info for EID: 55 FW Slots Supported: 2 Active FW Slot: 1 Staged FW Slot: 2 FW Activation Capabilities: 1 Slot 1 FW Revision: 2.0.7-465f8f505 Slot 2 FW Revision: Slot 3 FW Revision: Slot 4 FW Revision: [Update CXL1] [Check original version] root@bmc:~# cxl-fw-update version -m 54 Get Firmware Info for EID: 54 FW Slots Supported: 2 Active FW Slot: 1 Staged FW Slot: 2 FW Activation Capabilities: 1 Slot 1 FW Revision: 2.0.5-b5d9fe65c Slot 2 FW Revision: Slot 3 FW Revision: Slot 4 FW Revision: [Update] root@bmc:~# cxl-fw-update.sh 5 1 pldm_wf_cxl_2.0.7 software_id = 3648103133 Waiting for updating... 389 sec Update done. Update done. Please conduct DC cycle to load the new firmware. [Reboot Host] root@bmc:~# busctl set-property xyz.openbmc_project.State.Host5 /xyz/openbmc_project/state/host5 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Reboot" [Check the version again] root@bmc:~# cxl-fw-update version -m 54 Get Firmware Info for EID: 54 FW Slots Supported: 2 Active FW Slot: 1 Staged FW Slot: 2 FW Activation Capabilities: 1 Slot 1 FW Revision: 2.0.7-465f8f505 Slot 2 FW Revision: Slot 3 FW Revision: Slot 4 FW Revision: # Description Please include a summary of the change and which issue is fixed. # Motivation Please include an explanation of why you these changes are necessary Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Reviewed By: wangx6f Differential Revision: D54575650 fbshipit-source-id: 231838b4aa81d40df17914f28410c7b58bc1eaba
- Loading branch information