Re: [PATCH V3 2/2] ARM: dts: rockchip: rk3588s-u-boot: Add rng node

2023-04-17 Thread Sughosh Ganu
On Thu, 13 Apr 2023 at 19:43, Chris Morgan wrote: > > From: Chris Morgan > > Add a node for the trng found on RK3588 SoCs. > > Changes in V3: > - Added Reviewed-By tag. > > Changes in V2: > - None > > Signed-off-by: Chris Morgan > Reviewed-by: Kever Yang > --- >

Re: [PATCH V3 2/2] ARM: dts: rockchip: rk3588s-u-boot: Add rng node

2023-04-17 Thread Sughosh Ganu
patch. Other than that Acked-by: Sughosh Ganu -sughosh > > Signed-off-by: Chris Morgan > Reviewed-by: Kever Yang > --- > arch/arm/dts/rk3588s-u-boot.dtsi | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi > b/arch/a

Re: [PATCH V3 1/2] rockchip: rng: add trngv1 for rk3588

2023-04-17 Thread Sughosh Ganu
hi Chris, On Thu, 13 Apr 2023 at 19:43, Chris Morgan wrote: > > From: Chris Morgan > > This adds support for the TRNG found in the RK3588 SoC to the > rockchip_rng driver so that it can be used for things such as > seeding randomness to Linux. > > Changes in V3: > - Moved notes from commit to

Re: [PATCH] qemu: dfu: Correct memset call in set_dfu_alt_info

2023-04-07 Thread Sughosh Ganu
> As we're calling memset with the length set to the size of the pointer > and not the size of the buffer. Correct this with a call of the size of > the buffer itself. > > Signed-off-by: Tom Rini > --- Acked-by: Sughosh Ganu -sughosh > Cc: Tuomas Tynkkynen > Cc: Sugho

Re: [PATCH v6 0/7] fwu: gpt: implement read_mdata and write_mdata callbacks

2023-03-24 Thread Sughosh Ganu
| 105 ++- > drivers/fwu-mdata/fwu-mdata-uclass.c | 151 + > drivers/fwu-mdata/gpt_blk.c | 175 +++ > include/fwu.h | 198 ++-- > lib/fwu_updates/fwu.c | 296 -- > test/dm/fwu_mdata.c | 22 +- > 7 files changed, 299 insertions(+), 665 deletions(-) Tested the changes on the STM32MP1 DK2 board. Tested-by: Sughosh Ganu -sughosh

Re: [PATCH v6 5/7] fwu: meta-data: switch to management by common code

2023-03-16 Thread Sughosh Ganu
On Thu, 16 Mar 2023 at 13:56, Ilias Apalodimas wrote: > > On Mon, Mar 06, 2023 at 05:18:41PM -0600, jassisinghb...@gmail.com wrote: > > From: Jassi Brar > > > > The common code can now read, verify and fix meta-data copies > > while exposing one consistent structure to users. > > Only the

Re: [PATCHv3 2/5] FWU: mtd: Add helper functions for accessing FWU metadata

2023-01-13 Thread Sughosh Ganu
On Mon, 9 Jan 2023 at 06:36, Jassi Brar wrote: > > From: Sughosh Ganu > > Add helper functions needed for accessing the FWU metadata which > contains information on the updatable images. > > Signed-off-by: Sughosh Ganu > Signed-off-by: Jassi Brar > --- This

Re: [PATCHv3 1/5] FWU: Add FWU metadata access driver for MTD storage regions

2023-01-13 Thread Sughosh Ganu
On Mon, 9 Jan 2023 at 06:36, Jassi Brar wrote: > > From: Sughosh Ganu > > In the FWU Multi Bank Update feature, the information about the > updatable images is stored as part of the metadata, on a separate > region. Add a driver for reading from and writing to the metadata &g

[PATCH] sandbox: Move the capsule GUID declarations to board file

2022-11-10 Thread Sughosh Ganu
The sandbox config file is to be removed. Move the GUID declarations needed for capsule update functionality to the board file where they are used. Signed-off-by: Sughosh Ganu --- board/sandbox/sandbox.c | 13 + include/configs/sandbox.h | 13 - 2 files changed, 13

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

2022-11-10 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 Reviewed-by: Kever Yang --- Changes since V5: None

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

2022-11-10 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 Reviewed-by: Kever Yang

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

2022-11-10 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 Reviewed-by: Kever Yang --- Changes since V4: * Get

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

