Re: [PATCH v2 2/4] doc: Document capsule generation through a config file

2024-04-23 Thread Sughosh Ganu
hi Heinrich, On Fri, 19 Apr 2024 at 13:01, Heinrich Schuchardt wrote: > > On 19.04.24 08:55, Sughosh Ganu wrote: > > The UEFI capsule can now be generated by specifying the capsule > > parameters through a config file. Highlight these changes in the > > documenta

Re: [PATCH v2 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2024-04-23 Thread Sughosh Ganu
hi Heinrich, On Fri, 19 Apr 2024 at 12:44, Heinrich Schuchardt wrote: > > On 19.04.24 08:55, Sughosh Ganu wrote: > > Add support for specifying the parameters needed for capsule > > generation through a config file, instead of passing them through > > command-line.

Re: [PATCH 01/10] board: ti: am62x: Init DRAM size in R5/A53 SPL

2024-04-19 Thread Sughosh Ganu
On Fri, 19 Apr 2024 at 17:23, Chintan Vankar wrote: > > > > On 19/04/24 17:04, Sughosh Ganu wrote: > > On Fri, 19 Apr 2024 at 16:04, Chintan Vankar wrote: > >> > >> > >> > >> On 18/04/24 17:30, Sughosh Ganu wrote: >

Re: [PATCH 01/10] board: ti: am62x: Init DRAM size in R5/A53 SPL

2024-04-19 Thread Sughosh Ganu
On Fri, 19 Apr 2024 at 16:04, Chintan Vankar wrote: > > > > On 18/04/24 17:30, Sughosh Ganu wrote: > > On Thu, 18 Apr 2024 at 16:08, Chintan Vankar wrote: > >> > >> > >> > >> On 17/04/24 21:34, Tom Rini wrote: > >>> On Wed, Apr 1

[PATCH v2 4/4] test: capsule: Generate capsules through config file

2024-04-19 Thread Sughosh Ganu
Add logic to generate capsules through a config file while testing the EFI capsule update functionality. Capsule generation through config file is enabled on the sandbox variant. Signed-off-by: Sughosh Ganu --- test/py/tests/test_efi_capsule/capsule_gen_binman.dts | 2 ++ test/py/tests

[PATCH v2 3/4] sandbox: capsule: Add a config file for generating capsules

2024-04-19 Thread Sughosh Ganu
the config file on the sandbox variant. Signed-off-by: Sughosh Ganu --- configs/sandbox_defconfig | 2 + .../test_efi_capsule/sandbox_capsule_cfg.txt | 73 +++ 2 files changed, 75 insertions(+) create mode 100644 test/py/tests/test_efi_capsule

[PATCH v2 2/4] doc: Document capsule generation through a config file

2024-04-19 Thread Sughosh Ganu
The UEFI capsule can now be generated by specifying the capsule parameters through a config file. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 70 +++ 1 file changed, 70 insertions(+) diff --git

[PATCH v2 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2024-04-19 Thread Sughosh Ganu
. The config file can be passed to the mkeficapsule tool in such manner $ ./tools/mkeficapsule -f Signed-off-by: Sughosh Ganu --- tools/Kconfig | 15 ++ tools/Makefile | 1 + tools/eficapsule.h | 114 tools/mkeficapsule.c | 87

[PATCH v2 0/4] Generate capsules from config files

2024-04-19 Thread Sughosh Ganu
-November/538223.html [2] - https://lists.denx.de/pipermail/u-boot/2024-March/548126.html Sughosh Ganu (4): tools: mkeficapsule: Add support for parsing capsule params from config file doc: Document capsule generation through a config file sandbox: capsule: Add a config file for generating

Re: [PATCH 01/10] board: ti: am62x: Init DRAM size in R5/A53 SPL

2024-04-18 Thread Sughosh Ganu
On Thu, 18 Apr 2024 at 16:08, Chintan Vankar wrote: > > > > On 17/04/24 21:34, Tom Rini wrote: > > On Wed, Apr 17, 2024 at 05:48:31PM +0530, Sughosh Ganu wrote: > >> hi Chintan, > >> > >> On Wed, 17 Apr 2024 at 13:21, Chintan Vankar wrote: > &

Re: [PATCH 01/10] board: ti: am62x: Init DRAM size in R5/A53 SPL

2024-04-17 Thread Sughosh Ganu
hi Chintan, On Wed, 17 Apr 2024 at 13:21, Chintan Vankar wrote: > > > > On 16/04/24 22:30, Tom Rini wrote: > > On Tue, Apr 16, 2024 at 05:52:58PM +0530, Chintan Vankar wrote: > >> > >> > >> On 12/04/24 03:37, Tom Rini wrote: > >>> On Wed, Apr 03, 2024 at 06:18:01PM +0530, Chintan Vankar wrote: >

Re: [RFC] Makefile.lib: find capsule ESL dtsi file when CONFIG_OF_UPSTREAM=y

2024-03-30 Thread Sughosh Ganu
On Fri, 29 Mar 2024 at 14:04, Jon Humphreys wrote: > > Sughosh Ganu writes: > > > On Thu, 28 Mar 2024 at 09:34, Jon Humphreys wrote: > >> > >> Sughosh Ganu writes: > >> > >> > hi Jonathan, > >> > > >> > On Wed,

Re: [RFC] Makefile.lib: find capsule ESL dtsi file when CONFIG_OF_UPSTREAM=y

2024-03-28 Thread Sughosh Ganu
On Thu, 28 Mar 2024 at 09:34, Jon Humphreys wrote: > > Sughosh Ganu writes: > > > hi Jonathan, > > > > On Wed, 27 Mar 2024 at 08:05, Jonathan Humphreys wrote: > >> > >> When CONFIG_OF_UPSTREAM is enabled, DTS files are in SOC subdirectories > &g

[PATCH v2 4/4] capsule: Makefile: add the generated files to CLEAN_FILES list

2024-03-27 Thread Sughosh Ganu
A certain set of capsule files are now generated as part of the sandbox build. Add these files to the CLEAN_FILES list for deletion on invoking any of the cleanup targets. Signed-off-by: Sughosh Ganu --- Changes since V1: None Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 3/4] capsule: add the generated capsules to gitignore

2024-03-27 Thread Sughosh Ganu
The sandbox platform build now generates a set of capsules. Put the related files generated into gitignore. Signed-off-by: Sughosh Ganu --- Changes since V1: None .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3301481192..94dbeb053c 100644

[PATCH v2 2/4] sandbox: capsule: binman: generate some capsules as part of build

2024-03-27 Thread Sughosh Ganu
for generating capsules as part of a platform's build. Make corresponding change in the capsule test's configuration to get these capsules from the build directory. Signed-off-by: Sughosh Ganu --- Changes since V1: * Fix the typo in the commit message about raw capsules being generated as part

[PATCH v2 1/4] sandbox: capsule: remove capsule related configs

2024-03-27 Thread Sughosh Ganu
-by: Sughosh Ganu --- Changes since V1: None configs/sandbox64_defconfig | 5 - configs/sandbox_noinst_defconfig | 2 -- configs/sandbox_spl_defconfig| 2 -- configs/sandbox_vpl_defconfig| 2 -- 4 files changed, 11 deletions(-) diff --git a/configs/sandbox64_defconfig b/configs

[PATCH v2 0/4] capsule: Generate capsules as part of sandbox build

2024-03-27 Thread Sughosh Ganu
generated as part of the build, and not signed capsules. Sughosh Ganu (4): sandbox: capsule: remove capsule related configs sandbox: capsule: binman: generate some capsules as part of build capsule: add the generated capsules to gitignore capsule: Makefile: add the generated files

Re: [RFC] Makefile.lib: find capsule ESL dtsi file when CONFIG_OF_UPSTREAM=y

2024-03-27 Thread Sughosh Ganu
hi Jonathan, On Wed, 27 Mar 2024 at 08:05, Jonathan Humphreys wrote: > > When CONFIG_OF_UPSTREAM is enabled, DTS files are in SOC subdirectories (vs > the > top level dts directory), but when CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, > the dynamically created dtsi file containing the capsule

[PATCH 4/4] capsule: Makefile: add the generated files to CLEAN_FILES list

2024-03-26 Thread Sughosh Ganu
A certain set of capsule files are now generated as part of the sandbox build. Add these files to the CLEAN_FILES list for deletion on invoking any of the cleanup targets. Signed-off-by: Sughosh Ganu --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b

[PATCH 3/4] capsule: add the generated capsules to gitignore

2024-03-26 Thread Sughosh Ganu
The sandbox platform build now generates a set of capsules. Put the related files generated into gitignore. Signed-off-by: Sughosh Ganu --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3301481192..94dbeb053c 100644 --- a/.gitignore +++ b

[PATCH 2/4] sandbox: capsule: binman: generate some capsules as part of build

2024-03-26 Thread Sughosh Ganu
capsules as part of a platform's build. Make corresponding change in the capsule test's configuration to get these signed capsules from the build directory. Signed-off-by: Sughosh Ganu --- arch/sandbox/dts/sandbox.dts | 4 + arch/sandbox/dts/sandbox_capsule.dtsi | 169

[PATCH 1/4] sandbox: capsule: remove capsule related configs

2024-03-26 Thread Sughosh Ganu
-by: Sughosh Ganu --- configs/sandbox64_defconfig | 5 - configs/sandbox_noinst_defconfig | 2 -- configs/sandbox_spl_defconfig| 2 -- configs/sandbox_vpl_defconfig| 2 -- 4 files changed, 11 deletions(-) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index

[PATCH 0/4] capsule: Generate capsules as part of sandbox build

2024-03-26 Thread Sughosh Ganu
of the capsule configs from all the sandbox variants which do not run the capsule update tests. This restricts the generation of capsules only on the two variants which are used for testing the functionality. Sughosh Ganu (4): sandbox: capsule: remove capsule related configs sandbox: capsule: binman

[PATCH v3 20/20] configs: fwu: re-enable FWU configs

2024-03-22 Thread Sughosh Ganu
Now that support for FWU metadata version 2 has been added, the feature can be enabled on platforms which had enabled it. A new config symbol for selecting the metadata version for the platform is also being added. Signed-off-by: Sughosh Ganu --- Changes since V2: * Add config symbol

[PATCH v3 19/20] MAINTAINERS: add entry for FWU multi bank update feature

2024-03-22 Thread Sughosh Ganu
Add an entry for the FWU Multi Bank Update feature. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cd9b2d42e8..5409b1d78a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1147,6

[PATCH v3 18/20] doc: fwu: make changes to reflect support for FWU metadata v2

2024-03-22 Thread Sughosh Ganu
The FWU Update Agent in U-Boot supports both versions of the FWU metadata. Make changes in the documentation to reflect this. Signed-off-by: Sughosh Ganu --- Changes since V2: * Changes to indicate support for both v1 and v2 instead of only v2. doc/board/socionext/developerbox.rst | 7

[PATCH v3 16/20] tools: mkfwumdata: add logic to append vendor data to the FWU metadata

2024-03-22 Thread Sughosh Ganu
to the tool's manpage. Signed-off-by: Sughosh Ganu --- Changes since V2: * Added documentation changes. doc/mkfwumdata.1 | 7 tools/mkfwumdata.c | 99 +++--- 2 files changed, 91 insertions(+), 15 deletions(-) diff --git a/doc/mkfwumdata.1 b/doc

[PATCH v3 17/20] test: fwu: make changes to the FWU metadata access test

2024-03-22 Thread Sughosh Ganu
Make changes to the FWU metadata access tests corresponding to the changes in the FWU metadata access code. Signed-off-by: Sughosh Ganu --- Changes since V2: * Make changes to have the test work with v1 metadata. * Make changes to have the test work with updated logic in fwu code. test/dm

[PATCH v3 15/20] tools: mkfwumdata: add support for metadata version 2

2024-03-22 Thread Sughosh Ganu
Add support for generating the FWU metadata version 2. The tool now requires the version to be provided as a command-line option. Make corresponding changes to the tool's manpage. Signed-off-by: Sughosh Ganu --- Changes since V2: * Support both metadata versions instead of only v2. doc

[PATCH v3 14/20] cmd: fwu: make changes for supporting FWU metadata version 2

2024-03-22 Thread Sughosh Ganu
Add support for displaying data specific to FWU metadata version 2. Because the size of the v2 metadata structure is read from the structure itself, allocate memory for the metadata structure by first getting the size of the structure. Signed-off-by: Sughosh Ganu --- Changes since V2: * Earlier

[PATCH v3 13/20] fwu: mtd: obtain image information from version agnostic structure

2024-03-22 Thread Sughosh Ganu
. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch lib/fwu_updates/fwu_mtd.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c index f4e0e3107b..e8211dd5ba 100644 --- a/lib/fwu_updates/fwu_mtd.c +++ b

[PATCH v3 12/20] fwu: mtd: get MTD partition specific info from driver

2024-03-22 Thread Sughosh Ganu
Information about FWU images on MTD partitions is now stored with the corresponding driver instead of a global variable. Get this information from the driver. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch lib/fwu_updates/fwu_mtd.c | 17 +++-- 1 file changed, 11

[PATCH v3 11/20] fwu: mtd: remove unused argument from function call

2024-03-22 Thread Sughosh Ganu
The third argument passed to the function gen_image_alt_info() is not used and is superfluous. Remove this unused argument from the function call. Fixes: 4898679e190 (FWU: Add FWU metadata access driver for MTD storage regions) Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch lib

[PATCH v3 10/20] fwu: add config symbols for enabling FWU metadata versions

2024-03-22 Thread Sughosh Ganu
Support has been added for version 2 of the FWU metadata structure. Add config symbols to enable either of the two versions. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch lib/fwu_updates/Kconfig | 14 ++ lib/fwu_updates/Makefile | 2 ++ 2 files changed, 16

[PATCH v3 09/20] capsule: fwu: transition the platform state on a successful update

2024-03-22 Thread Sughosh Ganu
to the counter, the bank_state field of the FWU metadata is also updated to Valid. For transitioning the platform to Regular State, no action is needed with version 1 of the FWU metadata structure, while for version 2, the bank_state field is set to Accepted. Signed-off-by: Sughosh Ganu --- Changes

[PATCH v3 08/20] fwu: make changes to access version agnostic structure fields

2024-03-22 Thread Sughosh Ganu
agnostic structure. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch include/fwu.h | 49 +- lib/fwu_updates/fwu.c | 204 -- 2 files changed, 186 insertions(+), 67 deletions(-) diff --git a/include/fwu.h b/include/fwu.h index

[PATCH v3 07/20] fwu: metadata: add functions for handling version specific metadata fields

2024-03-22 Thread Sughosh Ganu
-by: Sughosh Ganu --- Changes since V2: * New patch include/fwu.h| 57 + lib/fwu_updates/fwu_v1.c | 167 + lib/fwu_updates/fwu_v2.c | 260 +++ 3 files changed, 484 insertions(+) create mode 100644 lib/fwu_updates

[PATCH v3 06/20] fwu: metadata: add a version agnostic structure

2024-03-22 Thread Sughosh Ganu
specific code is then responsible for arranging the data as per the corresponding metadata structure before it gets written to the metadata partitions. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch include/fwu.h | 18 ++ 1 file changed, 18 insertions(+) diff

[PATCH v3 05/20] fwu: metadata: add support for version 2 of the structure

2024-03-22 Thread Sughosh Ganu
for image identification to reflect the fact that these are GUIDs, and not UUIDs. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch which retains support for V1 of metadata include/fwu_mdata.h | 71 + 1 file changed, 65 insertions(+), 6 deletions

[PATCH v3 04/20] drivers: fwu: mtd: allocate buffer for image info dynamically

2024-03-22 Thread Sughosh Ganu
of the driver's private structure, instead of using a global variable. Signed-off-by: Sughosh Ganu --- Changes since V2: None drivers/fwu-mdata/raw_mtd.c | 68 +++-- include/fwu.h | 9 + 2 files changed, 52 insertions(+), 25 deletions(-) diff

[PATCH v3 03/20] drivers: fwu: add the size parameter to the metadata access API's

2024-03-22 Thread Sughosh Ganu
to indicate the number of bytes to be accessed. This is then used to either read the entire structure, or only the top level structure. Signed-off-by: Sughosh Ganu --- Changes since V2: None drivers/fwu-mdata/fwu-mdata-uclass.c | 10 ++ drivers/fwu-mdata/gpt_blk.c | 23

[PATCH v3 02/20] tools: mkfwumdata: fix the size parameter to the fwrite call

2024-03-22 Thread Sughosh Ganu
image") Signed-off-by: Sughosh Ganu --- Changes since V2: None tools/mkfwumdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkfwumdata.c b/tools/mkfwumdata.c index 9732a8ddc5..b2d90ca7c9 100644 --- a/tools/mkfwumdata.c +++ b/tools/mkfwumdata.c @@ -25

[PATCH v3 01/20] configs: fwu: remove FWU configs for metadata V2 support

2024-03-22 Thread Sughosh Ganu
Support is to be added in the following commits for the FWU metadata version 2. Disable the FWU feature on platforms that enable it for the V2 addition work. Signed-off-by: Sughosh Ganu --- Changes since V2: None configs/corstone1000_defconfig | 2 -- configs/sandbox64_defconfig

[PATCH v3 00/20] FWU: Add support for FWU metadata version 2

2024-03-22 Thread Sughosh Ganu
and v2 instead of only v2. * Add config symbol for selecting either of the two metadata versions. Sughosh Ganu (20): configs: fwu: remove FWU configs for metadata V2 support tools: mkfwumdata: fix the size parameter to the fwrite call drivers: fwu: add the size parameter to the metadata access

Re: [PATCH 0/4] Generate capsules from config files

2024-03-12 Thread Sughosh Ganu
I need to send some changes which Simon has asked for. Once those changes go through, these patches also should be merged. Will work on this task. Thanks for letting me know. -sughosh > > Thanks, > Bence > > On Tue, Nov 21, 2023 at 12:30:24PM +0530, Sughosh Ganu wrote: > > >

Re: [PATCH v2 00/21] FWU: Migrate FWU metadata to version 2

2024-02-20 Thread Sughosh Ganu
ed in the field yet, I would say a clean migration is better. -sughosh > > [1] > https://gitlab.arm.com/firmware/SCP-firmware/-/blob/v2.11.0/product/synquacer/include/fwu_mdata.h > [2] > https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/tags/v2.7/include/driv

Re: [PATCH v2 17/21] tools: mkfwumdata: migrate to metadata version 2

2024-02-19 Thread Sughosh Ganu
hi Michal, On Thu, 15 Feb 2024 at 20:01, Michal Simek wrote: > > Hi, > > On 2/12/24 08:47, Sughosh Ganu wrote: > > Migrate the metadata generation tool to generate the version 2 > > metadata. > > > > Signed-off-by: Sughosh Ganu > > --- > > > &

[PATCH v2 21/21] doc: fwu: make changes for supporting FWU Metadata version 2

2024-02-11 Thread Sughosh Ganu
Make changes to the FWU documentation to reflect the changes made with migration of the FWU metadata to version 2. Signed-off-by: Sughosh Ganu --- Changes since V1: None doc/board/socionext/developerbox.rst | 9 +++-- doc/develop/uefi/fwu_updates.rst | 12 +--- doc/usage/cmd

[PATCH v2 20/21] configs: fwu: re-enable FWU configs

2024-02-11 Thread Sughosh Ganu
Now that the migration to the FWU metadata version 2 is complete, the feature can be re-enabled on platforms which had it enabled. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/corstone1000_defconfig | 2 ++ configs/sandbox64_defconfig | 1 + configs

[PATCH v2 19/21] tools: mkfwumdata: fix the size parameter to the fwrite call

2024-02-11 Thread Sughosh Ganu
image") Signed-off-by: Sughosh Ganu --- Changes since V1: New patch tools/mkfwumdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkfwumdata.c b/tools/mkfwumdata.c index ab07623e25..426d221ac7 100644 --- a/tools/mkfwumdata.c +++ b/tools/mkfwumdata.c @@ -33

[PATCH v2 18/21] tools: mkfwumdata: add logic to append vendor data to the FWU metadata

2024-02-11 Thread Sughosh Ganu
The version 2 of the FWU metadata allows for appending opaque vendor specific data to the metadata structure. Add support for appending this data to the metadata. The vendor specific data needs to be provided through a file, passed through a command-line parameter. Signed-off-by: Sughosh Ganu

[PATCH v2 17/21] tools: mkfwumdata: migrate to metadata version 2

2024-02-11 Thread Sughosh Ganu
Migrate the metadata generation tool to generate the version 2 metadata. Signed-off-by: Sughosh Ganu --- Changes since V1: * Compute location of struct fwu_fw_store_desc using pointer arithmetic. tools/mkfwumdata.c | 45 ++--- 1 file changed, 34

[PATCH v2 16/21] fwu: remove the config symbols for number of banks and images

2024-02-11 Thread Sughosh Ganu
With the migration to the FWU metadata version 2 structure, the values of number of banks and number of images per bank are now obtained from the metadata at runtime. Remove the now superfluous config symbols. Signed-off-by: Sughosh Ganu --- Changes since V1: None arch/sandbox/Kconfig

[PATCH v2 15/21] test: fwu: align the FWU metadata access test with version 2

2024-02-11 Thread Sughosh Ganu
With the FWU metadata support having been migrated to version 2, make corresponding changes to the test for accessing the FWU metadata. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata. test

[PATCH v2 14/21] cmd: fwu: align the command with metadata version 2

2024-02-11 Thread Sughosh Ganu
Make changes to the fwu_mdata_read command to have it align with the metadata version 2. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata. cmd/fwu_mdata.c | 45

[PATCH v2 13/21] efi_firmware: fwu: get the number of FWU banks at runtime

2024-02-11 Thread Sughosh Ganu
With the migration of the FWU metadata to version 2, the number of banks are now obtained at runtime, instead of the config symbols. Make use of the API to get the number of banks in the versioning functions. Signed-off-by: Sughosh Ganu --- Changes since V1: None lib/efi_loader/efi_firmware.c

[PATCH v2 12/21] efi_firmware: fwu: do not read FWU metadata on sandbox

2024-02-11 Thread Sughosh Ganu
The FWU metadata is being read for populating the firmware image's version information. The sandbox platform does not have the FWU metadata on any of it's storage devices. Skip attempting to read the FWU metadata on the sandbox platform. Signed-off-by: Sughosh Ganu --- Changes since V1: None

[PATCH v2 11/21] fwu: mtd: modify the DFU API's to align with metadata version 2

2024-02-11 Thread Sughosh Ganu
the FWU MTD driver's private structure. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata. lib/fwu_updates/fwu_mtd.c | 81 +-- 1 file changed, 61 insertions

[PATCH v2 10/21] capsule: accept a bank on a successful update

2024-02-11 Thread Sughosh Ganu
), or once the images in the bank have been accepted. Signed-off-by: Sughosh Ganu --- Changes since V1: None lib/efi_loader/efi_capsule.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 0e6a38b441..422bb11162 100644

