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

Re: [PATCH 1/1] efi_loader: use list_count_nodes() in efi_protocols_per_handle()

2024-07-31 Thread Sughosh Ganu
On Wed, 31 Jul 2024 at 13:43, Heinrich Schuchardt wrote: > > Simplify the code by using the list_count_nodes() function. > > Signed-off-by: Heinrich Schuchardt > --- I have made changes to the files that you mentioned in your review, and plan to come up with a v2 once the CI goes through. Thanks

[PATCH] list: use list_count_nodes() to count list entries

2024-07-31 Thread Sughosh Ganu
Use the API function list_count_nodes() to count the number of list entries. Signed-off-by: Sughosh Ganu --- Note: To be applied on top of efi-2024-10-rc2 boot/scene.c | 8 +--- drivers/mtd/ubi/fastmap.c | 8 +++- fs/yaffs2/yaffs_guts.c| 5 ++--- lib

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

2024-07-31 Thread Sughosh Ganu
On Wed, 31 Jul 2024 at 20:08, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 31 Jul 2024 at 01:26, Sughosh Ganu wrote: > > > > On Mon, 29 Jul 2024 at 20:58, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Mon, 29 Jul 2024

Re: [RFC PATCH 2/4] lmb: Tighten up the code in lmb_add_region_flags()

2024-08-01 Thread Sughosh Ganu
On Tue, 30 Jul 2024 at 20:10, Simon Glass wrote: > > This function has more special cases than it needs. Simplify it to > reduce code size and complexity. > > Signed-off-by: Simon Glass > --- > > lib/lmb.c | 57 +++ > 1 file changed, 19 inserti

Re: [RFC PATCH 2/4] lmb: Tighten up the code in lmb_add_region_flags()

2024-08-01 Thread Sughosh Ganu
On Thu, 1 Aug 2024 at 20:28, Sughosh Ganu wrote: > > On Tue, 30 Jul 2024 at 20:10, Simon Glass wrote: > > > > This function has more special cases than it needs. Simplify it to > > reduce code size and complexity. > > > > Signed-off-by: Simon Gl

Re: [RFC PATCH 2/4] lmb: Tighten up the code in lmb_add_region_flags()

2024-08-01 Thread Sughosh Ganu
On Thu, 1 Aug 2024 at 21:42, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 1 Aug 2024 at 08:58, Sughosh Ganu wrote: > > > > On Tue, 30 Jul 2024 at 20:10, Simon Glass wrote: > > > > > > This function has more special cases than it needs. Simplify i

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH 0/7] Integrate EFI capsule tasks into u-boot's build flow

2023-06-13 Thread Sughosh Ganu
the sandbox and sandbox_flattree variants. The capsule generation through config file is enabled for the sandbox variant, with the sandbox_flattree variant generating capsules through the command-line parameters. The document has been updated to reflect the above changes. Sughosh Ganu (7): capsul

[PATCH 1/7] capsule: authenticate: Embed capsule public key in platform's dtb

2023-06-13 Thread Sughosh Ganu
psule authentication in the platform's dtb, and call this as part of building the dtb(s). This brings the embedding of the ESL in the dtb into the u-boot build flow. The path to the ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE symbol. Signed-off-by: Sughosh Ganu --- lib/efi_load

[PATCH 2/7] test: py: Generate capsule keys prior to building u-boot

2023-06-13 Thread Sughosh Ganu
which embeds the ESL file into the platform's dtb(s) as part of the u-boot build. This requires generating the keys and the ESL file prior to invoking the u-boot build. Bring about the same sequence of generating these files prior to invoking the u-boot build while testing. Signed-off-by: Su

[PATCH 3/7] doc: capsule: Document the new mechanism to embed ESL file into dtb

2023-06-13 Thread Sughosh Ganu
Update the document to specify how the EFI Signature List(ESL) file can be embedded into the platform's dtb as part of the u-boot build. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/doc/de

[PATCH 5/7] Makefile: Add a target for building capsules

