Re: [PATCH 0/5] FWU: Add support for mtd backed feature on DeveloperBox

2022-08-21 Thread Sughosh Ganu
is adding support for the feature on MTD partition based devices and enabling the feature on the Synquacer board. -sughosh > > Best regards > > Heinrich > > > > > Jassi Brar (2): > >dt: fwu: developerbox: enable fwu banks and mdata regions > >fwu: DeveloperBox: a

Re: [PATCH v8 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-08-19 Thread Sughosh Ganu
hi Simon, On Fri, 19 Aug 2022 at 20:53, Simon Glass wrote: > > Hi Sughosh, > > On Fri, 19 Aug 2022 at 07:36, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 18 Aug 2022 at 23:20, Simon Glass wrote: > > > > > > pHi Sughosh,

Re: [PATCH v8 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-08-19 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 23:20, Simon Glass wrote: > > pHi Sughosh, > > On Thu, 18 Aug 2022 at 05:03, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 18 Aug 2022 at 06:43, Simon Glass wrote: > > > > > > Hi Sughosh,

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

2022-08-19 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 23:19, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 18 Aug 2022 at 05:53, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 18 Aug 2022 at 08:51, Simon Glass wrote: > > > > > > Hi Sugosh,

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

2022-08-19 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 23:19, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 18 Aug 2022 at 05:39, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 18 Aug 2022 at 08:51, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH v8 05/13] stm32mp1: dk2: Add image information for capsule updates

2022-08-18 Thread Sughosh Ganu
hi Yann, On Thu, 18 Aug 2022 at 13:35, Yann Gautier wrote: > > On 8/17/22 14:43, Sughosh Ganu wrote: > > Enabling capsule update functionality on the platform requires > > populating information on the images that are to be updated using the > > functionality.

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

2022-08-18 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 08:51, Simon Glass wrote: > > Hi Sugosh, > > On Wed, 17 Aug 2022 at 06:44, Sughosh Ganu wrote: > > > > Add a command to read the metadata as specified in the FWU > > specification and print the fields of the metadata. >

Re: [PATCH v8 08/13] FWU: Add boot time checks as highlighted by the FWU specification

2022-08-18 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 08:51, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 17 Aug 2022 at 06:44, Sughosh Ganu wrote: > > > > The FWU Multi Bank Update specification requires the Update Agent to > > carry out certain checks at the time of platf

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

2022-08-18 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 08:51, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 17 Aug 2022 at 06:44, Sughosh Ganu wrote: > > > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, on

Re: [PATCH v8 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-08-18 Thread Sughosh Ganu
hi Simon, On Thu, 18 Aug 2022 at 06:43, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 17 Aug 2022 at 06:44, Sughosh Ganu wrote: > > > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, whic

Re: [PATCH v8 06/13] FWU: Add helper functions for accessing FWU metadata

2022-08-17 Thread Sughosh Ganu
On Wed, 17 Aug 2022 at 22:30, Jassi Brar wrote: > > On Wed, 17 Aug 2022 at 07:44, Sughosh Ganu wrote: > . > > diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c > > new file mode 100644 > > index 00..9808036eec > > --- /dev/null > >

[PATCH v8 13/13] FWU: doc: Add documentation for the FWU feature

2022-08-17 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 V7: * Handle the various review comments from

[PATCH v8 12/13] mkeficapsule: Add support for setting OEM flags in capsule header

2022-08-17 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V7: 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 v8 11/13] mkeficapsule: Add support for generating empty capsules

2022-08-17 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu --- Changes since V7: * Modify the logic to check the setting of both -A and -R options being passed to the tool, as suggested by Ilias. doc/mkeficapsule.1 | 29

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

2022-08-17 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 V7: None cmd/Kconfig | 7 + cmd/Makefile| 1 + cmd/fwu_mdata.c | 80

[PATCH v8 09/13] FWU: Add support for the FWU Multi Bank Update feature

2022-08-17 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V7: * Introduce a new function fwu_to_efi_error() and check for all errors returned by the fwu API's through this function, as suggested by Ilias. * Call fwu_trial_state_ctr_start() only

[PATCH v8 08/13] FWU: Add boot time checks as highlighted by the FWU specification

2022-08-17 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. Add these checks in the board initialisation sequence, invoked after relocation. Signed-off-by: Sughosh Ganu --- Changes since V7: * Introduce

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

2022-08-17 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 V7: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5

[PATCH v8 06/13] FWU: Add helper functions for accessing FWU metadata

2022-08-17 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 V7: * Moved the API's

[PATCH v8 05/13] stm32mp1: dk2: Add image information for capsule updates

2022-08-17 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 V7: None

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

2022-08-17 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 v8 03/13] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-08-17 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V7: None drivers/fwu-mdata/Kconfig | 9 + drivers/fwu-mdata/Makefile| 1 + drivers/fwu-mdata/fwu_mdata_gpt_blk.c | 410 ++ include/fwu.h