[PATCH v2 09/21] fwu: add a function to put a bank in Trial State

2024-02-11 Thread Sughosh Ganu
the TrialStateCtr variable by calling the fwu_trial_state_start() function. Signed-off-by: Sughosh Ganu --- Changes since V1: None include/fwu.h| 12 +--- lib/efi_loader/efi_capsule.c | 2 +- lib/fwu_updates/fwu.c| 54 ++-- 3 files changed, 54

[PATCH v2 08/21] drivers: fwu: allocate memory for metadata copies

2024-02-11 Thread Sughosh Ganu
With migration of the FWU metadata access code to version 2, the size of the metadata is obtained at runtime. Allocate memory for both the metadata copies from the driver's probe function. Signed-off-by: Sughosh Ganu --- Changes since V1: None drivers/fwu-mdata/gpt_blk.c | 4 drivers/fwu

[PATCH v2 07/21] drivers: fwu: mtd: allocate buffer for image info dynamically

2024-02-11 Thread Sughosh Ganu
of the driver's private structure, instead of using a global variable. Signed-off-by: Sughosh Ganu --- Changes since V1: None drivers/fwu-mdata/raw_mtd.c | 71 - include/fwu.h | 9 + 2 files changed, 55 insertions(+), 25 deletions(-) diff

[PATCH v2 06/21] fwu: add some API's for metadata version 2 access