2023-06-13 Thread Sughosh Ganu
Add a target for building EFI capsules. The capsule parameters are specified through a config file, and the path to the config file is specified through CONFIG_EFI_CAPSULE_CFG_FILE. When the config file is not specified, the command only builds tools. Signed-off-by: Sughosh Ganu --- Makefile

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

2023-06-13 Thread Sughosh Ganu
. This path is to be used for generating capsules through a make target, with the parameters being parsed from the config file. Signed-off-by: Sughosh Ganu --- tools/Kconfig | 9 + tools/Makefile | 1 + tools/eficapsule.h | 110 tools/mkeficapsule.c

[PATCH 7/7] doc: Add documentation to describe capsule config file format

2023-06-13 Thread Sughosh Ganu
The UEFI capsule can be generated either through command-line parameters, or, by specifying those in a config file. Add documentation to describe the format of the config file. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 64 +++ 1 file changed

[PATCH 6/7] test: efi_capsule: Test capsule generation from config file

2023-06-13 Thread Sughosh Ganu
: Sughosh Ganu --- configs/sandbox_defconfig | 1 + test/py/tests/test_efi_capsule/conftest.py| 106 +++--- .../test_efi_capsule/sandbox_capsule_cfg.txt | 75 + 3 files changed, 139 insertions(+), 43 deletions(-) create mode 100644 test/py/tests

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

2023-06-13 Thread Sughosh Ganu
hi Takahiro, On Wed, 14 Jun 2023 at 09:09, Takahiro Akashi wrote: > > Hi Sughosh, > > I think this is a good extension to mkeficapsule, but > > On Tue, Jun 13, 2023 at 04:08:03PM +0530, Sughosh Ganu wrote: > > Add support for specifying the parameters needed for capsule

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

2023-06-14 Thread Sughosh Ganu
On Wed, 14 Jun 2023 at 11:23, Takahiro Akashi wrote: > > On Wed, Jun 14, 2023 at 10:56:23AM +0530, Sughosh Ganu wrote: > > hi Takahiro, > > > > On Wed, 14 Jun 2023 at 09:09, Takahiro Akashi > > wrote: > > > > > > Hi Sughosh, > > > &g

Re: [PATCH 1/7] capsule: authenticate: Embed capsule public key in platform's dtb

2023-06-15 Thread Sughosh Ganu
hi Simon, On Thu, 15 Jun 2023 at 14:44, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 13 Jun 2023 at 11:41, Sughosh Ganu wrote: > > > > The EFI capsule authentication logic in u-boot expects the public key > > in the form of an EFI Signature List(ESL) to

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-15 Thread Sughosh Ganu
hi Simon, On Thu, 15 Jun 2023 at 14:44, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 13 Jun 2023 at 11:39, Sughosh Ganu wrote: > > > > Add a target for building EFI capsules. The capsule parameters are > > specified through a config file, and the path to th

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

2023-06-15 Thread Sughosh Ganu
On Thu, 15 Jun 2023 at 11:19, Takahiro Akashi wrote: > > On Thu, Jun 15, 2023 at 10:09:06AM +0530, Sughosh Ganu wrote: > > On Wed, 14 Jun 2023 at 11:23, Takahiro Akashi > > wrote: > > > > > > On Wed, Jun 14, 2023 at 10:56:23AM +0530, Sughosh Ganu wrote: >

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

2023-06-15 Thread Sughosh Ganu
hi Takahiro, On Fri, 16 Jun 2023 at 10:16, Takahiro Akashi wrote: > > Hi Sughosh, > > On Fri, Jun 16, 2023 at 09:56:33AM +0530, Sughosh Ganu wrote: > > On Thu, 15 Jun 2023 at 11:19, Takahiro Akashi > > wrote: > > > > > > On Thu, Jun 15, 2023 at 10:09:

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

