[PATCH 38/40] test: bdinfo: dump the global LMB memory map

2024-07-23 Thread Sughosh Ganu
The LMB code has been changed to make the memory reservations persistent and global. Make corresponding change the the lmb_test_dump_all() function to print the global LMB available and used memory. Signed-off-by: Sughosh Ganu --- Changes since rfc: None test/cmd/bdinfo.c | 28

[PATCH 40/40] lmb: ut: re-enable unit tests

2024-07-23 Thread Sughosh Ganu
All the changes needed for making the LMB memory map persistent and global have been made, including making corresponding changes in the test code. Re-enable the unit tests on the platforms. Signed-off-by: Sughosh Ganu --- Changes since rfc: New patch configs/sandbox64_defconfig| 4

Re: [PATCH 04/40] lib: Convert str_to_list() to use alist

2024-07-25 Thread Sughosh Ganu
On Thu, 25 Jul 2024 at 02:24, Tom Rini wrote: > > On Wed, Jul 24, 2024 at 11:31:48AM +0530, Sughosh Ganu wrote: > > > From: Simon Glass > > > > Use this new data structure in the utility function. > > > > Signed-off-by: Simon Glass > > Signed-off-by

Re: [PATCH 04/40] lib: Convert str_to_list() to use alist

2024-07-28 Thread Sughosh Ganu
On Thu, 25 Jul 2024 at 18:24, Sughosh Ganu wrote: > > On Thu, 25 Jul 2024 at 02:24, Tom Rini wrote: > > > > On Wed, Jul 24, 2024 at 11:31:48AM +0530, Sughosh Ganu wrote: > > > > > From: Simon Glass > > > > > > Use this new data structure in the

Re: [PATCH 05/40] spl: alloc: call full alloc functions if malloc pool is available

2024-07-29 Thread Sughosh Ganu
hi Simon, On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:03, Sughosh Ganu wrote: > > > > If the malloc simple functionality is enabled in SPL, it is not > > possible to call the full-implementation alloc functions eve

Re: [PATCH 11/40] lmb: make LMB memory map persistent and global

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:03, Sughosh Ganu wrote: > > > > The current LMB API's for allocating and reserving memory use a > > per-caller based memory view. Memory allocated by a caller can

Re: [PATCH 15/40] lmb: config: add lmb config symbols for SPL

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > Add separate config symbols for enabling the LMB module for the SPL > > phase. The LMB module implementation now relies on alloced list dat

Re: [PATCH 16/40] lmb: allow lmb module to be used in SPL

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > With the introduction of separate config symbols for the SPL phase of > > U-Boot, the condition checks need to be tweaked so that pla

Re: [PATCH 17/40] lmb: introduce a function to add memory to the lmb memory map

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > Introduce a function lmb_add_memory() to add available memory to the > > LMB memory map. Call this function during board init once the LMB

Re: [PATCH 22/40] lmb: init: initialise the lmb data structures during board init

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > The memory map maintained by the LMB module is now persistent and > > global. This memory map is being maintained through the alloced l

Re: [PATCH 23/40] lmb: add a flags parameter to the API's

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > Add a flags parameter to the LMB API functions. The parameter can then > > be used to pass any other type of reservations or allocations ne

Re: [PATCH 24/40] lmb: add a common implementation of arch_lmb_reserve()

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > Almost all of the current definitions of arch_lmb_reserve() are doing > > the same thing. The only exception in a couple of cases

Re: [PATCH 25/40] sandbox: move the TCG event log to the start of ram memory

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu wrote: > > > > The TCG event log buffer is being set at the end of ram memory. This > > region of memory is to be reserved as LMB_NOMAP memory in the L

Re: [PATCH 27/40] spl: sandbox: initialise the ram banksize in spl

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:05, Sughosh Ganu wrote: > > > > Initialise the ram bank information for sandbox in SPL. This is needed > > for initialising the LMB memory map as part of the platform ini

Re: [PATCH 30/40] sandbox: iommu: remove lmb allocation in the driver

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:05, Sughosh Ganu wrote: > > > > The sandbox iommu driver uses the LMB module to allocate a particular > > range of memory for the device virtual address(DVA). This used