2024-02-11 Thread Sughosh Ganu
There are certain fields added in version 2 of the FWU metadata structure. Also, information like number of banks and number of images per bank are also part of the metadata structure. Add functions to access fields of the version 2 of the metadata structure. Signed-off-by: Sughosh Ganu

[PATCH v2 05/21] fwu: make changes to support version 2 of FWU metadata

2024-02-11 Thread Sughosh Ganu
structure, instead of using build-time value. Signed-off-by: Sughosh Ganu --- Changes since V1: * Use the helper functions from the previous patch to access the image information in the metadata. include/fwu.h | 6 +- lib/fwu_updates/fwu.c | 145

[PATCH v2 04/21] fwu: add helper functions for getting image description offsets

2024-02-11 Thread Sughosh Ganu
and struct fwu_image_bank_info) need to be computed at runtime. Add helper functions to get addresses of these structures. Signed-off-by: Sughosh Ganu --- Changes since V1: * New patch needed based on comments from Ilias on the earlier version. include/fwu.h | 45

[PATCH v2 03/21] drivers: fwu: add the size parameter to the metadata access API's

2024-02-11 Thread Sughosh Ganu
to indicate the number of bytes to be accessed. This is then used to either read the entire structure, or only the top level structure. Signed-off-by: Sughosh Ganu --- Changes since V1: None drivers/fwu-mdata/fwu-mdata-uclass.c | 10 ++ drivers/fwu-mdata/gpt_blk.c | 23