2022-11-10 Thread Sughosh Ganu
through struct efi_capsule_update_info * Mark fw_images array as a static variable * Populate num_image_type_guids through ROCKPI4_UPDATABLE_IMAGES Sughosh Ganu (3): rockchip: capsule: Add functions for supporting capsule updates rockpi4: board: Add firmware image information for capsule

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

2022-11-08 Thread Sughosh Ganu
On Wed, 9 Nov 2022 at 10:52, AKASHI Takahiro wrote: > > On Tue, Nov 08, 2022 at 12:53:27PM +0530, 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 > > wou

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

2022-11-07 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 Reviewed-by: Kever Yang --- Changes since V3: None

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

2022-11-07 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 Reviewed-by: Kever Yang

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

2022-11-07 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 Reviewed-by: Kever Yang --- Changes since V3: * s

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

2022-11-07 Thread Sughosh Ganu
Changes since V3: * s/blk_get_if_type_name/blk_get_uclass_name as the API was changed in 8149b1500d8 Sughosh Ganu (3): rockchip: capsule: Add functions for supporting capsule updates rockpi4: board: Add firmware image information for capsule updates rockpi4: capsule: Enable UEFI capsule

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

2022-11-06 Thread Sughosh Ganu
hi Kever, On Wed, 2 Nov 2022 at 14:53, Kever Yang wrote: > > > On 2022/11/2 14:21, Sughosh Ganu wrote: > > hi Tom, > > > > On Wed, 14 Sept 2022 at 15:40, Sughosh Ganu wrote: > >> > >> Add capsule update support for the RockPi4B and RockPi4C >

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

2022-11-02 Thread Sughosh Ganu
hi Tom, On Wed, 2 Nov 2022 at 18:52, Tom Rini wrote: > > On Wed, Nov 02, 2022 at 05:23:48PM +0800, Kever Yang wrote: > > > > On 2022/11/2 14:21, Sughosh Ganu wrote: > > > hi Tom, > > > > > > On Wed, 14 Sept 2022 at 15:40, Sughosh Ganu > >

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

2022-11-02 Thread Sughosh Ganu
hi Tom, On Wed, 14 Sept 2022 at 15:40, Sughosh Ganu wrote: > > > Add capsule update support for the RockPi4B and RockPi4C > boards. Support is being added for updating the idbloader.img and > u-boot.itb firmware images on configurations with the firmware images > stored on G

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

2022-10-21 Thread Sughosh Ganu
hi Ilias, On Fri, 21 Oct 2022 at 20:38, Ilias Apalodimas wrote: > > Hi Sughosh, > > > > > #include > > #include > > @@ -44,6 +53,96 @@ static int fwu_get_dev_mdata(struct udevice **dev, > > struct fwu_mdata *mdata) > > return ret; > > } > > > > +static int trial_counter_update(u16

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