Re: [PATCH 33/40] test: cedit: use allocated address for reading file

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:05, Sughosh Ganu wrote: > > > > Instead of a randomly selected address, use an LMB allocated one for > > reading the file into memory. With the LMB map now being persiste

Re: [PATCH 36/40] test: lmb: add a separate class of unit tests for lmb

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:03, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:05, Sughosh Ganu wrote: > > > > Add the LMB unit tests under a separate class of tests. The LMB tests > > involve changing the LMB's memory map. With the memor

Re: [PATCH 40/40] lmb: ut: re-enable unit tests

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:03, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:06, Sughosh Ganu wrote: > > > > All the changes needed for making the LMB memory map persistent and > > global have been made, including making corresponding changes in th

Re: [PATCH 06/40] alist: add a couple of helper functions

2024-07-29 Thread Sughosh Ganu
On Fri, 26 Jul 2024 at 05:03, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:03, Sughosh Ganu wrote: > > > > Add a couple of helper functions to detect an empty and full alist. > > > > Signed-off-by: Sughosh Ganu > > --- > >

Re: [PATCH 04/40] lib: Convert str_to_list() to use alist

2024-07-29 Thread Sughosh Ganu
On Mon, 29 Jul 2024 at 20:59, Simon Glass wrote: > > Hi Sughosh, > > On Sun, 28 Jul 2024 at 12:07, Sughosh Ganu wrote: > > > > On Thu, 25 Jul 2024 at 18:24, Sughosh Ganu wrote: > > > > > > On Thu, 25 Jul 2024 at 02:24, Tom Rini wrote: > > >

Re: [PATCH 04/40] lib: Convert str_to_list() to use alist

2024-07-29 Thread Sughosh Ganu
On Mon, 29 Jul 2024 at 23:46, Tom Rini wrote: > > On Mon, Jul 29, 2024 at 09:28:57AM -0600, Simon Glass wrote: > > Hi Sughosh, > > > > On Sun, 28 Jul 2024 at 12:07, Sughosh Ganu wrote: > > > > > > On Thu, 25 Jul 2024 at 18:24, Sughosh Ganu > > &g

[PATCH 1/5] linux: list: add a function to count list nodes

2024-07-30 Thread Sughosh Ganu
Add a function to count the nodes of a list. Taken from linux 6.11-rc1 tag commit 8400291e289e. Signed-off-by: Sughosh Ganu --- include/linux/list.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/list.h b/include/linux/list.h index 6910721c00..0f9d939b05

[PATCH 2/5] efi_memory: use list_count_nodes() to count list entries

2024-07-30 Thread Sughosh Ganu
Use the API function list_count_nodes() to count the number of EFI memory map entries. Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 12cf23fa3f

[PATCH 3/5] efi_memory: avoid possible null pointer dereference

2024-07-30 Thread Sughosh Ganu
Populate the previous memory descriptor node pointer only after it's parent struct has been initialised. The compiler fixes this logic to do the right thing, but it is better to have correct code in place. Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_memory.c | 3 ++- 1 file chang

[PATCH 4/5] efi_memory: get the efi_mem_list node directly

2024-07-30 Thread Sughosh Ganu
Use the list_for_each_entry() API to get the efi_mem_list node directly, instead of making an additional call to list_entry(). Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_memory.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/lib

[PATCH 5/5] dm: use list_count_nodes() for counting list nodes

2024-07-30 Thread Sughosh Ganu
The linux kernel has the list_count_nodes() API functions which is used for counting nodes of a list. This has now been imported in U-Boot as part of an earlier commit. Use this function and drop the list_count_items(). Signed-off-by: Sughosh Ganu --- drivers/core/util.c | 14

Re: [PATCH 11/40] lmb: make LMB memory map persistent and global

2024-07-30 Thread Sughosh Ganu
On Wed, 31 Jul 2024 at 01:17, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 24 Jul 2024 at 00:03, Sughosh Ganu wrote: > > > > The current LMB API's for allocating and reserving memory use a > > per-caller based memory view. Memory allocated by a caller can

Re: [PATCH 33/40] test: cedit: use allocated address for reading file

2024-07-31 Thread Sughosh Ganu
On Mon, 29 Jul 2024 at 20:58, Simon Glass wrote: > > Hi Sughosh, > > On Mon, 29 Jul 2024 at 02:53, Sughosh Ganu wrote: > > > > On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Wed, 24 Jul 2024 a

