[PATCH v12 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-10-03 Thread Sughosh Ganu
. If the system boots in the Trial State for more than a specified number of boot counts, change the Active Bank to be booting the platform from. Call these checks through the main loop event at the time of platform boot. Signed-off-by: Sughosh Ganu Reviewed-by: Etienne Carriere --- Changes since V11

[PATCH v12 08/15] event: Add an event for main_loop

2022-10-03 Thread Sughosh Ganu
Add an event type EVT_MAIN_LOOP that can be used for registering events that need to be run after the platform has been initialised and before the main_loop function is called. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V11: None common/board_r.c | 3 +++ common

[PATCH v12 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-10-03 Thread Sughosh Ganu
, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Ilias Apalodimas --- Changes since V11: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5

[PATCH v12 06/15] FWU: Add helper functions for accessing FWU metadata

2022-10-03 Thread Sughosh Ganu
. The function to get the dfu alternate number has been added for platforms with GPT partitioned storage devices. Platforms with other storage partition scheme need to implement their own function. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Etienne Carriere --- Changes

[PATCH v12 05/15] stm32mp1: Add image information for capsule updates

2022-10-03 Thread Sughosh Ganu
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Ilias Apalodimas Reviewed-by: Etienne Carriere

[PATCH v12 04/15] stm32mp1: dk2: Add a node for the FWU metadata device

2022-10-03 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c-dk2 board, the FWU metadata is stored on the uSD card. Add the fwu-mdata node on the u-boot specifc dtsi file for accessing the metadata structure. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick

[PATCH v12 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-10-03 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V11: * Declare mdata_parts as an array in gpt_get_mdata_partitions() * Put the assignment to the return value in gpt_check_mdata_validity() as suggested by Etienne

[PATCH v12 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-03 Thread Sughosh Ganu
, and implementations can be added based on parameters like how the metadata partition is accessed and what type of storage device houses the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V11: * Use an enum for IMAGE_ACCEPT_SET

[PATCH v12 01/15] dt/bindings: Add bindings for GPT based FWU Metadata storage device

2022-10-03 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Acked-by: Etienne Carriere Reviewed-by: Ilias Apalodimas --- Changes since V11: None .../firmware/fwu-mdata-gpt.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree

[PATCH v12 00/15] FWU: Add FWU Multi Bank Update feature support

2022-10-03 Thread Sughosh Ganu
() * Describe the config CONFIG_CMD_FWU_METADATA separately * Remove some superfluous configs from the list of config symbols needed for building the feature Sughosh Ganu (15): dt/bindings: Add bindings for GPT based FWU Metadata storage device FWU: Add FWU metadata structure and driver

Re: [PATCH v11 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-10-03 Thread Sughosh Ganu
hi Takahiro, On Mon, 3 Oct 2022 at 16:27, Takahiro Akashi wrote: > > Hi Sughosh, > > On Wed, Sep 28, 2022 at 02:59:46PM +0530, Sughosh Ganu wrote: > > Enabling capsule update functionality on the platform requires > > populating information on the images that

Re: [PATCH v11 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-10-03 Thread Sughosh Ganu
hi Ilias, On Mon, 3 Oct 2022 at 15:26, Ilias Apalodimas wrote: > > On Wed, Sep 28, 2022 at 02:59:50PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update specification requires the Update Agent to > > carry out certain checks at the time of platform boot. Th

Re: [PATCH v11 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-03 Thread Sughosh Ganu
hi Etienne, On Fri, 30 Sept 2022 at 11:24, Etienne Carriere wrote: > > Hello Sughosh, > > On Wed, 28 Sept 2022 at 11:30, Sughosh Ganu wrote: > > > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of

Re: [PATCH v11 15/15] FWU: doc: Add documentation for the FWU feature

2022-09-30 Thread Sughosh Ganu
hi Etienne, On Fri, 30 Sept 2022 at 11:57, Etienne Carriere wrote: > > Hello Sughosh, > > 2 comments on the documentation. Otherwise it looks all good to me. > > Best regards, > Etienne > > On Wed, 28 Sept 2022 at 11:31, Sughosh Ganu wrote: > > > > A

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-29 Thread Sughosh Ganu
On Thu, 29 Sept 2022 at 00:59, Jassi Brar wrote: > > On Wed, Sep 28, 2022 at 1:00 AM Sughosh Ganu wrote: > > > > On Tue, 27 Sept 2022 at 21:55, Jassi Brar wrote: > > > > > > On Tue, Sep 27, 2022 at 2:14 AM Sughosh Ganu > > > wrote: > > &g

[PATCH v11 15/15] FWU: doc: Add documentation for the FWU feature

2022-09-28 Thread Sughosh Ganu
Add documentation for the FWU Multi Bank Update feature. The document describes the steps needed for setting up the platform for the feature, as well as steps for enabling the feature on the platform. Signed-off-by: Sughosh Ganu --- Changes since V10: * Fix review comments suggested by Etienne

[PATCH v11 14/15] mkeficapsule: Add support for setting OEM flags in capsule header

2022-09-28 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V10: None doc/mkeficapsule.1 | 4 tools/mkeficapsule.c | 17 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/mkeficapsule.1 b/doc/mkeficapsule.1 index 77ca061efd..6fb2dd0810 100644 --- a/doc

[PATCH v11 13/15] mkeficapsule: Add support for generating empty capsules

2022-09-28 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu --- Changes since V10: None doc/mkeficapsule.1 | 29 + tools/eficapsule.h | 8 tools/mkeficapsule.c | 96 3 files

[PATCH v11 12/15] test: dm: Add test cases for FWU Metadata uclass

2022-09-28 Thread Sughosh Ganu
-- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu Suggested-by: Heinrich Schuchardt --- Changes since V10: None arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 7 +- board/sandbox/sandbox.c

[PATCH v11 11/15] FWU: cmd: Add a command to read FWU metadata

2022-09-28 Thread Sughosh Ganu
Add a command to read the metadata as specified in the FWU specification and print the fields of the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Etienne Carriere --- Changes since V10: None cmd/Kconfig | 6 +++ cmd/Makefile

[PATCH v11 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-28 Thread Sughosh Ganu
. If the system boots in the Trial State for more than a specified number of boot counts, change the Active Bank to be booting the platform from. Call these checks through the main loop event at the time of platform boot. Signed-off-by: Sughosh Ganu Reviewed-by: Etienne Carriere --- Changes since V10

[PATCH v11 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-28 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V10: * Move the computation of the image index to the FMP set_image function as suggested by Takahiro * Use true and false booleans for fw_accept_os as suggested by Jassi * Simplify

[PATCH v11 08/15] event: Add an event for main_loop

2022-09-28 Thread Sughosh Ganu
Add an event type EVT_MAIN_LOOP that can be used for registering events that need to be run after the platform has been initialised and before the main_loop function is called. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V10: None

[PATCH v11 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-09-28 Thread Sughosh Ganu
, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Ilias Apalodimas --- Changes since V10: * Remove the casting of boot_idx to a u32 as suggested

[PATCH v11 06/15] FWU: Add helper functions for accessing FWU metadata

2022-09-28 Thread Sughosh Ganu
. The function to get the dfu alternate number has been added for platforms with GPT partitioned storage devices. Platforms with other storage partition scheme need to implement their own function. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Etienne Carriere --- Changes

[PATCH v11 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-09-28 Thread Sughosh Ganu
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Ilias Apalodimas --- Changes since V10: * Use

[PATCH v11 04/15] stm32mp1: dk2: Add a node for the FWU metadata device

2022-09-28 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c-dk2 board, the FWU metadata is stored on the uSD card. Add the fwu-mdata node on the u-boot specifc dtsi file for accessing the metadata structure. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick

[PATCH v11 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-28 Thread Sughosh Ganu
, and implementations can be added based on parameters like how the metadata partition is accessed and what type of storage device houses the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V10: * s/fwu_update_active_index

[PATCH v11 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-28 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V10: * Use array for storing the metadata partition numbers as suggested by Ilias * Skip a couple of goto's in gpt_check_mdata_validity() as suggested by Ilias

[PATCH v11 01/15] dt/bindings: Add bindings for GPT based FWU Metadata storage device

2022-09-28 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Acked-by: Etienne Carriere Reviewed-by: Ilias Apalodimas --- Changes since V10: None .../firmware/fwu-mdata-gpt.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree

[PATCH v11 00/15] FWU: Add FWU Multi Bank Update feature support

2022-09-28 Thread Sughosh Ganu
to highlight the difference in ImageIndex correlation with DFU alt num with FWU feature enabled Sughosh Ganu (15): dt/bindings: Add bindings for GPT based FWU Metadata storage device FWU: Add FWU metadata structure and driver for accessing metadata FWU: Add FWU metadata access driver

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-28 Thread Sughosh Ganu
On Tue, 27 Sept 2022 at 22:19, Jassi Brar wrote: > > On Tue, Sep 27, 2022 at 2:22 AM Sughosh Ganu wrote: > > > > On Mon, 26 Sept 2022 at 20:24, Jassi Brar wrote: > > > > > > On Mon, Sep 26, 2022 at 4:01 AM Sughosh Ganu > > > wrote: >

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-28 Thread Sughosh Ganu
On Tue, 27 Sept 2022 at 21:55, Jassi Brar wrote: > > On Tue, Sep 27, 2022 at 2:14 AM Sughosh Ganu wrote: > > > > On Mon, 26 Sept 2022 at 20:12, Jassi Brar wrote: > > > > > > On Mon, Sep 26, 2022 at 5:00 AM Sughosh Ganu > > > wrote: > > &g

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-27 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 20:24, Jassi Brar wrote: > > On Mon, Sep 26, 2022 at 4:01 AM Sughosh Ganu wrote: > > On Mon, 26 Sept 2022 at 08:25, Jassi Brar wrote: > > > > . > > > > > > > > +static __maybe_unused efi_status_t fw

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-27 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 20:12, Jassi Brar wrote: > > On Mon, Sep 26, 2022 at 5:00 AM Sughosh Ganu wrote: > > > > On Mon, 26 Sept 2022 at 08:28, Jassi Brar wrote: > > > > > > > > > > . > > > > +/** > > > > + * fwu_re

Re: [PATCH v10 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-27 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 19:37, Jassi Brar wrote: > > On Mon, Sep 26, 2022 at 5:08 AM Sughosh Ganu wrote: > > > > On Mon, 26 Sept 2022 at 08:29, Jassi Brar wrote: > > > . > > > > +static int fwu_boottime_checks(void *ctx, struct event *ev

Re: [PATCH v10 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-26 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 08:29, Jassi Brar wrote: > > On Thu, Sep 15, 2022 at 3:17 AM Sughosh Ganu wrote: > > > > diff --git a/include/fwu.h b/include/fwu.h > > index 484289ed4f..d5f77ce83c 100644 > > --- a/include/fwu.h > > +++ b/includ

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-26 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 08:28, Jassi Brar wrote: > > On Thu, Sep 15, 2022 at 3:15 AM Sughosh Ganu wrote: > > > +/** > > + * @mdata_check: check the validity of the FWU metadata partitions > > + * @get_mdata() - Get a FWU metadata copy > > + * @update_mdata

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-26 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 08:25, Jassi Brar wrote: > > On Thu, Sep 15, 2022 at 3:17 AM Sughosh Ganu wrote: > > > + > > +static __maybe_unused void fwu_post_update_checks( > > + struct efi_capsule_header *capsule, > > + bool *f

Re: [PATCH v10 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-26 Thread Sughosh Ganu
On Mon, 26 Sept 2022 at 08:22, Jassi Brar wrote: > > On Thu, Sep 15, 2022 at 3:16 AM Sughosh Ganu wrote: > > > diff --git a/drivers/fwu-mdata/Kconfig b/drivers/fwu-mdata/Kconfig > > new file mode 100644 > > index 00..7322da48b1 > > --- /dev/null &g

Re: [PATCH v10 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-26 Thread Sughosh Ganu
hi Ilias, On Thu, 22 Sept 2022 at 14:16, Ilias Apalodimas wrote: > > Hi Sughosh > > On Thu, Sep 15, 2022 at 01:44:39PM +0530, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the

Re: [PATCH v10 06/15] FWU: Add helper functions for accessing FWU metadata

2022-09-22 Thread Sughosh Ganu
hi Ilias, On Thu, 22 Sept 2022 at 14:29, Ilias Apalodimas wrote: > > Hi Sughosh > > On Thu, Sep 15, 2022 at 01:44:42PM +0530, Sughosh Ganu wrote: > > Add weak functions for getting the update index value and dfu > > alternate number needed for FWU Multi Bank

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-21 Thread Sughosh Ganu
hi Takahiro, On Wed, 21 Sept 2022 at 10:58, Takahiro Akashi wrote: > > Sughosh, > > On Tue, Sep 20, 2022 at 06:34:12PM +0530, Sughosh Ganu wrote: > > On Tue, 20 Sept 2022 at 13:46, Takahiro Akashi > > wrote: > > > > > > On Fri, Sep 16, 2022 at 04:24:

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-20 Thread Sughosh Ganu
On Tue, 20 Sept 2022 at 13:46, Takahiro Akashi wrote: > > On Fri, Sep 16, 2022 at 04:24:35PM +0530, Sughosh Ganu wrote: > > hi Takahiro, > > > > On Fri, 16 Sept 2022 at 12:20, Takahiro Akashi > > wrote: > > > > > > On Fri, Sep 16, 2022 at 10:

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-19 Thread Sughosh Ganu
On Mon, 19 Sept 2022 at 06:03, Jassi Brar wrote: > > On Thu, 15 Sept 2022 at 03:15, Sughosh Ganu wrote: > > > +/** > > + * fwu_get_active_index() - Get active_index from the FWU metadata > > + * @active_idxp: active_index value to be read > > + * > &g

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-16 Thread Sughosh Ganu
hi Takahiro, On Fri, 16 Sept 2022 at 12:20, Takahiro Akashi wrote: > > On Fri, Sep 16, 2022 at 10:52:11AM +0530, Sughosh Ganu wrote: > > () hi Takahiro, > > > > On Fri, 16 Sept 2022 at 07:17, Takahiro Akashi > > wrote: > > > > > > Hi Sughosh, >

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-15 Thread Sughosh Ganu
() hi Takahiro, On Fri, 16 Sept 2022 at 07:17, Takahiro Akashi wrote: > > Hi Sughosh, > > On Thu, Sep 15, 2022 at 01:44:46PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature supports updation of firmware images > > to one of multiple sets(also

[PATCH v10 15/15] FWU: doc: Add documentation for the FWU feature

2022-09-15 Thread Sughosh Ganu
Add documentattion for the FWU Multi Bank Update feature. The document describes the steps needed for setting up the platform for the feature, as well as steps for enabling the feature on the platform. Signed-off-by: Sughosh Ganu --- Changes since V9: None doc/develop/uefi/fwu_updates.rst

[PATCH v10 14/15] mkeficapsule: Add support for setting OEM flags in capsule header

2022-09-15 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V9: None doc/mkeficapsule.1 | 4 tools/mkeficapsule.c | 17 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/mkeficapsule.1 b/doc/mkeficapsule.1 index 77ca061efd..6fb2dd0810 100644 --- a/doc

[PATCH v10 13/15] mkeficapsule: Add support for generating empty capsules

2022-09-15 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu --- Changes since V9: None doc/mkeficapsule.1 | 29 + tools/eficapsule.h | 8 tools/mkeficapsule.c | 96 3 files

[PATCH v10 12/15] test: dm: Add test cases for FWU Metadata uclass

2022-09-15 Thread Sughosh Ganu
-- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu Suggested-by: Heinrich Schuchardt --- Changes since V9: * Change the fwu_plat_get_bootidx() function to take an uint * as the function parameter instead of the void * as suggested by Etienne. arch

[PATCH v10 11/15] FWU: cmd: Add a command to read FWU metadata

2022-09-15 Thread Sughosh Ganu
Add a command to read the metadata as specified in the FWU specification and print the fields of the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Etienne Carriere --- Changes since V9: * Add a document for the command cmd/Kconfig | 6

[PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-15 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V9: * Move the global variables into local variables as suggested by Ilias. * Change fwu_get_image_alt_num() name to fwu_get_image_image_index() as suggested by Takahiro. * Allow capsule

[PATCH v10 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-15 Thread Sughosh Ganu
. If the system boots in the Trial State for more than a specified number of boot counts, change the Active Bank to be booting the platform from. Call these checks through the main loop event at the time of platform boot. Signed-off-by: Sughosh Ganu Reviewed-by: Etienne Carriere --- Changes since V9

[PATCH v10 08/15] event: Add an event for main_loop

2022-09-15 Thread Sughosh Ganu
Add an event type EVT_MAIN_LOOP that can be used for registering events that need to be run after the platform has been initialised and before the main_loop function is called. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V9: * Add a comment to indicate where the event

[PATCH v10 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-09-15 Thread Sughosh Ganu
, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Ilias Apalodimas --- Changes since V9: * Change the fwu_plat_get_bootidx() function to take an uint

[PATCH v10 06/15] FWU: Add helper functions for accessing FWU metadata

2022-09-15 Thread Sughosh Ganu
. The function to get the dfu alternate number has been added for platforms with GPT partitioned storage devices. Platforms with other storage partition scheme need to implement their own function. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Etienne Carriere --- Changes

[PATCH v10 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-09-15 Thread Sughosh Ganu
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Ilias Apalodimas --- Changes since V9: * Remove

[PATCH v10 04/15] stm32mp1: dk2: Add a node for the FWU metadata device

2022-09-15 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c-dk2 board, the FWU metadata is stored on the uSD card. Add the fwu-mdata node on the u-boot specifc dtsi file for accessing the metadata structure. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick

[PATCH v10 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-15 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V9: * s/formated/formatted in the commit message * Add a '\n' character in the log message drivers/fwu-mdata/Kconfig | 16 ++ drivers/fwu-mdata/Makefile | 8

[PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-15 Thread Sughosh Ganu
, and implementations can be added based on parameters like how the metadata partition is accessed and what type of storage device houses the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V9: * Add a helper function fwu_get_dev_mdata

[PATCH v10 01/15] dt/bindings: Add bindings for GPT based FWU Metadata storage device

2022-09-15 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Acked-by: Etienne Carriere Reviewed-by: Ilias Apalodimas --- Changes since V9: None .../firmware/fwu-mdata-gpt.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree

[PATCH v10 00/15] FWU: Add FWU Multi Bank Update feature support

2022-09-15 Thread Sughosh Ganu
an uint * as the function parameter instead of the void * as suggested by Etienne. Sughosh Ganu (15): dt/bindings: Add bindings for GPT based FWU Metadata storage device FWU: Add FWU metadata structure and driver for accessing metadata FWU: Add FWU metadata access driver for GPT partitioned

[PATCH v3 3/3] rockpi4: capsule: Enable UEFI capsule update on RockPi4 boards

2022-09-14 Thread Sughosh Ganu
Enable the UEFI capsule update functionality on the RockPi4B and RockPi4C boards. Support is being enabled for updating the idbloader and u-boot firmware images residing on GPT partitioned uSD card storage device. Signed-off-by: Sughosh Ganu --- Changes since V2: None configs/rock-pi-4

[PATCH v3 2/3] rockpi4: board: Add firmware image information for capsule updates

2022-09-14 Thread Sughosh Ganu
Add information that will be needed for enabling the UEFI capsule update feature on the RockPi4 boards. With the feature enabled, it would be possible to update the idbloader and u-boot.itb images on the RockPi4B and RockPi4C variants. Signed-off-by: Sughosh Ganu --- Changes since V2: * Add

[PATCH v3 1/3] rockchip: capsule: Add functions for supporting capsule updates

2022-09-14 Thread Sughosh Ganu
Add functions needed to support the UEFI capsule update feature on rockchip boards. Currently, the feature is being enabled on the RockPi4 boards with firmware images residing on GPT partitioned storage media. Signed-off-by: Sughosh Ganu --- Changes since V2: * Use rockchip in the commit message

[PATCH v3 0/3] rockpi4: Add capsule update support

2022-09-14 Thread Sughosh Ganu
summary instead of rockpi * Use num_image_type_guids instead of ROCKPI4_UPDATABLE_IMAGES macro * Move the board specific code out of this file into evb_rk3399.c * Add a function rockchip_capsule_update_board_setup() for setting up the board specific part needed for capsule updates Sughosh Ganu (3

Re: [PATCH v2 1/3] rockpi4: capsule: Add functions needed for supporting capsule updates

2022-09-13 Thread Sughosh Ganu
I capsule update feature on > > rockchip boards. Currently, the feature is being enabled on the > > RockPi4 boards with firmware images residing on GPT partitioned > > storage media. > > > > Signed-off-by: Sughosh Ganu > > --- > > Changes since V1: > > * Move the

Re: [PATCH v2 2/3] rockpi4: board: Add firmware image information needed for capsule updates

2022-09-13 Thread Sughosh Ganu
hi Peter, On Fri, 9 Sept 2022 at 18:12, Peter Robinson wrote: > > On Tue, Sep 6, 2022 at 7:59 AM Sughosh Ganu wrote: > > > > Add information that will be needed for enabling the UEFI capsule > > update feature on the RockPi4 boards. With the feature enabled, it > &g

Re: [PATCH] RockPi4: Add UEFI capsule update support

2022-09-09 Thread Sughosh Ganu
hi Kever, On Fri, 9 Sept 2022 at 15:38, Kever Yang wrote: > > Hi Sughosh, > > On 2022/9/2 15:52, Sughosh Ganu wrote: > > hi Kever, > > > > On Wed, 29 Jun 2022 at 09:11, Kever Yang wrote: > >> Hi Sughosh, > >> > >>Thanks for you

Re: [PATCH v9 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-08 Thread Sughosh Ganu
hi Takahiro, On Thu, 8 Sept 2022 at 07:45, Takahiro Akashi wrote: > > Hi Sughosh, > > On Fri, Aug 26, 2022 at 03:27:11PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature supports updation of firmware images > > to one of multiple sets(also called banks)

Re: [PATCH v9 06/15] FWU: Add helper functions for accessing FWU metadata

2022-09-07 Thread Sughosh Ganu
hi Ilias, On Wed, 7 Sept 2022 at 11:29, Ilias Apalodimas wrote: > > On Fri, Aug 26, 2022 at 03:27:07PM +0530, Sughosh Ganu wrote: > > Add weak functions for getting the update index value and dfu > > alternate number needed for FWU Multi Bank update > > functional

Re: [PATCH v9 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-07 Thread Sughosh Ganu
hi Ilias, On Wed, 7 Sept 2022 at 12:15, Ilias Apalodimas wrote: > > Hi Sughosh, > > On Fri, Aug 26, 2022 at 03:27:03PM +0530, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the m

Re: [PATCH v9 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-09-06 Thread Sughosh Ganu
hi Etienne, On Tue, 6 Sept 2022 at 13:07, Sughosh Ganu wrote: > > hi Etienne, > > On Tue, 6 Sept 2022 at 12:57, Etienne Carriere > wrote: > > > > Hi Sughosh, > > > > I have a last comment on this series, related to the below patch and > > patch &quo

Re: [PATCH v9 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-09-06 Thread Sughosh Ganu
hi Etienne, On Tue, 6 Sept 2022 at 12:57, Etienne Carriere wrote: > > Hi Sughosh, > > I have a last comment on this series, related to the below patch and > patch "test: dm: Add test cases for FWU Metadata uclass". > > On Fri, 26 Aug 2022 at 11:58, Sughosh Ganu wr

Re: [PATCH v9 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-06 Thread Sughosh Ganu
hi Etienne, On Tue, 6 Sept 2022 at 12:31, Etienne Carriere wrote: > > Hi Sughosh, > > Reviewed-by: Etienne Carriere with > comment addressed. Will address both your review comments. Thanks. -sughosh > > > On Fri, 26 Aug 2022 at 11:57, Sughosh Ganu wrote: > > &g

Re: [PATCH v9 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-06 Thread Sughosh Ganu
hi Etienne, On Tue, 6 Sept 2022 at 12:31, Etienne Carriere wrote: > > Hi Sughosh, > > Reviewed-by: Etienne Carriere with a > minor comment. > > > On Fri, 26 Aug 2022 at 11:58, Sughosh Ganu wrote: > > > > The FWU Multi Bank Update specification requires the U

Re: [PATCH v9 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-09-06 Thread Sughosh Ganu
hi Etienne, On Tue, 6 Sept 2022 at 00:49, Etienne Carriere wrote: > > Hello Sughosh, > > On Fri, 26 Aug 2022 at 11:57, Sughosh Ganu wrote: > > > > Enabling capsule update functionality on the platform requires > > populating information on the image

[PATCH v2 3/3] rockpi4: capsule: Enable UEFI capsule update on RockPi4 boards

2022-09-06 Thread Sughosh Ganu
Enable the UEFI capsule update functionality on the RockPi4B and RockPi4C boards. Support is being enabled for updating the idbloader and u-boot firmware images residing on GPT partitioned storage devices. Signed-off-by: Sughosh Ganu --- Changes since V1: * Split the enabling of the feature

[PATCH v2 2/3] rockpi4: board: Add firmware image information needed for capsule updates

2022-09-06 Thread Sughosh Ganu
Add information that will be needed for enabling the UEFI capsule update feature on the RockPi4 boards. With the feature enabled, it would be possible to update the idbloader and u-boot.itb images on the RockPi4B and RockPi4C variants. Signed-off-by: Sughosh Ganu --- Changes since V1: * Split

[PATCH v2 1/3] rockpi4: capsule: Add functions needed for supporting capsule updates

2022-09-06 Thread Sughosh Ganu
Add functions needed to support the UEFI capsule update feature on rockchip boards. Currently, the feature is being enabled on the RockPi4 boards with firmware images residing on GPT partitioned storage media. Signed-off-by: Sughosh Ganu --- Changes since V1: * Move the capsule update related

[PATCH v2 0/3] rockpi4: Add capsule update support

2022-09-06 Thread Sughosh Ganu
of EFI variables. Sughosh Ganu (3): rockpi4: capsule: Add functions needed for supporting capsule updates rockpi4: board: Add firmware image information needed for capsule updates rockpi4: capsule: Enable UEFI capsule update on RockPi4 boards arch/arm/mach-rockchip/Kconfig | 1

Re: [PATCH] RockPi4: Add UEFI capsule update support

2022-09-02 Thread Sughosh Ganu
hi Kever, On Wed, 29 Jun 2022 at 09:11, Kever Yang wrote: > > Hi Sughosh, > > Thanks for your patch. > > On 2022/5/16 14:12, Sughosh Ganu wrote: > > hi Peter, > > > > On Sat, 14 May 2022 at 13:44, Peter Robinson wrote: > >> On Fri, May

[PATCH v9 15/15] FWU: doc: Add documentation for the FWU feature

2022-08-26 Thread Sughosh Ganu
Add documentation for the FWU Multi Bank Update feature. The document describes the steps needed for setting up the platform for the feature, as well as steps for enabling the feature on the platform. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass

[PATCH v9 14/15] mkeficapsule: Add support for setting OEM flags in capsule header

2022-08-26 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V8: None doc/mkeficapsule.1 | 4 tools/mkeficapsule.c | 17 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/mkeficapsule.1 b/doc/mkeficapsule.1 index 77ca061efd..6fb2dd0810 100644 --- a/doc

[PATCH v9 12/15] test: dm: Add test cases for FWU Metadata uclass

2022-08-26 Thread Sughosh Ganu
-- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu Suggested-by: Heinrich Schuchardt --- Changes since V8: New patch arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 7 +- board/sandbox

[PATCH v9 13/15] mkeficapsule: Add support for generating empty capsules

2022-08-26 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu --- Changes since V8: None doc/mkeficapsule.1 | 29 + tools/eficapsule.h | 8 tools/mkeficapsule.c | 96 3 files

[PATCH v9 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-08-26 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V8: * Add comments for API functions * Move addition of the FWU Kconfig symbols and Makefile to this patch drivers/Kconfig | 2 + drivers/Makefile | 1

[PATCH v9 11/15] FWU: cmd: Add a command to read FWU metadata

2022-08-26 Thread Sughosh Ganu
Add a command to read the metadata as specified in the FWU specification and print the fields of the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V8: None cmd/Kconfig | 6 cmd/Makefile| 1 + cmd/fwu_mdata.c | 79

[PATCH v9 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-08-26 Thread Sughosh Ganu
. If the system boots in the Trial State for more than a specified number of boot counts, change the Active Bank to be booting the platform from. Call these checks through the main loop event at the time of platform boot. Signed-off-by: Sughosh Ganu --- Changes since V8: * Call fwu_boottime_checks

[PATCH v9 08/15] event: Add an event for main_loop

2022-08-26 Thread Sughosh Ganu
Add an event type EVT_MAIN_LOOP that can be used for registering events that need to be run after the platform has been initialised and before the main_loop function is called. Signed-off-by: Sughosh Ganu --- Changes since V8: New patch common/board_r.c | 3 +++ common/event.c | 3

[PATCH v9 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-08-26 Thread Sughosh Ganu
, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Acked-by: Ilias Apalodimas --- Changes since V8: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5

[PATCH v9 06/15] FWU: Add helper functions for accessing FWU metadata

2022-08-26 Thread Sughosh Ganu
. The function to get the dfu alternate number has been added for platforms with GPT partitioned storage devices. Platforms with other storage partition scheme need to implement their own function. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V8: * Add comments

[PATCH v9 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-08-26 Thread Sughosh Ganu
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu --- Changes since V8: * Use STM32MP_FIP_IMAGE_GUID for the FIP GUID value as suggested

[PATCH v9 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-08-26 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V8: * Rename fwu_mdata_gpt_blk.c as gpt_blk.c as suggested by Simon * Use natural integer types instead of specific width integers as suggested by Simon * Fix return codes as suggested by Simon

[PATCH v9 04/15] stm32mp1: dk2: Add a node for the FWU metadata device

2022-08-26 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c-dk2 board, the FWU metadata is stored on the uSD card. Add the fwu-mdata node on the u-boot specifc dtsi file for accessing the metadata structure. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick

[PATCH v9 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-08-26 Thread Sughosh Ganu
, and implementations can be added based on parameters like how the metadata partition is accessed and what type of storage device houses the metadata. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V8: * Declare the metadata struct on the stack rather than heap * Move the API's

[PATCH v9 01/15] dt/bindings: Add bindings for GPT based FWU Metadata storage device

2022-08-26 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt --- Changes since V8: None .../firmware/fwu-mdata-gpt.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata-gpt.yaml diff --git a/doc/device

[PATCH v9 00/15] FWU: Add FWU Multi Bank Update feature support

2022-08-26 Thread Sughosh Ganu
to this patch * Fixed spelling mistake in the commit message Sughosh Ganu (15): dt/bindings: Add bindings for GPT based 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

Re: [PATCH v8 10/13] FWU: cmd: Add a command to read FWU metadata

2022-08-21 Thread Sughosh Ganu
hi Simon, On Fri, 19 Aug 2022 at 20:55, Simon Glass wrote: > > Hi Sughosh, > > On Fri, 19 Aug 2022 at 01:41, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 18 Aug 2022 at 23:19, Simon Glass wrote: > > > > > > Hi Sughosh,

<    1   2   3   4   5   6   7   8   9   10   >