2023-06-15 Thread Sughosh Ganu
On Fri, 16 Jun 2023 at 10:48, Takahiro Akashi wrote: > > On Fri, Jun 16, 2023 at 10:37:01AM +0530, Sughosh Ganu wrote: > > hi Takahiro, > > > > On Fri, 16 Jun 2023 at 10:16, Takahiro Akashi > > wrote: > > > > > > Hi Sughosh, > > > >

Re: [PATCH 2/5] mkeficapsule: add support for multiple payloads inside capsule

2023-06-16 Thread Sughosh Ganu
hi Stefan, On Fri, 16 Jun 2023 at 17:04, Stefan Herbrechtsmeier wrote: > > From: Malte Schmidt > > The UEFI [1] specification allows multiple payloads inside the capsule > body. Add support for this. The command line arguments are kept > backwards-compatible. > > [1] https://uefi.org/specs/UEFI/

Re: [PATCH 2/5] mkeficapsule: add support for multiple payloads inside capsule

2023-06-16 Thread Sughosh Ganu
On Fri, 16 Jun 2023 at 17:56, Sughosh Ganu wrote: > > hi Stefan, > > On Fri, 16 Jun 2023 at 17:04, Stefan Herbrechtsmeier > wrote: > > > > From: Malte Schmidt > > > > The UEFI [1] specification allows multiple payloads inside the capsule > >

Re: [PATCH 2/5] mkeficapsule: add support for multiple payloads inside capsule

2023-06-16 Thread Sughosh Ganu
On Sat, 17 Jun 2023 at 06:26, AKASHI Takahiro wrote: > > On Fri, Jun 16, 2023 at 06:02:52PM +0530, Sughosh Ganu wrote: > > On Fri, 16 Jun 2023 at 17:56, Sughosh Ganu wrote: > > > > > > hi Stefan, > > > > > > On Fri, 16 Jun 2023 at 17:04, Stefan He

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

2023-06-19 Thread Sughosh Ganu
hi Malte, On Fri, 16 Jun 2023 at 18:42, Schmidt, Malte wrote: > > Hi sughosh, > > Am 16.06.2023 um 08:35 schrieb Sughosh Ganu: > > On Fri, 16 Jun 2023 at 10:48, Takahiro Akashi > wrote: > > On Fri, Jun 16, 2023 at 10:37:01AM +0530, Sughosh Ganu wrote: > > hi Tak

Re: [PATCH 1/7] capsule: authenticate: Embed capsule public key in platform's dtb

2023-06-20 Thread Sughosh Ganu
hi Simon, On Mon, 19 Jun 2023 at 18:07, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 15 Jun 2023 at 17:11, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 15 Jun 2023 at 14:44, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-20 Thread Sughosh Ganu
hi Simon, On Mon, 19 Jun 2023 at 18:07, Simon Glass wrote: > > Hi Sughosh, > > On Thu, 15 Jun 2023 at 17:25, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Thu, 15 Jun 2023 at 14:44, Simon Glass wrote: > > > > > > Hi Sughosh,

[PATCH v2 8/8] doc: Add documentation to describe capsule config file format

2023-06-24 Thread Sughosh Ganu
The UEFI capsule can be generated either through command-line parameters, or, by specifying those in a config file. Add documentation to describe the format of the config file. Signed-off-by: Sughosh Ganu --- Changes since V1: None doc/develop/uefi/uefi.rst | 64

[PATCH v2 0/8] Integrate EFI capsule tasks into u-boot's build flow

2023-06-24 Thread Sughosh Ganu
eter to pass the config file to the mkeficapsule tool. This results in generation of the same tool image irrespective of using command-line parameters or config file. * Call the mkeficapsule utility with the cfg-file parameter when building capsules via the config file. Sughosh Ganu (8): fdt

[PATCH v2 4/8] doc: capsule: Document the new mechanism to embed ESL file into dtb

2023-06-24 Thread Sughosh Ganu
Update the document to specify how the EFI Signature List(ESL) file can be embedded into the platform's dtb as part of the u-boot build. Signed-off-by: Sughosh Ganu --- Changes since V1: None doc/develop/uefi/uefi.rst | 19 +-- 1 file changed, 5 insertions(+), 14 dele