[PATCH v8 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-08-17 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 V7: * Rephrased the error message in fwu_update_active_index as per suggestion

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

2022-08-17 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt --- Changes since V7: 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 v8 00/13] FWU: Add FWU Multi Bank Update feature support

2022-08-17 Thread Sughosh Ganu
is supposed to accept/reject the updated images. * Modify the logic to check the setting of both -A and -R options being passed to the tool, as suggested by Ilias. * Handle the various review comments from Heinrich. Sughosh Ganu (13): dt/bindings: Add bindings for GPT based FWU Metadata storage

Re: [PATCH v7 08/13] FWU: Add boot time checks as highlighted by the FWU specification

2022-07-27 Thread Sughosh Ganu
hi Ilias, On Wed, 20 Jul 2022 at 13:06, Ilias Apalodimas wrote: > > Hi Sughosh, > > > > > > + nimages = CONFIG_FWU_NUM_IMAGES_PER_BANK; > > > + active_bank = mdata->active_index; > > > + img_entry = >img_entry[0]; > > > + for (i = 0; i < nimages; i++) { > > > +

Re: [PATCH 0/5] FWU: Add support for mtd backed feature on DeveloperBox

2022-07-25 Thread Sughosh Ganu
ar (2): > dt: fwu: developerbox: enable fwu banks and mdata regions > fwu: DeveloperBox: add support for FWU > > Sughosh Ganu (3): > dt/bindings: Add bindings for FWU Metadata mtd storage > FWU: Add FWU metadata access driver for MTD storage regions > FWU: mtd: Add help

Re: [PATCH 1/5] dt/bindings: Add bindings for FWU Metadata mtd storage

2022-07-25 Thread Sughosh Ganu
On Fri, 22 Jul 2022 at 23:13, wrote: > > From: Sughosh Ganu > > Add bindings needed for accessing the FWU metadata regions. > These include the compatible string which point to the access > method, the actual device which stores the FWU metadata and > the offsets for

Re: [PATCH v7 06/13] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-07-22 Thread Sughosh Ganu
On Fri, 22 Jul 2022 at 09:09, Jassi Brar wrote: > > On Thu, 14 Jul 2022 at 13:40, Sughosh Ganu wrote: > > > > Add helper functions needed for accessing the FWU metadata which > > contains information on the updatable images. These functions have > > been added for t

[PATCH v8 8/8] test: rng: Add a UT testcase for the rng command

2022-07-22 Thread Sughosh Ganu
The 'rng' command dumps a number of random bytes on the console. Add a set of tests for the 'rng' command. The test function performs basic sanity testing of the command. Since a unit test is being added for the command, enable it by default in the sandbox platforms. Signed-off-by: Sughosh Ganu

[PATCH v8 7/8] doc: rng: Add documentation for the rng command

2022-07-22 Thread Sughosh Ganu
Add a usage document for the 'rng' u-boot command. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V7: None doc/usage/cmd/rng.rst | 26 ++ doc/usage/index.rst | 1 + 2 files changed, 27 insertions(+) create mode

[PATCH v8 6/8] cmd: rng: Use a statically allocated array for random bytes

2022-07-22 Thread Sughosh Ganu
Use a statically allocated buffer on stack instead of using malloc for reading the random bytes. Using a local array is faster than allocating heap memory on every initiation of the command. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V7

[PATCH v8 5/8] cmd: rng: Add support for selecting RNG device

2022-07-22 Thread Sughosh Ganu
through the TPM chip. Extend the 'rng' command so that the user can provide the RNG device number from which the random bytes are to be read. This will be the device index under the RNG uclass. Signed-off-by: Sughosh Ganu Tested-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- Changes

[PATCH v8 4/8] tpm: Add the RNG child device

2022-07-22 Thread Sughosh Ganu
to be added. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V7: * Added a paragraph in the commit message highlighting the absence of the compatible string in the RNG driver, as suggested by Simon. * Rearranged the inclusion of headers as per the coding style

[PATCH v8 3/8] tpm: rng: Add driver model interface for TPM RNG device

2022-07-22 Thread Sughosh Ganu
to comply with the driver model api. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V7: None drivers/rng/Kconfig | 9 + drivers/rng/Makefile | 1 + drivers/rng/tpm_rng.c | 23 +++ lib/Kconfig | 1 + lib/tpm_api.c

[PATCH v8 2/8] efi_loader: initialize the RNG protocol after the TCC2

2022-07-22 Thread Sughosh Ganu
From: Ilias Apalodimas Due to U-Boot's lazy binding the RNG presented by the TCG is not available until the EFI_TCG2 protocol has been initialized. Since the TPM has a built-in RNG device we can use for the OS randomization, move the RNG protocol installation after the TCG. Signed-off-by:

[PATCH v8 1/8] tpm: Export the TPM-version functions

2022-07-22 Thread Sughosh Ganu
From: Simon Glass These functions should really be available outside the TPM code, so that other callers can find out which version the TPM is. Rename them to have a tpm_ prefix() and add them to the header file. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V7:

[PATCH v8 0/8] tpm: rng: Move TPM RNG functionality to driver model

2022-07-22 Thread Sughosh Ganu
the TPM-version functions Sughosh Ganu (6): tpm: rng: Add driver model interface for TPM RNG device tpm: Add the RNG child device cmd: rng: Add support for selecting RNG device cmd: rng: Use a statically allocated array for random bytes doc: rng: Add documentation for the rng command

Re: [PATCH v7 5/7] cmd: rng: Use a statically allocated array for random bytes

2022-07-21 Thread Sughosh Ganu
anks. -sughosh > > Thanks > /Ilias > > On Wed, 20 Jul 2022 at 15:30, Sughosh Ganu wrote: > > > > Use a statically allocated buffer on stack instead of using malloc for > > reading the random bytes. Using a local array is faster than > > allocating heap memory

[PATCH v7 7/7] test: rng: Add a UT testcase for the rng command

2022-07-20 Thread Sughosh Ganu
The 'rng' command dumps a number of random bytes on the console. Add a set of tests for the 'rng' command. The test function performs basic sanity testing of the command. Since a unit test is being added for the command, enable it by default in the sandbox platforms. Signed-off-by: Sughosh Ganu

[PATCH v7 6/7] doc: rng: Add documentation for the rng command

2022-07-20 Thread Sughosh Ganu
Add a usage document for the 'rng' u-boot command. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V6: None doc/usage/cmd/rng.rst | 26 ++ doc/usage/index.rst | 1 + 2 files changed, 27 insertions(+) create mode

[PATCH v7 5/7] cmd: rng: Use a statically allocated array for random bytes

2022-07-20 Thread Sughosh Ganu
Use a statically allocated buffer on stack instead of using malloc for reading the random bytes. Using a local array is faster than allocating heap memory on every initiation of the command. Signed-off-by: Sughosh Ganu --- Changes since V6: None cmd/rng.c | 17 +++-- 1 file changed

[PATCH v7 4/7] cmd: rng: Add support for selecting RNG device

2022-07-20 Thread Sughosh Ganu
through the TPM chip. Extend the 'rng' command so that the user can provide the RNG device number from which the random bytes are to be read. This will be the device index under the RNG uclass. Signed-off-by: Sughosh Ganu Tested-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- Changes

[PATCH v7 3/7] tpm: Add the RNG child device

2022-07-20 Thread Sughosh Ganu
randomisation through the EFI_RNG_PROTOCOL interface. Signed-off-by: Sughosh Ganu --- Changes since V6: None drivers/tpm/tpm-uclass.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c index

[PATCH v7 2/7] tpm: rng: Add driver model interface for TPM RNG device

2022-07-20 Thread Sughosh Ganu
to comply with the driver model api. Signed-off-by: Sughosh Ganu --- Changes since V6: * Remove the changes made in tpm-v[12].c to return -EIO instead of TPM_LIB_ERROR as suggested by Simon drivers/rng/Kconfig | 9 + drivers/rng/Makefile | 1 + drivers/rng/tpm_rng.c | 23

[PATCH v7 1/7] tpm: Export the TPM-version functions

2022-07-20 Thread Sughosh Ganu
From: Simon Glass These functions should really be available outside the TPM code, so that other callers can find out which version the TPM is. Rename them to have a tpm_ prefix() and add them to the header file. Signed-off-by: Simon Glass --- Changes since V6: None include/tpm_api.h | 10

[PATCH v7 0/7] tpm: rng: Move TPM RNG functionality to driver model

2022-07-20 Thread Sughosh Ganu
Sughosh Ganu (6): tpm: rng: Add driver model interface for TPM RNG device tpm: Add the RNG child device cmd: rng: Add support for selecting RNG device cmd: rng: Use a statically allocated array for random bytes doc: rng: Add documentation for the rng command test: rng: Add a UT testcase

Re: [PATCH v7 12/13] mkeficapsule: Add support for setting OEM flags in capsule header

2022-07-17 Thread Sughosh Ganu
hi Ilias, On Fri, 15 Jul 2022 at 22:11, Ilias Apalodimas wrote: > > Hi Sughosh, > > On Thu, 14 Jul 2022 at 21:40, Sughosh Ganu wrote: > > > > Add support for setting OEM flags in the capsule header. As per the > > UEFI specification, bits 0-15 of the flags member

Re: [PATCH v7 01/13] dt/bindings: Add bindings for FWU Metadata storage device

2022-07-17 Thread Sughosh Ganu
On Sun, 17 Jul 2022 at 02:43, Jassi Brar wrote: > > On Thu, 14 Jul 2022 at 13:39, Sughosh Ganu wrote: > > > > Add bindings needed for accessing the FWU metadata partitions. These > > include the compatible string which point to the access method and the > > actu

[PATCH v7 13/13] FWU: doc: Add documentation for the FWU feature

2022-07-14 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 V6: None doc/develop/uefi/fwu_updates.rst

[PATCH v7 12/13] mkeficapsule: Add support for setting OEM flags in capsule header

2022-07-14 Thread Sughosh Ganu
-by: Sughosh Ganu --- Changes since V6: 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/mkeficapsule.1 +++ b/doc

[PATCH v7 11/13] mkeficapsule: Add support for generating empty capsules

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

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

2022-07-14 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 --- Changes since V6: None cmd/Kconfig | 7 + cmd/Makefile| 1 + cmd/fwu_mdata.c | 80 + 3

[PATCH v7 09/13] FWU: Add support for the FWU Multi Bank Update feature

2022-07-14 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V6: None include/fwu.h| 10 ++ lib/Kconfig | 6 + lib/Makefile | 1 + lib/efi_loader/efi_capsule.c | 231

[PATCH v7 08/13] FWU: Add boot time checks as highlighted by the FWU specification

2022-07-14 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. Add these checks in the board initialisation sequence, invoked after relocation. Signed-off-by: Sughosh Ganu --- Changes since V6: None common/board_r.c

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

2022-07-14 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 --- Changes since V6: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5 + board/st/stm32mp1/stm32mp1.c

[PATCH v7 06/13] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-07-14 Thread Sughosh Ganu
Add helper functions needed for accessing the FWU metadata which contains information on the updatable images. These functions have been added for the STM32MP157C-DK2 board which has the updatable images on the uSD card, formatted as GPT partitions. Signed-off-by: Sughosh Ganu Reviewed

[PATCH v7 05/13] stm32mp1: dk2: Add image information for capsule updates

2022-07-14 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 --- Changes since V6: * s/STM32MP1/STM32MP15/ as suggested

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

2022-07-14 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 v7 03/13] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-07-14 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V6: * Define the LOG_CATEGORY macro as suggested by Patrick drivers/fwu-mdata/Kconfig | 9 + drivers/fwu-mdata/Makefile| 1 + drivers/fwu-mdata/fwu_mdata_gpt_blk.c