2022-10-21 Thread Sughosh Ganu
hi Ilias, On Fri, 21 Oct 2022 at 20:33, Ilias Apalodimas wrote: > > Hi Sughosh > > > +{ > > + int ret; > > + u32 len, blk_start, blkcnt; > > + struct disk_partition info; > > + > > + ALLOC_CACHE_ALIGN_BUFFER_PAD(struct fwu_mdata, mdata_aligned, 1, > > +

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

2022-10-21 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 Acked-by: Etienne Carriere --- Changes since V14: * s/updation

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

2022-10-21 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Acked-by: Etienne Carriere --- Changes since V14: * Add a range check for the oemflags passed as suggested by Etienne doc/mkeficapsule.1 | 4 tools/mkeficapsule.c | 22 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff

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

2022-10-21 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 V14: None cmd/Kconfig | 6 +++ cmd/Makefile

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

2022-10-21 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu Acked-by: Ilias Apalodimas Acked-by: Etienne Carriere --- Changes since V14: None doc/mkeficapsule.1 | 29 + tools/eficapsule.h | 8 tools/mkeficapsule.c

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

2022-10-21 Thread Sughosh Ganu
the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V14: * Initialise the return value to EFI_INVALID_PARAMETER in fwu_empty_capsule_process() and get rid of the else part as suggested by Ilias * Remove the superfluous assignment

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

2022-10-21 Thread Sughosh Ganu
-- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu Suggested-by: Heinrich Schuchardt Acked-by: Ilias Apalodimas --- Changes since V14: None arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 7

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

2022-10-21 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 V14

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

2022-10-21 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 Acked-by: Etienne Carriere

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

2022-10-21 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 Acked-by: Etienne Carriere --- Changes since V14: None arch/arm/mach-stm32mp/include

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

2022-10-21 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 v15 06/15] FWU: Add helper functions for accessing FWU metadata

2022-10-21 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 Reviewed

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

2022-10-21 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 V14: * Copy the primary metadata copy to the secondary metadata partition when

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

2022-10-21 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c dk2 and ev1 boards, 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

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

2022-10-21 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V14: * Remove the check for nparts while iterating over the partitions as suggested by Ilias * Drop the superfluous braces in gpt_get_mdata_disk_part() * Add a NULL check for mdata

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

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

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

2022-10-21 Thread Sughosh Ganu
application of empty capsules only in trial state * Add a range check for the oemflags passed as suggested by Etienne * s/updation/update/ 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

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

2022-10-20 Thread Sughosh Ganu
On Thu, 20 Oct 2022 at 19:25, Etienne Carriere wrote: > > On Tue, 18 Oct 2022 at 13:44, 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 of the capsule > > header c

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

2022-10-19 Thread Sughosh Ganu
hi Ilias, On Thu, 20 Oct 2022 at 01:26, Ilias Apalodimas wrote: > > Hi Sughosh > > > [...] > > > + * > > + * Read both the metadata copies from the storage media, verify their > > checksum, > > + * and ascertain that both copies match. If one of the copies has gone bad, > > + * restore it from

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

2022-10-19 Thread Sughosh Ganu
hi Ilias, On Thu, 20 Oct 2022 at 01:31, Ilias Apalodimas wrote: > > Hi Sughosh, > > On Tue, Oct 18, 2022 at 05:13:31PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update specification requires the Update Agent to > > carry out certain checks at the time of p

Re: Please drop the sandbox.h stuff

2022-10-18 Thread Sughosh Ganu
hi Simon, On Tue, 18 Oct 2022 at 20:18, Simon Glass wrote: > > Hi Sughosh, > > I just noticed some GUIDs added to the include/configs/sandbox.h file. > These files are being removed so we should not be adding to them. > > Please can you send a patch to drop this or move it elsewhere? Will take

Re: [PATCH] thermal: sandbox: Don't build sandbox thermal driver for sandbox64

2022-10-18 Thread Sughosh Ganu
hi Simon, On Tue, 18 Oct 2022 at 13:34, Sughosh Ganu wrote: > > The sandbox64 defconfig does not enable the thermal uclass, but builds > the thermal sandbox driver. This breaks booting the sandbox64 variant > with the test device tree. Do not build the driver for the sandbox

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

2022-10-18 Thread Sughosh Ganu
hi Ilias, On Tue, 18 Oct 2022 at 20:38, Ilias Apalodimas wrote: > > Hi Sughosh, > > [...] > > > +}; > > + > > +static int gpt_get_mdata_partitions(struct blk_desc *desc, > > + uint mdata_parts[2]) > > +{ > > + int i, ret; > > + u32 nparts; > > +

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

2022-10-18 Thread Sughosh Ganu
On Tue, 18 Oct 2022 at 22:29, Simon Glass wrote: > > Hi, > > On Tue, 18 Oct 2022 at 05:44, Sughosh Ganu wrote: > > > > Add test cases for accessing the FWU Metadata on the sandbox > > platform. The sandbox platform also uses the metadata access driver > &g

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

2022-10-18 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 V13: None doc/develop/uefi/fwu_updates.rst

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

2022-10-18 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V13: 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 v14 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-10-18 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V13: * Add a check for the accept capsule in fwu_empty_capsule_process() as suggested by Ilias * Return EFI_NOT_FOUND instead of EFI_DEVICE_ERROR for -ENODEV drivers/Kconfig

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

2022-10-18 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 V13: * Call fwu_check_mdata_validity() instead of fwu_mdata_check() cmd

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

2022-10-18 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 V13: * Use uclass_first_device_err() to get the FWU metadata device * Call fwu_check_mdata_validity() instead of fwu_mdata_check() arch/sandbox

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

2022-10-18 Thread Sughosh Ganu
://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu Acked-by: Ilias Apalodimas --- Changes since V13: None doc/mkeficapsule.1 | 29 + tools/eficapsule.h | 8 tools/mkeficapsule.c | 96

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

2022-10-18 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 V13

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

2022-10-18 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 V13: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5

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

2022-10-18 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 Reviewed

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

2022-10-18 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 V13: None

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

2022-10-18 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 V13: * Move the implementation of fwu_gpt_mdata_check() to a common function

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

2022-10-18 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 v14 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-10-18 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay --- Changes since V13: * Move the implementation of fwu_gpt_mdata_check() to a common function, fwu_check_mdata_validity() * Add GPT implementations for fwu_get_mdata_part_num(), fwu_read_mdata_partition

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

2022-10-18 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c dk2 and ev1 boards, 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

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

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

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

2022-10-18 Thread Sughosh Ganu
for -ENODEV * Call fwu_check_mdata_validity() instead of fwu_mdata_check() * Use uclass_first_device_err() to get the FWU metadata device * Call fwu_check_mdata_validity() instead of fwu_mdata_check() Sughosh Ganu (15): dt/bindings: Add bindings for GPT based FWU Metadata storage device FWU: Add FWU

[PATCH] thermal: sandbox: Enable thermal uclass for sandbox64 variant

2022-10-18 Thread Sughosh Ganu
to allow the test to be run on the sandbox64 variant. Signed-off-by: Sughosh Ganu --- configs/sandbox64_defconfig | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index ade1505439..2badf1c386 100644 --- a/configs

Re: [PATCH] thermal: sandbox: Don't build sandbox thermal driver for sandbox64

2022-10-18 Thread Sughosh Ganu
hi, On Tue, 18 Oct 2022 at 13:47, Robert Marko wrote: > > > > On Tue, Oct 18, 2022 at 10:04 AM Sughosh Ganu wrote: >> >> The sandbox64 defconfig does not enable the thermal uclass, but builds >> the thermal sandbox driver. This breaks booting the sandbox64 varian

[PATCH] thermal: sandbox: Don't build sandbox thermal driver for sandbox64

2022-10-18 Thread Sughosh Ganu
The sandbox64 defconfig does not enable the thermal uclass, but builds the thermal sandbox driver. This breaks booting the sandbox64 variant with the test device tree. Do not build the driver for the sandbox64 variant. Signed-off-by: Sughosh Ganu --- drivers/thermal/Makefile | 2 ++ 1 file

Unable to boot sandbox64 with test dtb

2022-10-18 Thread Sughosh Ganu
hi, Since "1fad2cb852 thermal: add sandbox driver", sandbox64 does not boot with the test device tree. Trying to boot with the -T option results in a crash. Creating new bloblist size 400 at c000 Error binding driver 'thermal-sandbox': -96 Some drivers failed to bind initcall sequence

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

2022-10-17 Thread Sughosh Ganu
hi Simon, On Fri, 14 Oct 2022 at 21:26, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 6 Oct 2022 at 03:07, 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 v13 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-10-17 Thread Sughosh Ganu
hi Ilias, On Fri, 14 Oct 2022 at 12:12, Ilias Apalodimas wrote: > > On Thu, Oct 06, 2022 at 02:36:24PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature supports updation of firmware images > > s/updation/updating Umm, is the current sentence wrong? The m

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

2022-10-14 Thread Sughosh Ganu
On Fri, 14 Oct 2022 at 13:29, Ilias Apalodimas wrote: > > [...] > > > > > > > +} > > > > > > + > > > > > > +static __maybe_unused efi_status_t fwu_empty_capsule_process( > > > > > > + struct efi_capsule_header *capsule) > > > > > > +{ > > > > > > + int status; > > > > > > + u32

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

2022-10-14 Thread Sughosh Ganu
hi Ilias, On Fri, 14 Oct 2022 at 13:02, Ilias Apalodimas wrote: > > On Fri, 14 Oct 2022 at 10:06, Sughosh Ganu wrote: > > > > On Fri, 14 Oct 2022 at 12:12, Ilias Apalodimas > > wrote: > > > > > > On Thu, Oct 06, 2022 at 02:36:24PM +0530, Sughosh Gan

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

2022-10-14 Thread Sughosh Ganu
On Fri, 14 Oct 2022 at 12:12, Ilias Apalodimas wrote: > > On Thu, Oct 06, 2022 at 02:36:24PM +0530, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature supports updation of firmware images > > s/updation/updating > > > to one of multiple sets(also called ban

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

2022-10-14 Thread Sughosh Ganu
On Fri, 14 Oct 2022 at 12:04, Ilias Apalodimas wrote: > > On Thu, Oct 06, 2022 at 02:36:23PM +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. The Update > > Agen

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

2022-10-14 Thread Sughosh Ganu
On Fri, 14 Oct 2022 at 11:46, Ilias Apalodimas wrote: > > On Thu, Oct 06, 2022 at 02:36:17PM +0530, 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.

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

2022-10-10 Thread Sughosh Ganu
hi Etienne, On Mon, 10 Oct 2022 at 11:53, Etienne Carriere wrote: > > Hi Sughosh, > > On Fri, 7 Oct 2022 at 05:16, Sughosh Ganu wrote: > > > > hi Etienne, > > > > On Thu, 6 Oct 2022 at 19:36, Etienne Carriere > > wrote: > > > > > >

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

2022-10-06 Thread Sughosh Ganu
hi Simon, On Fri, 7 Oct 2022 at 00:37, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 6 Oct 2022 at 03:07, Sughosh Ganu wrote: > > > > Add test cases for accessing the FWU Metadata on the sandbox > > platform. The sandbox platform also uses the metadata access

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

2022-10-06 Thread Sughosh Ganu
hi Etienne, On Thu, 6 Oct 2022 at 19:36, Etienne Carriere wrote: > > Hi Sughosh, > > On Thu, 6 Oct 2022 at 11:07, Sughosh Ganu wrote: > > > > Add test cases for accessing the FWU Metadata on the sandbox > > platform. The sandbox platform also uses the meta

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

2022-10-06 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 v13 14/15] mkeficapsule: Add support for setting OEM flags in capsule header

2022-10-06 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V12: 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 v13 13/15] mkeficapsule: Add support for generating empty capsules

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

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