[PATCH v2 02/21] fwu: metadata: migrate to version 2 of the structure

2024-02-11 Thread Sughosh Ganu
- Number of banks and images per bank values part of the structure Migrate to the version 2 of the metadata structure. [1] - https://developer.arm.com/documentation/den0118/latest/ Signed-off-by: Sughosh Ganu --- Changes since V1: * Do not define flexible array members inside the structures. include

[PATCH v2 01/21] configs: fwu: remove FWU configs for metadata V2 migration

2024-02-11 Thread Sughosh Ganu
The FWU metadata is to be migrated to version 2. Disable the FWU feature on platforms that enable it for the migration. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V1: None configs/corstone1000_defconfig | 2 -- configs/sandbox64_defconfig

[PATCH v2 00/21] FWU: Migrate FWU metadata to version 2

2024-02-11 Thread Sughosh Ganu
array members inside the structures. * Access the image information related fields in the metadata using the helper functions defined in an earlier patch. * Access fwu_fw_store_desc structure using pointer arithmetic. Sughosh Ganu (21): configs: fwu: remove FWU configs for metadata V2 migration

Re: [PATCH 00/18] FWU: Migrate FWU metadata to version 2

2024-01-28 Thread Sughosh Ganu
hi Michal, On Fri, 26 Jan 2024 at 20:40, Michal Simek wrote: > > Hi Sughosh, > > po 22. 1. 2024 v 12:55 odesílatel Sughosh Ganu > napsal: > > > > > > The following patches migrate the FWU metadata access code to version > > 2 of the structure. Th