[PATCH v7 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-07-14 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 V6: * Define the LOG_CATEGORY macro as suggested by Patrick * Add some

[PATCH v7 01/13] dt/bindings: Add bindings for FWU Metadata storage device

2022-07-14 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu --- Changes since V6: None .../firmware/fwu-mdata.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata.yaml diff --git a/doc/device-tree-bindings/firmware/fwu-mdata.yaml

[PATCH v7 00/13] FWU: Add FWU Multi Bank Update feature support

2022-07-14 Thread Sughosh Ganu
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

Re: [PATCH v6 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-07-13 Thread Sughosh Ganu
hi Patrick, On Wed, 13 Jul 2022 at 18:42, Patrick DELAUNAY wrote: > > Hi, > > On 7/4/22 07:16, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, which is stored on > &

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

2022-07-13 Thread Sughosh Ganu
hi Patrick, On Wed, 13 Jul 2022 at 18:47, Patrick DELAUNAY wrote: > > Hi, > > On 7/4/22 07:16, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, on a separate > > parti

Re: [PATCH v6 2/7] tpm: rng: Add driver model interface for TPM RNG device

2022-07-05 Thread Sughosh Ganu
hi Simon, On Tue, 5 Jul 2022 at 15:17, Simon Glass wrote: > > Hi Sughosh, > > On Mon, 4 Jul 2022 at 07:35, Sughosh Ganu wrote: > > > > The TPM device has a builtin random number generator(RNG) > > functionality. Expose the RNG functions of the TPM device to the >

[PATCH v6 7/7] test: rng: Add a UT testcase for the rng command

2022-07-04 Thread Sughosh Ganu
Signed-off-by: Sughosh Ganu --- cmd/Kconfig | 1 + test/dm/rng.c | 29 + 2 files changed, 30 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 09193b61b9..eee5d44348 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1916,6 +1916,7 @@ config CMD_GETTIME config

[PATCH v6 6/7] doc: rng: Add documentation for the rng command

2022-07-04 Thread Sughosh Ganu
Add a usage document for the 'rng' u-boot command. Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass Signed-off-by: Sughosh Ganu --- Changes since V5: None doc/usage/cmd/rng.rst | 26 ++ doc/usage/index.rst | 1 + 2 files changed, 27 insertions(+) create mode

[PATCH v6 5/7] cmd: rng: Use a statically allocated array for random bytes

2022-07-04 Thread Sughosh Ganu
Use a statically allocated buffer on stack instead of using malloc for reading the random bytes. Using a local array is faster than allocating heap memory on every initiation of the command. Signed-off-by: Sughosh Ganu --- Changes since V5: None cmd/rng.c | 17 +++-- 1 file changed

[PATCH v6 4/7] cmd: rng: Add support for selecting RNG device

2022-07-04 Thread Sughosh Ganu
through the TPM chip. Extend the 'rng' command so that the user can provide the RNG device number from which the random bytes are to be read. This will be the device index under the RNG uclass. Tested-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas Signed-off-by: Sughosh Ganu --- Changes

[PATCH v6 3/7] tpm: Add the RNG child device

2022-07-04 Thread Sughosh Ganu
randomisation through the EFI_RNG_PROTOCOL interface. Signed-off-by: Sughosh Ganu --- Changes since V5: * Check if the TPM RNG device has already been added, through a call to device_find_first_child_by_uclass() drivers/tpm/tpm-uclass.c | 37 + 1 file changed, 33

[PATCH v6 2/7] tpm: rng: Add driver model interface for TPM RNG device

2022-07-04 Thread Sughosh Ganu
to comply with the driver model api. Signed-off-by: Sughosh Ganu --- Changes since V5: * Use the dev_get_parent() interface for getting the TPM device when calling the tpm_get_random() function drivers/rng/Kconfig | 11 +++ drivers/rng/Makefile | 1 + drivers/rng/tpm_rng.c | 23

[PATCH v6 0/7] tpm: rng: Move TPM RNG functionality to driver model

2022-07-04 Thread Sughosh Ganu
Sughosh Ganu (6): tpm: rng: Add driver model interface for TPM RNG device tpm: Add the RNG child device cmd: rng: Add support for selecting RNG device cmd: rng: Use a statically allocated array for random bytes doc: rng: Add documentation for the rng command test: rng: Add a UT testcase

[PATCH v6 1/7] tpm: Export the TPM-version functions

2022-07-04 Thread Sughosh Ganu
From: Simon Glass These functions should really be available outside the TPM code, so that other callers can find out which version the TPM is. Rename them to have a tpm_ prefix() and add them to the header file. Signed-off-by: Simon Glass --- Changes since V5: None include/tpm_api.h | 10

[PATCH v6 13/13] FWU: doc: Add documentation for the FWU feature

2022-07-03 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 V5: * Add some description about the reasoning

[PATCH v6 12/13] mkeficapsule: Add support for setting OEM flags in capsule header

2022-07-03 Thread Sughosh Ganu
-by: Sughosh Ganu --- Changes since V5: 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/mkeficapsule.1 +++ b/doc

[PATCH v6 11/13] mkeficapsule: Add support for generating empty capsules

2022-07-03 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu --- Changes since V5: * Use capsule_type instead of capsule variable that was created earlier to check for the type of capsule * Remove use of payload variable

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

2022-07-03 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 --- Changes since V5: * Do a metadata validity check by calling fwu_mdata_check() before printing the FWU metadata as suggested by Michal * Use ret and res

[PATCH v6 09/13] FWU: Add support for the FWU Multi Bank Update feature

2022-07-03 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V5: * Use u"TrialStateCtr" as suggested by Patrick include/fwu.h| 10 ++ lib/Kconfig | 6 + lib/Makefile | 1 + lib/

[PATCH v6 08/13] FWU: Add boot time checks as highlighted by the FWU specification

2022-07-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. Add these checks in the board initialisation sequence, invoked after relocation. Signed-off-by: Sughosh Ganu --- Changes since V5: * Use u"TrialSta

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

2022-07-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 --- Changes since V5: * Shuffled the location of the TAMP_FWU_* macros as suggested by Patrick arch/arm/mach

[PATCH v6 06/13] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-07-03 Thread Sughosh Ganu
Add helper functions needed for accessing the FWU metadata which contains information on the updatable images. These functions have been added for the STM32MP157C-DK2 board which has the updatable images on the uSD card, formatted as GPT partitions. Signed-off-by: Sughosh Ganu --- Changes since

[PATCH v6 05/13] stm32mp1: dk2: Add image information for capsule updates

2022-07-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 --- Changes since V5: None board/st/stm32mp1/stm32mp1.c | 19

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

2022-07-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 v6 03/13] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-07-03 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu --- Changes since V5: * Changed the logic to store the GPT partitioned block device through a priv structure as suggested by Patrick * Used dev_read_prop() to get the phandle_p instead of ofnode_get_property() used earlier as suggested

[PATCH v6 02/13] FWU: Add FWU metadata structure and driver for accessing metadata

2022-07-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 --- Changes since V5: * Change the parameter to the function fwu_plat_get_alt_num to pass the FWU udevice pointer instead

[PATCH v6 01/13] dt/bindings: Add bindings for FWU Metadata storage device

2022-07-03 Thread Sughosh Ganu
devices. Signed-off-by: Sughosh Ganu --- Changes since V5: * Changed to yaml file from txt as per review comment .../firmware/fwu-mdata.yaml | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata.yaml diff --git

[PATCH v6 00/13] FWU: Add FWU Multi Bank Update feature support

2022-07-03 Thread Sughosh Ganu
Etienne * Initialise the struct efi_capsule_header as suggested by Etienne * Add some description about the reasoning for accept capsule needing image GUID as suggested by Takahiro Sughosh Ganu (13): dt/bindings: Add bindings for FWU Metadata storage device FWU: Add FWU metadata structure and

Re: [PATCH v5 08/23] FWU: Add boot time checks as highlighted by the FWU specification

2022-06-28 Thread Sughosh Ganu
hi Etienne, On Thu, 23 Jun 2022 at 18:02, Etienne Carriere wrote: > > Hi Sughosh, > > On Thu, 23 Jun 2022 at 11:46, Sughosh Ganu wrote: > > > > hi Etienne, > > > > On Tue, 21 Jun 2022 at 16:26, Etienne Carriere > > wrote: > > > > > >

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

2022-06-28 Thread Sughosh Ganu
hi Etienne, On Tue, 21 Jun 2022 at 16:26, Etienne Carriere wrote: > > Hello Sughosh, > > On Thu, 9 Jun 2022 at 14:30, Sughosh Ganu wrote: > > > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadat

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

2022-06-28 Thread Sughosh Ganu
. On Tue, 21 Jun 2022 at 15:04, Patrick DELAUNAY wrote: > > Hi, > > On 6/9/22 14:29, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, on a separate > > partition. Add a drive

Re: [PATCH v5 08/23] FWU: Add boot time checks as highlighted by the FWU specification

2022-06-23 Thread Sughosh Ganu
hi Patrick, On Tue, 21 Jun 2022 at 17:16, Patrick DELAUNAY wrote: > > Hi, > > > On 6/9/22 14:29, Sughosh Ganu wrote: > > The FWU Multi Bank Update specification requires the Update Agent to > > carry out certain checks at the time of platform boot. The Update >

Re: [PATCH v5 08/23] FWU: Add boot time checks as highlighted by the FWU specification

2022-06-23 Thread Sughosh Ganu
hi Etienne, On Tue, 21 Jun 2022 at 16:26, Etienne Carriere wrote: > > Hi Sughosh, > > On Thu, 9 Jun 2022 at 14:31, Sughosh Ganu wrote: > > > > The FWU Multi Bank Update specification requires the Update Agent to > > carry out certain checks at the time of platf

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

2022-06-23 Thread Sughosh Ganu
On Tue, 21 Jun 2022 at 16:57, Patrick DELAUNAY wrote: > > Hi, > > On 6/9/22 14:29, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature allows the platform to boot the > > firmware images from one of the partitions(banks). The first stage > > bootloader(fsbl

Re: [PATCH v5 02/23] FWU: Add FWU metadata structure and driver for accessing metadata

2022-06-23 Thread Sughosh Ganu
hi Etienne, On Tue, 21 Jun 2022 at 16:24, Etienne Carriere wrote: > > Hello Sughosh, > > > > On Thu, 9 Jun 2022 at 14:30, Sughosh Ganu wrote: > > > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as p

Re: [PATCH v5 06/23] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-06-23 Thread Sughosh Ganu
On Tue, 21 Jun 2022 at 15:19, Patrick DELAUNAY wrote: > > Hi, > > On 6/9/22 14:29, Sughosh Ganu wrote: > > Add helper functions needed for accessing the FWU metadata which > > contains information on the updatable images. These functions have > > been added for the S

Re: [PATCH v5 00/23] FWU: Add FWU Multi Bank Update feature support

2022-06-21 Thread Sughosh Ganu
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 impl

Re: [PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-17 Thread Sughosh Ganu
Takahiro, On Fri, 17 Jun 2022 at 06:16, Takahiro Akashi wrote: > > Sughosh, > > On Thu, Jun 16, 2022 at 12:42:08PM +0530, Sughosh Ganu wrote: > > hi Takahiro, > > > > On Thu, 16 Jun 2022 at 06:31, Takahiro Akashi > > wrote: > > > > > > S

Re: [PATCH v5 23/23] sandbox: fwu: Add support for testing FWU feature on sandbox

2022-06-17 Thread Sughosh Ganu
On Fri, 17 Jun 2022 at 06:38, Takahiro Akashi wrote: > > Sughosh, > > On Wed, Jun 15, 2022 at 05:40:12PM +0530, Sughosh Ganu wrote: > > On Wed, 15 Jun 2022 at 11:07, Takahiro Akashi > > wrote: > > > > > > On Thu, Jun 09, 2022 at 06:00:10PM +0530, Sug

Re: [PATCH v5 01/23] dt/bindings: Add bindings for FWU Metadata storage device

2022-06-17 Thread Sughosh Ganu
On Thu, 16 Jun 2022 at 19:04, Michal Simek wrote: > > čt 9. 6. 2022 v 14:30 odesílatel Sughosh Ganu > napsal: > > > > Add bindings needed for accessing the FWU metadata partitions. These > > include the compatible string which point to the access method and the >

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