2022-10-06 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 V12: None arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 7 +- board/sandbox/sandbox.c

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

2022-10-06 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 V12: None cmd/Kconfig | 6 +++ cmd/Makefile

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

2022-10-06 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V12: None drivers/Kconfig | 2 + drivers/Makefile | 1 + include/fwu.h | 30 + lib/Kconfig | 6 + lib/Makefile

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

2022-10-06 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 V12

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

2022-10-06 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 V12: None

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

2022-10-06 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 v13 07/15] FWU: STM32MP1: Add support to read boot index from backup register

2022-10-06 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 V12: None arch/arm/mach-stm32mp/include/mach/stm32.h | 5

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

2022-10-06 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 v13 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-10-06 Thread Sughosh Ganu
based partition scheme. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- Changes since V12: None drivers/fwu-mdata/Kconfig | 16 ++ drivers/fwu-mdata/Makefile | 8 + drivers/fwu-mdata/gpt_blk.c | 357

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

2022-10-06 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 v13 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-06 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 V12: None drivers/fwu-mdata/fwu-mdata-uclass.c

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

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

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

2022-10-06 Thread Sughosh Ganu
the return value of dfu_init_env_entities() * Explicitly mention about setting up the metadata partitions at the time of board provisioning * Put a reference in the uefi capsule update section to the fwu_updates.rst document Sughosh Ganu (15): dt/bindings: Add bindings for GPT based FWU Metadata

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