Re: [PATCH 2/4] doc: Document capsule generation through a config file

2024-01-23 Thread Sughosh Ganu
hi Ilias, On Tue, 23 Jan 2024 at 21:53, Ilias Apalodimas wrote: > > Hi Sughosh, > > On Tue, Nov 21, 2023 at 12:30:26PM +0530, Sughosh Ganu wrote: > > The UEFI capsule can now be generate by specifying the capsule > > parameters through a config file. Additi

[PATCH 18/18] doc: fwu: Make changes for supporting FWU Metadata version 2

2024-01-22 Thread Sughosh Ganu
Make changes to the FWU documentation to reflect the changes made with migration of the FWU metadata to version 2. Signed-off-by: Sughosh Ganu --- doc/board/socionext/developerbox.rst | 9 +++-- doc/develop/uefi/fwu_updates.rst | 12 +--- doc/usage/cmd/fwu_mdata.rst

[PATCH 17/18] configs: fwu: Re-enable FWU configs

2024-01-22 Thread Sughosh Ganu
Now that the migration to the FWU metadata version 2 is complete, the feature can be re-enabled on platforms which had it enabled. Signed-off-by: Sughosh Ganu --- configs/corstone1000_defconfig | 2 ++ configs/sandbox64_defconfig | 1 + configs

