Re: [PATCH v5 00/23] FWU: Add FWU Multi Bank Update feature support
hi, On Mon, 20 Jun 2022 at 23:42, Patrick DELAUNAY wrote: > > Hi, > > On 6/9/22 14:29, Sughosh Ganu wrote: > > The patchset adds support for the FWU Multi Bank Update[1] > > feature. Certain aspects of the Dependable Boot[2] specification have > > also been implemented. > > > > The FWU multi bank update feature is used for supporting multiple > > sets(also called banks) of firmware image(s), allowing the platform to > > boot from a different bank, in case it fails to boot from the active > > bank. This functionality is supported by keeping the relevant > > information in a structure called metadata, which provides information > > on the images. Among other parameters, the metadata structure contains > > information on the currect active bank that is being used to boot > > image(s). > > > > Functionality is being added to work with the UEFI capsule driver in > > u-boot. The metadata is read to gather information on the update bank, > > which is the bank to which the firmware images would be flashed to. On > > a successful completion of the update of all components, the active > > bank field in the metadata is updated, to reflect the bank from which > > the platform will boot on the subsequent boots. > > > > Currently, the feature is being enabled on the STM32MP157C-DK2 and > > Synquacer boards. The DK2 board boots a FIP image from a uSD card > > partitioned with the GPT partioning scheme, while the Synquacer board > > boots a FIP image from a MTD partitioned SPI NOR flash device. > > > > This feature also requires changes in a previous stage of > > bootloader, which parses the metadata and selects the bank to boot the > > image(s) from. Support has being added in tf-a(BL2 stage) for the > > STM32MP157C-DK2 board to boot the active bank images. These changes > > have been merged to the upstream tf-a repository. > > > > Earlier, two separate patchsets were being sent. The patchset sent by > > me was adding support for the feature, and enabling the feature on the > > ST board. The other set of patches were being sent by Masami > > Hiramatsu, which were enabling the feature on the Synquacer > > platform. This patchset contains both set of patches, along with the > > associated documentation and the python test script for testing the > > feature. > > > > The upstreaming effort for this feature had been put on a temporary > > hold to address the fixing of some issues in the capsule update code, > > primarily using a per platform image GUID for the updatable > > images. Now that the series has been merged, upstreaming effort for > > the FWU update feature is being resumed. Hence, this version does not > > have any review comments being addressed. > > > > > > [1] - https://developer.arm.com/documentation/den0118/a > > [2] - > > https://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf > > > > Jassi Brar (1): > >developerbox: synquacer: Use FIP as the updatable image > > > > Masami Hiramatsu (9): > >FWU: Add FWU metadata access driver for non-GPT MTD devices > >dt/bindings: firmware: Add FWU metadata on MTD devices binding > >tools: Add mkfwumdata tool for FWU metadata image > >FWU: doc: Update documentation for the FWU non-GPT MTD > >synquacer: Update for TBBR (BL2) based new FIP layout > >FWU: synquacer: Add FWU Multi bank update support for DeveloperBox > >FWU: synquacer: Generate dfu_alt_info from devicetree partition > >doc: synquacer: Add how to enable FWU Multi Bank Update > >[TEMP]configs: synquacer: Add FWU support for DeveloperBox > > > > Sughosh Ganu (13): > >dt/bindings: Add bindings for FWU Metadata storage device > >FWU: Add FWU metadata structure and driver for accessing metadata > >FWU: Add FWU metadata access driver for GPT partitioned block devices > >stm32mp1: dk2: Add a node for the FWU metadata device > >stm32mp1: dk2: Add image information for capsule updates > >FWU: stm32mp1: Add helper functions for accessing FWU metadata > >FWU: STM32MP1: Add support to read boot index from backup register > >FWU: Add boot time checks as highlighted by the FWU specification > >FWU: Add support for the FWU Multi Bank Update feature > >FWU: cmd: Add a command to read FWU metadata > >mkeficapsule: Add support for generating empty capsules > >FWU: doc: Add documentation for the FWU feature > >sandbox: fwu: Add support for testing FWU feature on sandbox > > > > arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi | 7 + > > .../synquacer-sc2a11-developerbox-u-boot.dtsi | 40 +- > > arch/arm/mach-stm32mp/include/mach/stm32.h| 4 + > > arch/sandbox/Kconfig | 6 + > > arch/sandbox/dts/test.dts | 45 +- > > board/sandbox/sandbox.c | 49 ++ > > board/socionext/developerbox/Kconfig | 14 + > > board/socionext/developerbox/Makefile | 1 + > >
Re: [PATCH v5 00/23] FWU: Add FWU Multi Bank Update feature support
Hi, On 6/9/22 14:29, Sughosh Ganu wrote: The patchset adds support for the FWU Multi Bank Update[1] feature. Certain aspects of the Dependable Boot[2] specification have also been implemented. The FWU multi bank update feature is used for supporting multiple sets(also called banks) of firmware image(s), allowing the platform to boot from a different bank, in case it fails to boot from the active bank. This functionality is supported by keeping the relevant information in a structure called metadata, which provides information on the images. Among other parameters, the metadata structure contains information on the currect active bank that is being used to boot image(s). Functionality is being added to work with the UEFI capsule driver in u-boot. The metadata is read to gather information on the update bank, which is the bank to which the firmware images would be flashed to. On a successful completion of the update of all components, the active bank field in the metadata is updated, to reflect the bank from which the platform will boot on the subsequent boots. Currently, the feature is being enabled on the STM32MP157C-DK2 and Synquacer boards. The DK2 board boots a FIP image from a uSD card partitioned with the GPT partioning scheme, while the Synquacer board boots a FIP image from a MTD partitioned SPI NOR flash device. This feature also requires changes in a previous stage of bootloader, which parses the metadata and selects the bank to boot the image(s) from. Support has being added in tf-a(BL2 stage) for the STM32MP157C-DK2 board to boot the active bank images. These changes have been merged to the upstream tf-a repository. Earlier, two separate patchsets were being sent. The patchset sent by me was adding support for the feature, and enabling the feature on the ST board. The other set of patches were being sent by Masami Hiramatsu, which were enabling the feature on the Synquacer platform. This patchset contains both set of patches, along with the associated documentation and the python test script for testing the feature. The upstreaming effort for this feature had been put on a temporary hold to address the fixing of some issues in the capsule update code, primarily using a per platform image GUID for the updatable images. Now that the series has been merged, upstreaming effort for the FWU update feature is being resumed. Hence, this version does not have any review comments being addressed. [1] - https://developer.arm.com/documentation/den0118/a [2] - https://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Jassi Brar (1): developerbox: synquacer: Use FIP as the updatable image Masami Hiramatsu (9): FWU: Add FWU metadata access driver for non-GPT MTD devices dt/bindings: firmware: Add FWU metadata on MTD devices binding tools: Add mkfwumdata tool for FWU metadata image FWU: doc: Update documentation for the FWU non-GPT MTD synquacer: Update for TBBR (BL2) based new FIP layout FWU: synquacer: Add FWU Multi bank update support for DeveloperBox FWU: synquacer: Generate dfu_alt_info from devicetree partition doc: synquacer: Add how to enable FWU Multi Bank Update [TEMP]configs: synquacer: Add FWU support for DeveloperBox Sughosh Ganu (13): dt/bindings: Add bindings for FWU Metadata storage device FWU: Add FWU metadata structure and driver for accessing metadata FWU: Add FWU metadata access driver for GPT partitioned block devices stm32mp1: dk2: Add a node for the FWU metadata device stm32mp1: dk2: Add image information for capsule updates FWU: stm32mp1: Add helper functions for accessing FWU metadata FWU: STM32MP1: Add support to read boot index from backup register FWU: Add boot time checks as highlighted by the FWU specification FWU: Add support for the FWU Multi Bank Update feature FWU: cmd: Add a command to read FWU metadata mkeficapsule: Add support for generating empty capsules FWU: doc: Add documentation for the FWU feature sandbox: fwu: Add support for testing FWU feature on sandbox arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi | 7 + .../synquacer-sc2a11-developerbox-u-boot.dtsi | 40 +- arch/arm/mach-stm32mp/include/mach/stm32.h| 4 + arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 45 +- board/sandbox/sandbox.c | 49 ++ board/socionext/developerbox/Kconfig | 14 + board/socionext/developerbox/Makefile | 1 + board/socionext/developerbox/developerbox.c | 17 +- board/socionext/developerbox/fwu_plat.c | 200 board/st/stm32mp1/stm32mp1.c | 141 ++ cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/fwu_mdata.c | 74 +++ common/board_r.c | 5 + configs/sandbox64_defconfig
[PATCH v5 00/23] FWU: Add FWU Multi Bank Update feature support
The patchset adds support for the FWU Multi Bank Update[1] feature. Certain aspects of the Dependable Boot[2] specification have also been implemented. The FWU multi bank update feature is used for supporting multiple sets(also called banks) of firmware image(s), allowing the platform to boot from a different bank, in case it fails to boot from the active bank. This functionality is supported by keeping the relevant information in a structure called metadata, which provides information on the images. Among other parameters, the metadata structure contains information on the currect active bank that is being used to boot image(s). Functionality is being added to work with the UEFI capsule driver in u-boot. The metadata is read to gather information on the update bank, which is the bank to which the firmware images would be flashed to. On a successful completion of the update of all components, the active bank field in the metadata is updated, to reflect the bank from which the platform will boot on the subsequent boots. Currently, the feature is being enabled on the STM32MP157C-DK2 and Synquacer boards. The DK2 board boots a FIP image from a uSD card partitioned with the GPT partioning scheme, while the Synquacer board boots a FIP image from a MTD partitioned SPI NOR flash device. This feature also requires changes in a previous stage of bootloader, which parses the metadata and selects the bank to boot the image(s) from. Support has being added in tf-a(BL2 stage) for the STM32MP157C-DK2 board to boot the active bank images. These changes have been merged to the upstream tf-a repository. Earlier, two separate patchsets were being sent. The patchset sent by me was adding support for the feature, and enabling the feature on the ST board. The other set of patches were being sent by Masami Hiramatsu, which were enabling the feature on the Synquacer platform. This patchset contains both set of patches, along with the associated documentation and the python test script for testing the feature. The upstreaming effort for this feature had been put on a temporary hold to address the fixing of some issues in the capsule update code, primarily using a per platform image GUID for the updatable images. Now that the series has been merged, upstreaming effort for the FWU update feature is being resumed. Hence, this version does not have any review comments being addressed. [1] - https://developer.arm.com/documentation/den0118/a [2] - https://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Jassi Brar (1): developerbox: synquacer: Use FIP as the updatable image Masami Hiramatsu (9): FWU: Add FWU metadata access driver for non-GPT MTD devices dt/bindings: firmware: Add FWU metadata on MTD devices binding tools: Add mkfwumdata tool for FWU metadata image FWU: doc: Update documentation for the FWU non-GPT MTD synquacer: Update for TBBR (BL2) based new FIP layout FWU: synquacer: Add FWU Multi bank update support for DeveloperBox FWU: synquacer: Generate dfu_alt_info from devicetree partition doc: synquacer: Add how to enable FWU Multi Bank Update [TEMP]configs: synquacer: Add FWU support for DeveloperBox Sughosh Ganu (13): dt/bindings: Add bindings for FWU Metadata storage device FWU: Add FWU metadata structure and driver for accessing metadata FWU: Add FWU metadata access driver for GPT partitioned block devices stm32mp1: dk2: Add a node for the FWU metadata device stm32mp1: dk2: Add image information for capsule updates FWU: stm32mp1: Add helper functions for accessing FWU metadata FWU: STM32MP1: Add support to read boot index from backup register FWU: Add boot time checks as highlighted by the FWU specification FWU: Add support for the FWU Multi Bank Update feature FWU: cmd: Add a command to read FWU metadata mkeficapsule: Add support for generating empty capsules FWU: doc: Add documentation for the FWU feature sandbox: fwu: Add support for testing FWU feature on sandbox arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi | 7 + .../synquacer-sc2a11-developerbox-u-boot.dtsi | 40 +- arch/arm/mach-stm32mp/include/mach/stm32.h| 4 + arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 45 +- board/sandbox/sandbox.c | 49 ++ board/socionext/developerbox/Kconfig | 14 + board/socionext/developerbox/Makefile | 1 + board/socionext/developerbox/developerbox.c | 17 +- board/socionext/developerbox/fwu_plat.c | 200 board/st/stm32mp1/stm32mp1.c | 141 ++ cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/fwu_mdata.c | 74 +++ common/board_r.c | 5 + configs/sandbox64_defconfig | 12 +- configs/synquacer_developerbox_defconfig | 10 +-