[PATCH v2 7/8] test: efi_capsule: Test capsule generation from config file

2023-06-24 Thread Sughosh Ganu
: Sughosh Ganu --- Changes since V1: None configs/sandbox_defconfig | 1 + test/py/tests/test_efi_capsule/conftest.py| 107 +++--- .../test_efi_capsule/sandbox_capsule_cfg.txt | 75 3 files changed, 139 insertions(+), 44 deletions(-) create mode

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

2023-06-24 Thread Sughosh Ganu
. This path is to be used for generating capsules through a make target, with the parameters being parsed from the config file. Signed-off-by: Sughosh Ganu --- Changes since V1: * Add a cfg-file parameter to pass the config file to the mkeficapsule tool. This results in generation of the same tool

[PATCH v2 2/8] capsule: authenticate: Embed capsule public key in platform's dtb

2023-06-24 Thread Sughosh Ganu
x27;s that are packaged into the FIT image. The path to the ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE symbol. Signed-off-by: Sughosh Ganu --- Changes since V1: * Achieve the embedding of the ESL into the DTB through binman * Add an entry type fdt-esl-embed for embedding the E

[PATCH v2 6/8] Makefile: Add a target for building capsules

2023-06-24 Thread Sughosh Ganu
Add a target for building EFI capsules. The capsule parameters are specified through a config file, and the path to the config file is specified through CONFIG_EFI_CAPSULE_CFG_FILE. When the config file is not specified, the command only builds tools. Signed-off-by: Sughosh Ganu --- Changes

[PATCH v2 3/8] test: py: Change capsule authenticate test flow

2023-06-24 Thread Sughosh Ganu
uild. The binman node needed for invoking the corresponding entry module for embedding the ESL has been added for sandbox to facilitate testing. Signed-off-by: Sughosh Ganu --- Changes since V1: * Add the logic to generate the keys in the yml files which get used in the CI setup. * Add a fdt

[PATCH v2 1/8] fdt_add_pubkey: Add support for adding ESL public key under signature node

2023-06-24 Thread Sughosh Ganu
key added for FIT signature verification, the ESL file contents are added as a whole, as a property under the signature node in the DTB. The public key in the ESL form is used by the capsule authentication feature for authenticating the capsules, prior to update. Signed-off-by: Sughosh Ganu

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-26 Thread Sughosh Ganu
hi Simon, On Mon, 26 Jun 2023 at 14:38, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 21 Jun 2023 at 05:26, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Mon, 19 Jun 2023 at 18:07, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-26 Thread Sughosh Ganu
hi Simon, On Mon, 26 Jun 2023 at 17:43, Sughosh Ganu wrote: > > hi Simon, > > On Mon, 26 Jun 2023 at 14:38, Simon Glass wrote: > > > > Hi Sughosh, > > > > On Wed, 21 Jun 2023 at 05:26, Sughosh Ganu wrote: > > > > > > hi Simon, > &

Re: [PATCH 1/7] capsule: authenticate: Embed capsule public key in platform's dtb

2023-06-27 Thread Sughosh Ganu
hi Simon, On Tue, 27 Jun 2023 at 15:44, Simon Glass wrote: > > Hi, > > On Tue, 27 Jun 2023 at 10:55, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Mon, 26 Jun 2023 at 14:19, Simon Glass wrote: > > > > > > Hi Ilias, > > > > > > On Mon, 26 Jun 2023 at 10:53, Ilias Apalodimas > > > wrote

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-27 Thread Sughosh Ganu
hi Simon, On Tue, 27 Jun 2023 at 16:50, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 27 Jun 2023 at 05:57, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Mon, 26 Jun 2023 at 17:43, Sughosh Ganu wrote: > > > > > > hi Simon, > &

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-27 Thread Sughosh Ganu
hi Simon, On Tue, 27 Jun 2023 at 17:51, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 27 Jun 2023 at 13:08, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Tue, 27 Jun 2023 at 16:50, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-28 Thread Sughosh Ganu
hi Simon, On Wed, 28 Jun 2023 at 13:12, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 27 Jun 2023 at 18:42, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Tue, 27 Jun 2023 at 17:51, Simon Glass wrote: > > > > > > Hi Sughosh,