[PATCH 16/18] tools: mkfwumdata: Migrate to metadata version 2

2024-01-22 Thread Sughosh Ganu
Migrate the metadata generation tool to generate the version 2 metadata. Signed-off-by: Sughosh Ganu --- tools/mkfwumdata.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/tools/mkfwumdata.c b/tools/mkfwumdata.c index 9732a8ddc5

[PATCH 15/18] fwu: Remove the config symbols for number of banks and images

2024-01-22 Thread Sughosh Ganu
With the migration to the FWU metadata version 2 structure, the values of number of banks and number of images per bank are now obtained from the metadata at runtime. Remove the now superfluous config symbols. Signed-off-by: Sughosh Ganu --- arch/sandbox/Kconfig | 6

[PATCH 14/18] test: fwu: Align the FWU metadata access test with version 2

2024-01-22 Thread Sughosh Ganu
With the FWU metadata support having been migrated to version 2, make corresponding changes to the test for accessing the FWU metadata. Signed-off-by: Sughosh Ganu --- test/dm/fwu_mdata.c| 56 --- test/dm/fwu_mdata_disk_image.h | 124 ++--- 2

[PATCH 13/18] cmd: fwu: Align the command with metadata version 2

2024-01-22 Thread Sughosh Ganu
Make changes to the fwu_mdata_read command to have it align with the metadata version 2. Signed-off-by: Sughosh Ganu --- cmd/fwu_mdata.c | 43 ++- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c index