2022-10-04 Thread Sughosh Ganu
On Mon, 3 Oct 2022 at 21:20, Etienne Carriere wrote: > > On Mon, 3 Oct 2022 at 16:25, Sughosh Ganu wrote: > > > > Add weak functions for getting the update index value and dfu > > alternate number needed for FWU Multi Bank update > > functionality. > > > &

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

2022-10-04 Thread Sughosh Ganu
hi Takahiro, On Tue, 4 Oct 2022 at 08:24, Takahiro Akashi wrote: > > Sughosh, > > On Wed, Sep 28, 2022 at 02:59:56PM +0530, Sughosh Ganu wrote: > > Add documentation for the FWU Multi Bank Update feature. The document > > describes the steps needed for setting up the plat

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

2022-10-03 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 V11: * Describe the config

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

2022-10-03 Thread Sughosh Ganu
-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V11: 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 v12 13/15] mkeficapsule: Add support for generating empty capsules

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

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

2022-10-03 Thread Sughosh Ganu
-- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu Suggested-by: Heinrich Schuchardt --- arch/sandbox/Kconfig | 6 + arch/sandbox/dts/test.dts | 7 +- board/sandbox/sandbox.c | 8

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

2022-10-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 Reviewed-by: Ilias Apalodimas Reviewed-by: Etienne Carriere --- Changes since V11: None cmd/Kconfig | 6 +++ cmd/Makefile

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

2022-10-03 Thread Sughosh Ganu
to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu --- Changes since V11: None drivers/Kconfig | 2 + drivers/Makefile | 1 + include/fwu.h | 30 + lib/Kconfig | 6 + lib/Makefile

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