[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

[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 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 03/18] drivers: fwu: Add the size parameter to the metadata access API's

2024-01-22 Thread Sughosh Ganu
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 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 05/18] lib: fwu: Make changes to support version 2 of FWU metadata

2024-01-22 Thread Sughosh Ganu
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 06/18] drivers: fwu: mtd: Allocate buffer for image info dynamically

2024-01-22 Thread Sughosh Ganu
part 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/d

[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.

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

2024-01-22 Thread Sughosh Ganu
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 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 10/18] fwu: mtd: Modify the DFU API's to align with metadata version 2

2024-01-22 Thread Sughosh Ganu
from 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..a82133d

[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/

[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 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 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 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 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 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 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

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. Additiona

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. This

[PATCH 0/4] Generate capsules from config files

2023-11-20 Thread Sughosh Ganu
generation tool in EDKII. The functionality is enabled on the sandbox variant and the EFI capsule update test is now configured to generate the capsules through a config file. The sandbox_flattree variant generates capsules through binman, thus covering both the paths. Sughosh Ganu (4): tools

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

2023-11-20 Thread Sughosh Ganu
The UEFI capsule can now be generate by specifying the capsule parameters through a config file. Additionally, the capsules can be generated as part of u-boot build, through binman. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 70

[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

[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 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

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

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 nee

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-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-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: [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

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: [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: [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: > &

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

2024-04-18 Thread Sughosh Ganu
-boot/2023-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

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

2024-04-18 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 2/4] doc: Document capsule generation through a config file

2024-04-18 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 a

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

2024-04-18 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 4/4] test: capsule: Generate capsules through config file

2024-04-18 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

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

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 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. Pa

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 > > documentatio

[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

[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 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 03/21] drivers: fwu: add the size parameter to the metadata access API's

2024-02-11 Thread Sughosh Ganu
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 04/21] fwu: add helper functions for getting image description offsets

2024-02-11 Thread Sughosh Ganu
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 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 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 07/21] drivers: fwu: mtd: allocate buffer for image info dynamically

2024-02-11 Thread Sughosh Ganu
part 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 deletion

[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 driver

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

2024-02-11 Thread Sughosh Ganu
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 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 11/21] fwu: mtd: modify the DFU API's to align with metadata version 2

2024-02-11 Thread Sughosh Ganu
from 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

[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 sinc

[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 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 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 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 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 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 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 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 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

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 > > --- > > > &

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

2024-02-20 Thread Sughosh Ganu
eployed 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

[PATCH v2 00/14] qemu: arm64: Add support for uefi capsule update on qemu arm platform

2020-12-21 Thread Sughosh Ganu
flect the usage of overlays for embedding the public key certs at runtime * Fix the build for 'make htmldocs' Sughosh Ganu (14): mkeficapsule: Add support for embedding public key in a dtb qemu: arm: Initialise virtio in board_late_init crypto: Fix the logic to calculate hash with

[PATCH v2 01/14] mkeficapsule: Add support for embedding public key in a dtb

2020-12-21 Thread Sughosh Ganu
owing command mkeficapsule -K -D In the scenario where the esl file is to be embedded in an overlay, this can be done through the following command mkeficapsule -O -K -D This will create a node named 'signature' in the dtb, and the esl file will be stored as 'capsule-key' Si

[PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init

2020-12-21 Thread Sughosh Ganu
. Signed-off-by: Sughosh Ganu --- Changes since V1: * The earlier patch was adding a call to pci_init in board_init. Moved the virtio_init call to board_late_init board/emulation/qemu-arm/qemu-arm.c | 5 + configs/qemu_arm64_defconfig| 1 + 2 files changed, 6 insertions(+) diff --git

[PATCH v2 03/14] crypto: Fix the logic to calculate hash with authattributes set

2020-12-21 Thread Sughosh Ganu
from the auth attributes rather than the contents field. Check if the auth attributes are present, and if set, use the auth attributes to compute the hash that would be compared with the encrypted hash on the pkcs7 message. Signed-off-by: Sughosh Ganu --- Changes since V1: None lib/crypto

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