[PATCH 12/18] efi_firmware: fwu: Get the number of FWU banks at runtime

2024-01-22 Thread Sughosh Ganu
With the migration of the FWU metadata to version 2, the number of banks are now obtained at runtime, instead of the config symbols. Make use of the API to get the number of banks in the versioning functions. Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_firmware.c | 14 ++ 1

[PATCH 11/18] efi_firmware: fwu: Do not read FWU metadata on sandbox

2024-01-22 Thread Sughosh Ganu
The FWU metadata is being read for populating the firmware image's version information. The sandbox platform does not have the FWU metadata on any of it's storage devices. Skip attempting to read the FWU metadata on the sandbox platform. Signed-off-by: Sughosh Ganu --- lib/efi_loader

[PATCH 10/18] fwu: mtd: Modify the DFU API's to align with metadata version 2

2024-01-22 Thread Sughosh Ganu
the FWU MTD driver's private structure. Signed-off-by: Sughosh Ganu --- lib/fwu_updates/fwu_mtd.c | 76 +-- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c index 69cd3d7001..a82133de2e 100644

[PATCH 09/18] capsule: Accept a bank on a successful update

2024-01-22 Thread Sughosh Ganu
), or once the images in the bank have been accepted. Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_capsule.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 0e6a38b441..422bb11162 100644 --- a/lib/efi_loader

[PATCH 08/18] fwu: Add a function to put a bank in Trial State

2024-01-22 Thread Sughosh Ganu
the TrialStateCtr variable by calling the fwu_trial_state_start() function. Signed-off-by: Sughosh Ganu --- include/fwu.h| 12 +--- lib/efi_loader/efi_capsule.c | 2 +- lib/fwu_updates/fwu.c| 54 ++-- 3 files changed, 54 insertions(+), 14 deletions

[PATCH 07/18] drivers: fwu: Allocate memory for metadata copies

2024-01-22 Thread Sughosh Ganu
With migration of the FWU metadata access code to version 2, the size of the metadata is obtained at runtime. Allocate memory for both the metadata copies from the driver's probe function. Signed-off-by: Sughosh Ganu --- drivers/fwu-mdata/gpt_blk.c | 4 drivers/fwu-mdata/raw_mtd.c | 4

[PATCH 06/18] drivers: fwu: mtd: Allocate buffer for image info dynamically

2024-01-22 Thread Sughosh Ganu
of the driver's private structure, instead of using a global variable. Signed-off-by: Sughosh Ganu --- drivers/fwu-mdata/raw_mtd.c | 71 - include/fwu.h | 9 + 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/drivers/fwu

[PATCH 05/18] lib: fwu: Make changes to support version 2 of FWU metadata

2024-01-22 Thread Sughosh Ganu
of banks and number of images per bank from the metadata at runtime, instead of using config values. - Get the size of the metadata from the metadata structure, instead of using build-time value. Signed-off-by: Sughosh Ganu --- include/fwu.h | 6 ++- lib/fwu_updates/fwu.c | 112

[PATCH 04/18] fwu: Add some API's for metadata version 2 access

2024-01-22 Thread Sughosh Ganu
There are certain fields added in version 2 of the FWU metadata structure. Also, information like number of banks and number of images per bank are also part of the metadata structure. Add functions to access fields of the version 2 of the metadata structure. Signed-off-by: Sughosh Ganu