Re: [PATCH 5/7] Makefile: Add a target for building capsules

2023-06-28 Thread Sughosh Ganu
hi Simon, On Wed, 28 Jun 2023 at 15:49, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 28 Jun 2023 at 11:00, Sughosh Ganu wrote: > > > > hi Simon, > > > > On Wed, 28 Jun 2023 at 13:12, Simon Glass wrote: > > > > > > Hi Sughosh,

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

2024-08-05 Thread Sughosh Ganu
On Mon, 29 Jul 2024 at 20:56, Simon Glass wrote: > > Hi Sughosh, > > On Mon, 29 Jul 2024 at 02:40, Sughosh Ganu wrote: > > > > On Fri, 26 Jul 2024 at 05:02, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Wed, 24 Jul 2024

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

2024-08-06 Thread Sughosh Ganu
On Wed, 7 Aug 2024 at 03:21, Simon Glass wrote: > > Hi Sughosh, > > On Mon, 5 Aug 2024 at 05:55, Sughosh Ganu wrote: > > > > On Mon, 29 Jul 2024 at 20:56, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Mon, 29 Jul 2024 at 0

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Sughosh Ganu
On Thu, 8 Aug 2024 at 11:05, Michal Simek wrote: > > > > On 8/7/24 23:12, Tom Rini wrote: > > On Tue, Aug 06, 2024 at 05:37:00PM +0530, Prasad Kummari wrote: > > > >> Added LMB API to prevent SF command from overwriting reserved > >> memory areas. The current SPI code does not use LMB APIs for > >

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

2024-08-09 Thread Sughosh Ganu
On Thu, 8 Aug 2024 at 19:58, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 7 Aug 2024 at 00:32, Sughosh Ganu wrote: > > > > On Wed, 7 Aug 2024 at 03:21, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Mon, 5 Aug 2024 at 05:

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

2024-08-14 Thread Sughosh Ganu
On Fri, 9 Aug 2024 at 21:28, Simon Glass wrote: > > Hi Sughosh, > > On Fri, 9 Aug 2024 at 02:25, Sughosh Ganu wrote: > > > > On Thu, 8 Aug 2024 at 19:58, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Wed, 7 Aug 2024 at 00

[PATCH v2 00/32] Make LMB memory map global and persistent

2024-08-14 Thread Sughosh Ganu
). * Add a function for setting up a new and separate lmb instance for the tests(sjg). * Add functions to push and pop the lmb pointer for running lmb tests(sjg). * Get the alloced lists through the lmb_get() function. Sughosh Ganu (32): alist: add a helper to check if the list is full

[PATCH v2 01/32] alist: add a helper to check if the list is full

2024-08-14 Thread Sughosh Ganu
Add a helper function to check if the alist is full. This can then be used to extend the alist. Signed-off-by: Sughosh Ganu --- Changes since V1: * Do away with the alist_empty() function, as it is no longer needed include/alist.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH v2 02/32] lmb: ut: disable unit tests for lmb changes

2024-08-14 Thread Sughosh Ganu
d the corresponding test code changes have been made. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/sandbox64_defconfig| 4 +--- configs/sandbox_defconfig | 7 --- configs/sandbox_flattree_defconfig | 4 +--- configs/sandbox_noinst_defconfig | 8 co

[PATCH v2 03/32] lmb: remove the unused lmb_is_reserved() function

2024-08-14 Thread Sughosh Ganu
The lmb_is_reserved() API is not used. There is another API, lmb_is_reserved_flags() which can be used to check if a particular memory region is reserved. Remove the unused API. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V1: None

[PATCH v2 04/32] lmb: staticize __lmb_alloc_base()

2024-08-14 Thread Sughosh Ganu
The __lmb_alloc_base() function is only called from within the lmb module. Moreover, the lmb_alloc() and lmb_alloc_base() API's are good enough for the allocation API calls. Make the __lmb_alloc_base() function static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by:

[PATCH v2 05/32] lmb: use the BIT macro for lmb flags

2024-08-14 Thread Sughosh Ganu
Use the BIT macro for assigning values to the LMB flags instead of assigning random values to them. Signed-off-by: Sughosh Ganu --- Changes since V1: None include/lmb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 7b87181b9e

[PATCH v2 06/32] lmb: make LMB memory map persistent and global

2024-08-14 Thread Sughosh Ganu
e for the available(free) memory, and one for the used memory. Once full, the list can then be extended at runtime. Signed-off-by: Sughosh Ganu Signed-off-by: Simon Glass [sjg: Optimise the logic to add a region in lmb_add_region_flags()] --- Changes since V1: * Keep the alloced lists for use

[PATCH v2 07/32] lmb: allow for resizing lmb regions

2024-08-14 Thread Sughosh Ganu
this attribute would indicate that the region cannot be resized. Signed-off-by: Sughosh Ganu --- Changes since V1: * Handle all cases for merging regions in the lmb_resize_regions() function, thus removing the need for lmb_merge_overlap_regions(). * Do away with lmb_region_flags_match() as there

[PATCH v2 08/32] lmb: remove config symbols used for lmb region count

2024-08-14 Thread Sughosh Ganu
the earlier implementation of static arrays. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V1: None configs/a3y17lte_defconfig | 1 - configs/a5y17lte_defconfig | 1 - configs/a7y17lte_defconfig | 1

[PATCH v2 09/32] test: lmb: remove the test for max regions

2024-08-14 Thread Sughosh Ganu
The LMB memory map is now persistent and global, and the CONFIG_LMB_USE_MAX_REGIONS config symbol has now been removed. Remove the corresponding lmb test case. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V1: None test/lib/lmb.c | 67

[PATCH v2 10/32] lmb: config: add lmb config symbols for SPL

2024-08-14 Thread Sughosh Ganu
heap in SPL. Signed-off-by: Sughosh Ganu --- Changes since V1: None lib/Kconfig | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig b/lib/Kconfig index f8ac8daad3..6a9338390a 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1103,7 +1103,17 @@ config LMB

[PATCH v2 11/32] lmb: allow lmb module to be used in SPL

2024-08-14 Thread Sughosh Ganu
With the introduction of separate config symbols for the SPL phase of U-Boot, the condition checks need to be tweaked so that platforms that enable the LMB module in SPL are also able to call the LMB API's. Use the appropriate condition checks to achieve this. Signed-off-by: Sughosh

[PATCH v2 12/32] lmb: remove the lmb_init_and_reserve() function

2024-08-14 Thread Sughosh Ganu
With the changes to make the LMB reservations persistent, the common memory regions are being added during board init. Remove the now superfluous lmb_init_and_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V1: None

[PATCH v2 13/32] lmb: remove lmb_init_and_reserve_range() function

2024-08-14 Thread Sughosh Ganu
With the move to make the LMB allocations persistent and the common memory regions being reserved during board init, there is no need for an explicit reservation of a memory range. Remove the lmb_init_and_reserve_range() function. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas

[PATCH v2 14/32] lmb: introduce a function to add memory to the lmb memory map

2024-08-14 Thread Sughosh Ganu
Introduce a function lmb_add_memory() to add available memory to the LMB memory map. Call this function during board init once the LMB data structures have been initialised. Signed-off-by: Sughosh Ganu --- Changes since V1: * Call the lmb_add_memory() from lmb_init() instead of

[PATCH v2 15/32] lmb: reserve common areas during board init