[PATCH 03/18] drivers: fwu: Add the size parameter to the metadata access API's

2024-01-22 Thread Sughosh Ganu
to indicate the number of bytes to be accessed. This is then used to either read the entire structure, or only the top level structure. Signed-off-by: Sughosh Ganu --- drivers/fwu-mdata/fwu-mdata-uclass.c | 10 ++ drivers/fwu-mdata/gpt_blk.c | 23 +-- drivers

[PATCH 02/18] fwu: metadata: Migrate to version 2 of the structure

2024-01-22 Thread Sughosh Ganu
- Number of banks and images per bank values part of the structure Migrate to the version 2 of the metadata structure. [1] - https://developer.arm.com/documentation/den0118/latest/ Signed-off-by: Sughosh Ganu --- include/fwu_mdata.h | 56 + 1 file changed

[PATCH 01/18] configs: fwu: Remove FWU configs for metadata V2 migration

2024-01-22 Thread Sughosh Ganu
The FWU metadata is to be migrated to version 2. Disable the FWU feature on platforms that enable it for the migration. Signed-off-by: Sughosh Ganu --- configs/corstone1000_defconfig | 2 -- configs/sandbox64_defconfig | 1 - configs/synquacer_developerbox_defconfig | 4

[PATCH 00/18] FWU: Migrate FWU metadata to version 2

2024-01-22 Thread Sughosh Ganu
both the GPT and the MTD partitioned storage devices for the metadata access. [1] - https://developer.arm.com/documentation/den0118/latest/ [2] - https://review.trustedfirmware.org/q/topic:%22topics/fwu_metadata_v2_migration%22 Sughosh Ganu (18): configs: fwu: Remove FWU configs for metadata V2

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-12-28 Thread Sughosh Ganu
hi Simon, On Wed, 27 Dec 2023 at 23:19, Simon Glass wrote: > > Hi Sughosh, > > On Mon, Dec 4, 2023 at 7:15 AM Sughosh Ganu wrote: > > > > hi Simon, > > > > On Sat, 2 Dec 2023 at 00:02, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-12-03 Thread Sughosh Ganu
hi Simon, On Sat, 2 Dec 2023 at 00:02, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 30 Nov 2023 at 23:39, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 30 Nov 2023 at 08:16, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-11-30 Thread Sughosh Ganu
hi Simon, On Thu, 30 Nov 2023 at 08:16, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 22 Nov 2023 at 00:40, Sughosh Ganu wrote: > > > > hi Ilias, > > > > On Wed, 22 Nov 2023 at 13:06, Ilias Apalodimas > > wrote: > > > > > > Hi

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-11-21 Thread Sughosh Ganu
hi Ilias, On Wed, 22 Nov 2023 at 13:06, Ilias Apalodimas wrote: > > Hi all, > > On Wed, 22 Nov 2023 at 07:23, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Wed, 22 Nov 2023 at 03:42, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-11-21 Thread Sughosh Ganu
hi Tom, On Wed, 22 Nov 2023 at 03:54, Tom Rini wrote: > > On Tue, Nov 21, 2023 at 03:11:50PM -0700, Simon Glass wrote: > > Hi Sughosh, > > > > On Tue, 21 Nov 2023 at 00:02, Sughosh Ganu wrote: > > > > > > Add support for specifying the parameters n

Re: [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-11-21 Thread Sughosh Ganu
hi Simon, On Wed, 22 Nov 2023 at 03:42, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 21 Nov 2023 at 00:02, Sughosh Ganu wrote: > > > > Add support for specifying the parameters needed for capsule > > generation through a config file, instead of passing

[PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-11-20 Thread Sughosh Ganu
. The config file can then be passed to the mkeficapsule tool in such manner $ ./tools/mkeficapsule -f Signed-off-by: Sughosh Ganu --- tools/Kconfig | 15 ++ tools/Makefile | 1 + tools/eficapsule.h | 114 tools/mkeficapsule.c | 87

[PATCH 4/4] test: capsule: Generate capsules through config file

2023-11-20 Thread Sughosh Ganu
Add logic to generate capsules through a config file while testing the EFI capsule update functionality. Capsule generation through config file is enabled on the sandbox variant. Signed-off-by: Sughosh Ganu --- test/py/tests/test_efi_capsule/capsule_gen_binman.dts | 2 ++ test/py/tests

[PATCH 3/4] sandbox: capsule: Add a config file for generating capsules

2023-11-20 Thread Sughosh Ganu
the config file on the sandbox variant. Signed-off-by: Sughosh Ganu --- configs/sandbox_defconfig | 2 + .../test_efi_capsule/sandbox_capsule_cfg.txt | 162 ++ 2 files changed, 164 insertions(+) create mode 100644 test/py/tests/test_efi_capsule

  1   2   3   4   5   6   7   8   9   10   >