2024-08-14 Thread Sughosh Ganu
ned-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V1: None lib/lmb.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index f35a94c41b..a661dd2c4c 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -13,6 +13,7 @@

[PATCH v2 16/32] lmb: bootm: remove superfluous lmb stub functions

2024-08-14 Thread Sughosh Ganu
Remove a couple of superfluous LMB stub functions, and instead put a check for calling the lmb_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V1: None boot/bootm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/boot

[PATCH v2 17/32] lmb: init: initialise the lmb data structures during board init

2024-08-14 Thread Sughosh Ganu
the board init. Signed-off-by: Sughosh Ganu --- Changes since V1: * Move the initr_lmb() function to board_r.c * Call lmb_init() from spl.c instead of initr_lmb(). common/board_r.c | 17 + common/spl/spl.c | 3 +++ 2 files changed, 20 insertions(+) diff --git a/common/board_r.c

[PATCH v2 19/32] sandbox: move the TCG event log to the start of ram memory

2024-08-14 Thread Sughosh Ganu
memory map specified in the documentation accordingly. Signed-off-by: Sughosh Ganu --- Changes since V1: * Rejig the memory map to have the event log at 0xb000 and bloblist at 0xd000. * Update the memory map in the document accordingly. arch/sandbox/dts/test.dts| 2 +- common/Kconfig

[PATCH v2 18/32] lmb: add a common implementation of arch_lmb_reserve()

2024-08-14 Thread Sughosh Ganu
of using the current value of stack pointer for starting the reserved region, have a fixed value, considering the stack size config value. Signed-off-by: Sughosh Ganu --- Changes since V1: None arch/arc/lib/cache.c| 14 -- arch/arm/lib/stack.c| 14 -- arch

[PATCH v2 20/32] spl: call spl_board_init() at the end of the spl init sequence

2024-08-14 Thread Sughosh Ganu
LMB memory map. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V1: None common/spl/spl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 4102e25115..f58c1f97b9 100644 --- a/common/spl/spl.c +++ b/common

[PATCH v2 21/32] spl: sandbox: initialise the ram banksize in spl

2024-08-14 Thread Sughosh Ganu
Initialise the ram bank information for sandbox in SPL. This is needed for adding available memory to the LMB memory map, which is done as part of the initialisation sequence. Signed-off-by: Sughosh Ganu --- Changes since V1: * Update the commit message to explain why this change is being done

[PATCH v2 22/32] sandbox: spl: enable lmb config for SPL

2024-08-14 Thread Sughosh Ganu
Enable the LMB config in SPL. This helps in testing the LMB code in SPL on sandbox. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig| 1 + 2 files changed, 2 insertions(+) diff --git a/configs

[PATCH v2 23/32] sandbox: iommu: remove lmb allocation in the driver

2024-08-14 Thread Sughosh Ganu
memory range has other side effects. On the other hand, the sandbox iommu test expects to see this particular value of the DVA. Use the DVA address directly, instead of mapping it in the LMB memory map, and then have it allocated. Signed-off-by: Sughosh Ganu --- Changes since V1: * Move the DVA address

[PATCH v2 24/32] zynq: lmb: do not add to lmb map before relocation

2024-08-14 Thread Sughosh Ganu
The LMB memory is typically not needed very early in the platform's boot. Do not add memory to the LMB map before relocation. Reservation of common areas and adding of memory is done after relocation. Signed-off-by: Sughosh Ganu --- Changes since V1: None board/xilinx/common/board.c

[PATCH v2 25/32] stm32mp: allow calling optee_get_reserved_memory() from U-Boot

2024-08-14 Thread Sughosh Ganu
used to compute the ram_top address. Signed-off-by: Sughosh Ganu --- Changes since V1: New patch arch/arm/mach-stm32mp/dram_init.c| 17 + arch/arm/mach-stm32mp/include/mach/stm32mp.h | 11 +++ arch/arm/mach-stm32mp/stm32mp1/spl.c | 17

<    10   11   12   13   14   15   16   17   18   19   >