Re: [PATCH 1/1] efi_loader: add missing check in FMP.GetImageInfo()

2025-07-09 Thread Sughosh Ganu
On Tue, 8 Jul 2025 at 18:21, Ilias Apalodimas wrote: > > On Tue, 8 Jul 2025 at 15:20, Heinrich Schuchardt > wrote: > > > > On 08.07.25 13:56, Ilias Apalodimas wrote: > > > Hi Heinrich > > > > > > On Tue, 8 Jul 2025 at 14:48, Heinrich Schuchardt > > > wrote: > > >> > > >> The UEFI 2.11 specificat

Re: New Defects reported by Coverity Scan for Das U-Boot

2025-07-09 Thread Sughosh Ganu
On Tue, 8 Jul 2025 at 19:40, Tom Rini wrote: > > Hey all, > > Good news, Coverity Scan resumed putting information in the email > report. Bad news, 20 new issues now that next has been merged. > > -- Forwarded message - > From: > Date: Mon, Jul 7, 2025 at 5:39 PM > Subject: New De

Re: [PATCH 1/1] lmb: add missing fallthrough in lmb_alloc_mem()

2025-07-08 Thread Sughosh Ganu
On Tue, 8 Jul 2025 at 17:43, Heinrich Schuchardt wrote: > > Add fallthrough to clarify the intent. > > Addresses-Coverity-ID: CID 569481: Control flow issues (MISSING_BREAK) > Signed-off-by: Heinrich Schuchardt > --- > lib/lmb.c | 1 + > 1 file changed, 1 insertion(+)

Re: [PATCH v2 2/2] board: xilinx: update guid based on metadata

2025-07-07 Thread Sughosh Ganu
On Mon, 7 Jul 2025 at 16:09, Padmarao Begari wrote: > > The generated GUID applies to all Xilinx platforms but is not > specific to any individual board. For FWU multi bank update, > use the image UUID (GUID) from the FWU metadata structure > rather than embedding a generated GUID into the U-Boot

Re: [PATCH v2 1/2] FWU: Add platform hook support for fwu metata

2025-07-07 Thread Sughosh Ganu
On Mon, 7 Jul 2025 at 16:09, Padmarao Begari wrote: > > FWU metadata information is unavailable for platform-specific > operations since FWU initialization has not yet occurred. > The initialization function is invoked as part of the main > loop event. To address this, the FWU platform hook functi

Re: [PATCH 2/2] board: xilinx: update guid based on metadata

2025-07-03 Thread Sughosh Ganu
On Mon, 16 Jun 2025 at 15:15, Padmarao Begari wrote: > > The generated GUID applies to all Xilinx platforms but is not > specific to any individual board. For FWU multi bank update, > use the image UUID (GUID) from the FWU metadata structure > rather than embedding a generated GUID into the U-Boot

Re: [PATCH 1/2] FWU: Add platform hook support for fwu metadata

2025-07-03 Thread Sughosh Ganu
On Mon, 16 Jun 2025 at 15:15, Padmarao Begari wrote: > > FWU metadata information is unavailable for platform-specific > operations since FWU initialization has not yet occurred. > The initialization function is invoked as part of the main > loop event. To address this, the FWU platform hook funct

[PATCH v5 2/2] test: wget: add a test case for validating URI

2025-07-02 Thread Sughosh Ganu
The wget module has a function wget_validate_uri() which is used for validating the URI to be used by wget. Add a basic test case for this function. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- Changes since V4: None test/cmd/wget.c | 20

[PATCH v5 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-07-02 Thread Sughosh Ganu
The eficonfig command provides a menu based interface for maintenance of the EFI boot options. Add support for adding a URI based boot option. This boot option can then be used for HTTP boot. Signed-off-by: Sughosh Ganu --- Changes since V4: * Clear out the URI string in

[PATCH v5 0/2] eficonfig: add support for URI based boot option

2025-07-02 Thread Sughosh Ganu
#x27;Clear' menu - patch 1. * Display the URI string as part of editing the boot option by putting a check in prepare_file_selection_entry() - patch 1. * Clear out the URI string in eficonfig_process_select_file() if a file is being selected from one of the disk volumes - patch 1. Sughosh

[PATCH v4 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-07-01 Thread Sughosh Ganu
The eficonfig command provides a menu based interface for maintenance of the EFI boot options. Add support for adding a URI based boot option. This boot option can then be used for HTTP boot. Signed-off-by: Sughosh Ganu --- Changes since V3: * Do away with boot_file_option member of struct

[PATCH v4 0/2] eficonfig: add support for URI based boot option

2025-07-01 Thread Sughosh Ganu
e uri pointer being non-null in eficonfig_process_show_file_option() for selecting menu items - patch 1. * Put a check for lo.file_path in eficonfig_edit_boot_option() before calling fill_file_info() - patch 1 Sughosh Ganu (2): cmd: eficonfig: add support for URI device path based boot options

[PATCH v4 2/2] test: wget: add a test case for validating URI

2025-07-01 Thread Sughosh Ganu
The wget module has a function wget_validate_uri() which is used for validating the URI to be used by wget. Add a basic test case for this function. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- Changes since V3: None test/cmd/wget.c | 20

Re: [PATCH v3 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-07-01 Thread Sughosh Ganu
On Tue, 1 Jul 2025 at 13:54, Sughosh Ganu wrote: > > On Tue, 1 Jul 2025 at 13:21, Ilias Apalodimas > wrote: > > > > Hi Sughosh > > > > [...] > > > > > + > > > static struct eficonfig_item select_file_menu_items[] = { &g

Re: [PATCH v3 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-07-01 Thread Sughosh Ganu
On Tue, 1 Jul 2025 at 13:21, Ilias Apalodimas wrote: > > Hi Sughosh > > [...] > > > + > > static struct eficonfig_item select_file_menu_items[] = { > > {"Select File", eficonfig_process_select_file}, > > {"Clear", eficonfig_process_clear_file_selection}, > > @@ -1042,16 +1101,30 @

Re: [PATCH v3 0/2] eficonfig: add support for URI based boot option

2025-06-29 Thread Sughosh Ganu
ll_dp_uri() - patch 1 > > * Remove some superfluous newlines added - patch 1 > > > > > > Sughosh Ganu (2): > > cmd: eficonfig: add support for URI device path based boot options > > test: wget: add a test case for validating URI > > > > cmd/eficonfig

[PATCH v3 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-06-27 Thread Sughosh Ganu
The eficonfig command provides a menu based interface for maintenance of the EFI boot options. Add support for adding a URI based boot option. This boot option can then be used for HTTP boot. Signed-off-by: Sughosh Ganu --- Changes since V2: * Added comments for eficonfig_create_uri_device_path

[PATCH v3 0/2] eficonfig: add support for URI based boot option

2025-06-27 Thread Sughosh Ganu
p_uri() - patch 1 * Remove some superfluous newlines added - patch 1 Sughosh Ganu (2): cmd: eficonfig: add support for URI device path based boot options test: wget: add a test case for validating URI cmd/eficonfig.c | 131 --- include/efi_config.h

[PATCH v3 2/2] test: wget: add a test case for validating URI

2025-06-27 Thread Sughosh Ganu
The wget module has a function wget_validate_uri() which is used for validating the URI to be used by wget. Add a basic test case for this function. Signed-off-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt --- test/cmd/wget.c | 20 1 file changed, 20 insertions

Re: [PATCH v2 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-06-26 Thread Sughosh Ganu
On Thu, 26 Jun 2025 at 13:52, Heinrich Schuchardt wrote: > > On 24.06.25 14:07, Sughosh Ganu wrote: > > The eficonfig command provides a menu based interface for maintenance > > of the EFI boot options. Add support for adding a URI based boot > > option. This boot option c

[PATCH v2 2/2] test: wget: add a test case for validating URI

2025-06-24 Thread Sughosh Ganu
The wget module has a function wget_validate_uri() which is used for validating the URI to be used by wget. Add a basic test case for this function. Signed-off-by: Sughosh Ganu --- Changes since V2: New patch test/cmd/wget.c | 20 1 file changed, 20 insertions(+) diff

[PATCH v2 1/2] cmd: eficonfig: add support for URI device path based boot options

2025-06-24 Thread Sughosh Ganu
The eficonfig command provides a menu based interface for maintenance of the EFI boot options. Add support for adding a URI based boot option. This boot option can then be used for HTTP boot. Signed-off-by: Sughosh Ganu --- Changes since V1: * Move the option for entering the URI under the boot

[PATCH v2 0/2] eficonfig: add support for URI based boot option

2025-06-24 Thread Sughosh Ganu
anges needed for the above change - patch 1. Sughosh Ganu (2): cmd: eficonfig: add support for URI device path based boot options test: wget: add a test case for validating URI cmd/eficonfig.c | 113 --- include/efi_config.h | 4 ++ test/cmd/w

Re: [PATCH] cmd: eficonfig: add support for URI device path based boot options

2025-06-22 Thread Sughosh Ganu
On Tue, 17 Jun 2025 at 11:46, Ilias Apalodimas wrote: > > Hi Heinrich, Sughosh > > On Tue, 17 Jun 2025 at 00:53, Heinrich Schuchardt wrote: > > > > On 6/16/25 12:23, Sughosh Ganu wrote: > > > The eficonfig command provides a menu based interface for maintenance &

[PATCH v5 3/7] lmb: staticise lmb_add_memory()

2025-06-17 Thread Sughosh Ganu
lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V4: None include/lmb.h | 8 lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h

[PATCH v5 7/7] doc: add lmb documentation

2025-06-17 Thread Sughosh Ganu
The LMB module has undergone significant changes in the recent past. Add a document which briefly describes what the LMB module does, and the changes that have been made to it's design since the 2025.01 release. Signed-off-by: Sughosh Ganu Acked-by: Ilias Apalodimas --- Changes since V4:

[PATCH v5 6/7] mach-snapdragon: add a check before copying FDT to fdt_addr_r

2025-06-17 Thread Sughosh Ganu
allocated. Add a check that the memory allocation has succeeded before copying the device-tree. Signed-off-by: Sughosh Ganu --- Changes since V4: None arch/arm/mach-snapdragon/board.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-snapdragon/board.c b

[PATCH v5 5/7] lmb: use a single function to check for allocation and reservation requests

2025-06-17 Thread Sughosh Ganu
overlap. Combine these two checks in a single function, lmb_overlap_checks() as both lmb_overlaps_region() and lmb_can_reserve_region() are pretty similar otherwise. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V4: None lib/lmb.c | 84

[PATCH v5 4/7] lmb: use a single function to free up memory

2025-06-17 Thread Sughosh Ganu
There is no need to have two separate API's for freeing up memory. Use a single API lmb_free() to achieve this. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V4: None boot/image-fdt.c| 2 +- cmd/load.c | 2 +- include/

[PATCH v5 1/7] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-06-17 Thread Sughosh Ganu
erve() API functionality and use the functionality provided by lmb_alloc_addr() instead. The lmb_alloc_addr() will check if the requested address is part of the LMB memory map and return an error if not. Signed-off-by: Sughosh Ganu Acked-by: Ilias Apalodimas --- Changes since V4: * Remove the superflu

[PATCH v5 2/7] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-17 Thread Sughosh Ganu
There currently are two API's for requesting memory from the LMB module, lmb_alloc() and lmb_alloc_base(). The function which does the actual allocation is the same. Use the earlier introduced API lmb_alloc_mem() for both types of allocation requests. Signed-off-by: Sughosh Ganu Acked-by:

[PATCH v5 0/7] lmb: use a single API for all allocations

2025-06-17 Thread Sughosh Ganu
e superfluous return from _lmb_alloc_addr() - patch 1 Sughosh Ganu (7): lmb: replace lmb_reserve() and lmb_alloc_addr() API's lmb: replace the lmb_alloc() and lmb_alloc_base() API's lmb: staticise lmb_add_memory() lmb: use a single function to free up memory lmb: use a single f

Re: [PATCH] cmd: eficonfig: add support for URI device path based boot options

2025-06-16 Thread Sughosh Ganu
On Tue, 17 Jun 2025 at 03:23, Heinrich Schuchardt wrote: > > On 6/16/25 12:23, Sughosh Ganu wrote: > > The eficonfig command provides a menu based interface for maintenance > > of the EFI boot options. Add support for adding a URI based boot > > option. This boot option c

[PATCH] cmd: eficonfig: add support for URI device path based boot options

2025-06-16 Thread Sughosh Ganu
The eficonfig command provides a menu based interface for maintenance of the EFI boot options. Add support for adding a URI based boot option. This boot option can then be used for HTTP boot. Signed-off-by: Sughosh Ganu --- Note: I had explored adding a corresponding test for this change. But

[PATCH v4 0/7] lmb: use a single API for all allocations

2025-06-12 Thread Sughosh Ganu
n the API returns success - patch 2 * New patch for checking the return value of allocation before copy of device-tree - patch 6 Sughosh Ganu (7): lmb: replace lmb_reserve() and lmb_alloc_addr() API's lmb: replace the lmb_alloc() and lmb_alloc_base() API's lmb: staticise lmb_add_me

[PATCH v4 2/7] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-12 Thread Sughosh Ganu
There currently are two API's for requesting memory from the LMB module, lmb_alloc() and lmb_alloc_base(). The function which does the actual allocation is the same. Use the earlier introduced API lmb_alloc_mem() for both types of allocation requests. Signed-off-by: Sughosh Ganu --- Ch

[PATCH v4 3/7] lmb: staticise lmb_add_memory()

2025-06-12 Thread Sughosh Ganu
lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V3: None include/lmb.h | 8 lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h

[PATCH v4 6/7] mach-snapdragon: add a check before copying FDT to fdt_addr_r

2025-06-11 Thread Sughosh Ganu
allocated. Add a check that the memory allocation has succeeded before copying the device-tree. Signed-off-by: Sughosh Ganu --- Changes since V3: New patch arch/arm/mach-snapdragon/board.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-snapdragon

[PATCH v4 7/7] doc: add lmb documentation

2025-06-11 Thread Sughosh Ganu
The LMB module has undergone significant changes in the recent past. Add a document which briefly describes what the LMB module does, and the changes that have been made to it's design since the 2025.01 release. Signed-off-by: Sughosh Ganu Acked-by: Ilias Apalodimas --- Changes since V3:

[PATCH v4 5/7] lmb: use a single function to check for allocation and reservation requests

2025-06-11 Thread Sughosh Ganu
overlap. Combine these two checks in a single function, lmb_overlap_checks() as both lmb_overlaps_region() and lmb_can_reserve_region() are pretty similar otherwise. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V3: None lib/lmb.c | 84

[PATCH v4 4/7] lmb: use a single function to free up memory

2025-06-11 Thread Sughosh Ganu
There is no need to have two separate API's for freeing up memory. Use a single API lmb_free() to achieve this. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V3: None boot/image-fdt.c| 2 +- cmd/load.c | 2 +- include/

[PATCH v4 1/7] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-06-11 Thread Sughosh Ganu
erve() API functionality and use the functionality provided by lmb_alloc_addr() instead. The lmb_alloc_addr() will check if the requested address is part of the LMB memory map and return an error if not. Signed-off-by: Sughosh Ganu --- Changes since V3: * s/addr/dest_addr in load_serial() for use with t

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-09 Thread Sughosh Ganu
On Wed, 4 Jun 2025 at 16:08, Sughosh Ganu wrote: > > On Wed, 4 Jun 2025 at 12:53, Ilias Apalodimas > wrote: > > > > [...] > > > > > > > > > > > > > > > > > > > > > > > This tends to blow up in ran

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-04 Thread Sughosh Ganu
On Wed, 4 Jun 2025 at 12:53, Ilias Apalodimas wrote: > > [...] > > > > > > > > > > > > > > > > > > > This tends to blow up in random ways. See > > > > > > commit 67be24906fe. TL;DR 0 is a valid address in some systems. > > > > > > > > > > Yes, I see your point. I think the calling function will ha

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-03 Thread Sughosh Ganu
On Tue, 3 Jun 2025 at 23:52, Heinrich Schuchardt wrote: > > Am 3. Juni 2025 18:22:46 MESZ schrieb Tom Rini : > >On Tue, Jun 03, 2025 at 12:14:44PM +0530, Sughosh Ganu wrote: > >> On Fri, 30 May 2025 at 15:41, Sughosh Ganu wrote: > >> > > >> > O

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-03 Thread Sughosh Ganu
On Tue, 3 Jun 2025 at 23:56, Ilias Apalodimas wrote: > > On Tue, 3 Jun 2025 at 09:44, Sughosh Ganu wrote: > > > > On Fri, 30 May 2025 at 15:41, Sughosh Ganu wrote: > > > > > > On Fri, 30 May 2025 at 13:17, Ilias Apalodimas > > > wrote: &g

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-06-02 Thread Sughosh Ganu
On Fri, 30 May 2025 at 15:41, Sughosh Ganu wrote: > > On Fri, 30 May 2025 at 13:17, Ilias Apalodimas > wrote: > > > > > +static phys_addr_t lmb_alloc(phys_size_t size) > > > +{ > > > + int ret; > > > + phys_addr_t addr; > >

Re: [PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-05-30 Thread Sughosh Ganu
On Fri, 30 May 2025 at 13:17, Ilias Apalodimas wrote: > > > +static phys_addr_t lmb_alloc(phys_size_t size) > > +{ > > + int ret; > > + phys_addr_t addr; > > + > > + /* All memory regions allocated with a 2MiB alignment */ > > + ret = lmb_alloc_mem(LMB_MEM_ALLOC_ANY, SZ_2M,

Re: [PATCH v3 1/6] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-30 Thread Sughosh Ganu
On Fri, 30 May 2025 at 13:02, Ilias Apalodimas wrote: > > Hi Sughosh > > [...] > > > > /* > > * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not > > diff --git a/cmd/load.c b/cmd/load.c > > index 899bb4f598e..c3ef307bb68 100644 > > --- a/cmd/load.c > > +++ b/cmd/load.

[PATCH v3 2/6] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-05-26 Thread Sughosh Ganu
There currently are two API's for requesting memory from the LMB module, lmb_alloc() and lmb_alloc_base(). The function which does the actual allocation is the same. Use the earlier introduced API lmb_alloc_mem() for both types of allocation requests. Signed-off-by: Sughosh Ganu --- Ch

[PATCH v3 6/6] doc: add lmb documentation

2025-05-26 Thread Sughosh Ganu
The LMB module has undergone significant changes in the recent past. Add a document which briefly describes what the LMB module does, and the changes that have been made to it's design since the 2025.01 release. Signed-off-by: Sughosh Ganu --- Changes since V2: * Reflect the changed name o

[PATCH v3 3/6] lmb: staticise lmb_add_memory()

2025-05-26 Thread Sughosh Ganu
lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V2: None include/lmb.h | 8 lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h

[PATCH v3 5/6] lmb: use a single function to check for allocation and reservation requests

2025-05-26 Thread Sughosh Ganu
overlap. Combine these two checks in a single function, lmb_overlap_checks() as both lmb_overlaps_region() and lmb_can_reserve_region() are pretty similar otherwise. Signed-off-by: Sughosh Ganu --- Changes since V2: * New patch based on suggestion from Ilias lib/lmb.c | 84

[PATCH v3 4/6] lmb: use a single function to free up memory

2025-05-26 Thread Sughosh Ganu
There is no need to have two separate API's for freeing up memory. Use a single API lmb_free() to achieve this. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V2: None boot/image-fdt.c| 2 +- cmd/load.c | 2 +- include/

[PATCH v3 1/6] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-26 Thread Sughosh Ganu
erve() API functionality and use the functionality provided by lmb_alloc_addr() instead. The lmb_alloc_addr() will check if the requested address is part of the LMB memory map and return an error if not. Signed-off-by: Sughosh Ganu --- Changes since V2: * Changed the API name to lmb_alloc_mem() based on

[PATCH v3 0/6] lmb: use a single API for all allocations

2025-05-26 Thread Sughosh Ganu
narios. Changes since V2: * Changed the API name to lmb_alloc_mem() based on suggestion from Ilias - patch 1 * Changed the API name to lmb_alloc_mem() based on suggestion from Ilias - patch 2 * New patch based on suggestion from Ilias - patch 5 * Reflect the changed name of the API (lmb_alloc_mem)

Re: [PATCH v2 1/5] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-21 Thread Sughosh Ganu
On Wed, 21 May 2025 at 14:48, Sughosh Ganu wrote: > > On Wed, 21 May 2025 at 13:23, Ilias Apalodimas > wrote: > > > > Hi Sughosh > > > > On Tue May 20, 2025 at 3:06 PM EEST, Sughosh Ganu wrote: > > > There currently are multiple allocation API's

Re: [PATCH v2 1/5] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-21 Thread Sughosh Ganu
On Wed, 21 May 2025 at 13:23, Ilias Apalodimas wrote: > > Hi Sughosh > > On Tue May 20, 2025 at 3:06 PM EEST, Sughosh Ganu wrote: > > There currently are multiple allocation API's in the LMB module. There > > are a couple of API's for allocating memory(lmb_allo

[PATCH v2 4/5] lmb: use a single function to free up memory

2025-05-20 Thread Sughosh Ganu
There is no need to have two separate API's for freeing up memory. Use a single API lmb_free() to achieve this. Signed-off-by: Sughosh Ganu --- Changes since V1: None boot/image-fdt.c| 2 +- cmd/load.c | 2 +- include/lmb.h | 6 ++---

[PATCH v2 5/5] doc: add lmb documentation

2025-05-20 Thread Sughosh Ganu
The LMB module has undergone significant changes in the recent past. Add a document which briefly describes what the LMB module does, and the changes that have been made to it's design since the 2025.01 release. Signed-off-by: Sughosh Ganu --- Changes since V1: None doc/api/index.rst

[PATCH v2 3/5] lmb: staticise lmb_add_memory()

2025-05-20 Thread Sughosh Ganu
lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas --- Changes since V1: None include/lmb.h | 8 lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h

[PATCH v2 2/5] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-05-20 Thread Sughosh Ganu
There currently are two API's for requesting memory from the LMB module, lmb_alloc() and lmb_alloc_base(). The function which does the actual allocation is the same. Use the earlier introduced API lmb_allocate_mem() for both types of allocation requests. Signed-off-by: Sughosh Ganu --- Ch

[PATCH v2 1/5] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-20 Thread Sughosh Ganu
erve() API functionality and use the functionality provided by lmb_alloc_addr() instead. The lmb_alloc_addr() will check if the requested address is part of the LMB memory map and return an error if not. Signed-off-by: Sughosh Ganu --- Changes since V1: * Check the return value of the lmb API in s

[PATCH v2 0/5] lmb: use a single API for all allocations

2025-05-20 Thread Sughosh Ganu
patch 2) * s/desired_addr/high_addr in boot_relocate_fdt(). (patch 2) * Fallthrough the LMB_MEM_ALLOC_ANY case in lmb_allocate_mem() as suggested by Ilias. (patch 2) Sughosh Ganu (5): lmb: replace lmb_reserve() and lmb_alloc_addr() API's lmb: replace the lmb_alloc() and lmb_alloc

Re: [PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-07 Thread Sughosh Ganu
On Wed, 7 May 2025 at 21:18, Tom Rini wrote: > > On Wed, May 07, 2025 at 03:11:38PM +0530, Sughosh Ganu wrote: > > On Wed, 7 May 2025 at 13:19, Sughosh Ganu wrote: > > > > > > On Tue, 6 May 2025 at 16:35, Heinrich Schuchardt > > > wrote: > > > &g

Re: [PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-07 Thread Sughosh Ganu
On Wed, 7 May 2025 at 13:19, Sughosh Ganu wrote: > > On Tue, 6 May 2025 at 16:35, Heinrich Schuchardt > wrote: > > > > > > > > Sughosh Ganu schrieb am Di., 6. Mai 2025, 12:50: > >> > >> On Tue, 6 May 2025 at 15:19, Heinrich Schuchardt >

Re: [PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-07 Thread Sughosh Ganu
On Tue, 6 May 2025 at 16:35, Heinrich Schuchardt wrote: > > > > Sughosh Ganu schrieb am Di., 6. Mai 2025, 12:50: >> >> On Tue, 6 May 2025 at 15:19, Heinrich Schuchardt >> wrote: >> > >> > On 5/6/25 11:24, Sughosh Ganu wrote: >> >

Re: [PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-06 Thread Sughosh Ganu
On Tue, 6 May 2025 at 16:35, Heinrich Schuchardt wrote: > > > > Sughosh Ganu schrieb am Di., 6. Mai 2025, 12:50: >> >> On Tue, 6 May 2025 at 15:19, Heinrich Schuchardt >> wrote: >> > >> > On 5/6/25 11:24, Sughosh Ganu wrote: >> >

Re: [PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-06 Thread Sughosh Ganu
On Tue, 6 May 2025 at 15:19, Heinrich Schuchardt wrote: > > On 5/6/25 11:24, Sughosh Ganu wrote: > > U-Boot has support for both the 32-bit and 64-bit RiscV platforms. Set > > the width of the phys_{addr,size}_t data types based on the register > > size of the archite

[PATCH] riscv: set the width of the physical address/size data type based on arch

2025-05-06 Thread Sughosh Ganu
upper 32-bits of the address variable contained garbage, resulting in failures. Signed-off-by: Sughosh Ganu --- Note: Although the LMB API cleanup series depends on this patch, I am sending it separately so that it gets noticed by the RiscV maintainers. Sometimes a patch may not get the required

Re: [PATCH 2/5] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-05-02 Thread Sughosh Ganu
On Fri, 2 May 2025 at 13:11, Ilias Apalodimas wrote: > > On Thu May 1, 2025 at 3:02 PM EEST, Sughosh Ganu wrote: > > There currently are two API's for requesting memory from the LMB > > module, lmb_alloc() and lmb_alloc_base(). The function which does the > > actua

Re: [PATCH 1/5] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-02 Thread Sughosh Ganu
On Fri, 2 May 2025 at 12:21, Ilias Apalodimas wrote: > > Hi Sughosh, > > Thanks for cleaning this > > [...] > > > + * @flags: Memory region attributes to be set > > + * > > + * Allocate a region of memory where the allocation is based on the > > parameters > > + * that have been passed

Re: [PATCH 4/5] lmb: use a single function to free up memory

2025-05-02 Thread Sughosh Ganu
On Fri, 2 May 2025 at 12:30, Ilias Apalodimas wrote: > > On Thu May 1, 2025 at 3:02 PM EEST, Sughosh Ganu wrote: > > There is no need to have two separate API's for freeing up memory. Use > > a single API lmb_free() to achieve this. > > &g

[PATCH 0/5] lmb: use a single API for all allocations

2025-05-01 Thread Sughosh Ganu
calls being made from the architecture/platform specific code which too do not check the return value. Those have been kept the same, as I do not have the platform with me to check if it causes any issues on those platforms. Sughosh Ganu (5): lmb: replace lmb_reserve() and lmb_alloc_addr()

[PATCH 4/5] lmb: use a single function to free up memory

2025-05-01 Thread Sughosh Ganu
There is no need to have two separate API's for freeing up memory. Use a single API lmb_free() to achieve this. Signed-off-by: Sughosh Ganu --- boot/image-fdt.c| 2 +- cmd/load.c | 2 +- include/lmb.h | 6 ++--- lib/efi_loader/efi_memory.c

[PATCH 2/5] lmb: replace the lmb_alloc() and lmb_alloc_base() API's

2025-05-01 Thread Sughosh Ganu
There currently are two API's for requesting memory from the LMB module, lmb_alloc() and lmb_alloc_base(). The function which does the actual allocation is the same. Use the earlier introduced API lmb_allocate_mem() for both types of allocation requests. Signed-off-by: Sughosh Ganu --- arc

[PATCH 5/5] doc: add lmb documentation

2025-05-01 Thread Sughosh Ganu
The LMB module has undergone significant changes in the recent past. Add a document which briefly describes what the LMB module does, and the changes that have been made to it's design since the 2025.01 release. Signed-off-by: Sughosh Ganu --- doc/api/index.rst | 1 - doc/api/lm

[PATCH 3/5] lmb: staticise lmb_add_memory()

2025-05-01 Thread Sughosh Ganu
lmb_add_memory() is only called from the lmb module. Mark the function as static. Signed-off-by: Sughosh Ganu --- include/lmb.h | 8 lib/lmb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index be723d9162a..73df4e07248 100644

[PATCH 1/5] lmb: replace lmb_reserve() and lmb_alloc_addr() API's

2025-05-01 Thread Sughosh Ganu
erve() API functionality and use the functionality provided by lmb_alloc_addr() instead. The lmb_alloc_addr() will check if the requested address is part of the LMB memory map and return an error if not. Signed-off-by: Sughosh Ganu --- arch/arm/mach-mediatek/tzcfg.c | 8 +- arch/powerpc/cpu/mp

Re: [PATCH v5 4/4] net-lwip: tftp: add LMB and buffer checks

2025-04-24 Thread Sughosh Ganu
On Thu, 17 Apr 2025 at 18:57, Jerome Forissier wrote: > > Legacy NET tftp invokes a store_block() function which performs buffer > validation (LMB, address wrapping). Do the same with NET_LWIP. > > Signed-off-by: Jerome Forissier > Suggested-by: Sughosh Ganu > A

Re: [PATCH v5 3/4] net-lwip: wget: add LMB and buffer checks

2025-04-24 Thread Sughosh Ganu
On Thu, 17 Apr 2025 at 18:57, Jerome Forissier wrote: > > Legacy NET wget invokes a store_block() function which performs buffer > validation (LMB, address wrapping). Do the same with NET_LWIP. > > Signed-off-by: Jerome Forissier > Suggested-by: Sughosh Ganu > A

Re: [PATCH v5 0/4] NET_LWIP LMB fixes

2025-04-24 Thread Sughosh Ganu
+++- > 7 files changed, 159 insertions(+), 51 deletions(-) > Tested that the LMB checks are performed and wget/tftp commands do not overwrite on an existing LMB reservation. Tested-by: Sughosh Ganu -sughosh > -- > 2.43.0 >

Re: [PATCH] cmd: cls: do not repeat clearing of console

2025-04-23 Thread Sughosh Ganu
On Wed, 19 Mar 2025 at 16:50, Sughosh Ganu wrote: > > There is no need to repeat the command to clear the console. Remove > it's repeat attribute. > > Signed-off-by: Sughosh Ganu > --- Can this be merged if there is no objection to the change? Thanks. -sughosh >

[PATCH] lmb: use a different bit position for LMB_NOMAP

2025-04-23 Thread Sughosh Ganu
flags to a u32") Signed-off-by: Sughosh Ganu --- include/lmb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 0d316c64c0a..606a92cca48 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -27,9 +27,9 @@ * %LMB_NONOTIFY: Do not no

Re: [PATCH v4 2/4] net, net-lwip: wget: suppress console output when called by EFI

2025-04-16 Thread Sughosh Ganu
On Wed, 16 Apr 2025 at 01:04, Jerome Forissier wrote: > > Functions called from EFI applications should not do console output. > Refactor the wget code to implement this requirement. The wget_http_info > struct is used to hold the boolean that signifies whether the output is > allowed or not. > >

Re: [PATCH v3 1/3] net-lwip: wget_do_request(): do not print anything to the console

2025-04-14 Thread Sughosh Ganu
On Thu, 10 Apr 2025 at 20:46, Jerome Forissier wrote: > > Functions called from EFI applications should not call printf(). > Refactor wget_do_request() to implement this requirement. > > Signed-off-by: Jerome Forissier > Reported-by: Heinrich Schuchardt > --- > > Changes in v3: > - New patch: ne

Re: [RFC PATCH] cmd: fwu: Dump custom fields from mdata structure

2025-04-04 Thread Sughosh Ganu
printf("Custom fields covered by CRC 0x%x\n", diff); It would be better to mention that the value being printed is the length of the vendor data. Or not print the value. > + print_hex_dump_bytes("CUSTOM ", DUMP_PREFIX_OFFSET, > +

[PATCH] test: lmb: fix the lmb_alloc_addr() based test cases

2025-03-26 Thread Sughosh Ganu
s the return value of the lmb_alloc_addr() API, which now results in some of the tests added as part of the first commit to fail. Fix those test cases. Signed-off-by: Sughosh Ganu --- Note: To be applied on next test/lib/lmb.c | 50 +- 1 file chan

Re: [PATCH v9 2/8] efi_loader: install device-tree on configuration table on every invocation

2025-03-26 Thread Sughosh Ganu
On Wed, 26 Mar 2025 at 13:54, Ilias Apalodimas wrote: > > Hi Sughosh > > On Mon, 17 Mar 2025 at 10:34, Sughosh Ganu wrote: > > > > The efi_install_fdt() function is called before booting an EFI binary, > > either directly, or through a bootmanager. This function ins

Re: [RFC PATCH] cmd: fwu: Dump custom fields from mdata structure

2025-03-21 Thread Sughosh Ganu
On Fri, 21 Mar 2025 at 14:09, Michal Simek wrote: > > > > On 3/21/25 08:40, Sughosh Ganu wrote: > > On Wed, 5 Jun 2024 at 20:25, Michal Simek wrote: > >> > >> The commit cb9ae40a16f0 ("tools: mkfwumdata: add logic to append vendor > >> data to

[PATCH] cmd: cls: do not repeat clearing of console

2025-03-19 Thread Sughosh Ganu
There is no need to repeat the command to clear the console. Remove it's repeat attribute. Signed-off-by: Sughosh Ganu --- cmd/cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cls.c b/cmd/cls.c index 4bee8a18305..b1e0619334b 100644 --- a/cmd/cls.c +++ b/cmd/

Re: [RFC PATCH] cmd: fwu: Dump custom fields from mdata structure

2025-03-17 Thread Sughosh Ganu
On Mon, 17 Mar 2025 at 15:36, Michal Simek wrote: > > Hi Sughosh and Ilias, > > On 6/5/24 16:55, Michal Simek wrote: > > The commit cb9ae40a16f0 ("tools: mkfwumdata: add logic to append vendor > > data to the FWU metadata") added support for adding vendor data to mdata > > structure but it is not

Re: [PATCH] lmb: change the return code on lmb_alloc_addr()

2025-03-17 Thread Sughosh Ganu
ument, but then also > returns the address for success or failure and treats 0 as a failure. > > Since we already know the address change the prototype to return an int. > > Reported-by: Ben Schneider > Signed-off-by: Ilias Apalodimas > --- Reviewed-by: Sughosh Ganu

[PATCH v9 6/8] blkmap: store type of blkmap slice in corresponding structure

2025-03-17 Thread Sughosh Ganu
slice. Signed-off-by: Sughosh Ganu Reviewed-by: Tobias Waldekranz Reviewed-by: Ilias Apalodimas --- Changes since V8: * s/blkmap slice/blkmap slices/ in the commit message * Add comments to the macros added in the patch drivers/block/blkmap.c | 20 1 file changed, 20

[PATCH v9 8/8] blkmap: pass information on ISO image to the OS

2025-03-17 Thread Sughosh Ganu
the DT and removes the corresponding memory region from the EFI memory map. Invoke this helper function as part of the DT fixup which happens before booting the OS. Signed-off-by: Sughosh Ganu Reviewed-by: Tobias Waldekranz --- Changes since V8: * s/blkmap_get_preserved_

[PATCH v9 7/8] blkmap: add an attribute to preserve the mem mapping

2025-03-17 Thread Sughosh Ganu
ribute for such mappings. The code for adding a pmem node to the device-tree then checks if this attribute is set, and adds a node only for mappings which have this attribute. Signed-off-by: Sughosh Ganu Reviewed-by: Tobias Waldekranz Reviewed-by: Ilias Apalodimas --- Changes since V8: * Add c

[PATCH v9 4/8] efi_loader: allow for removal of memory from the EFI map

2025-03-17 Thread Sughosh Ganu
From: Ilias Apalodimas With upcoming changes supporting pmem nodes, we need to remove the pmem area from the EFI memory map. Rename efi_add_memory_map_pg() to efi_update_memory_map(), and allow removing memory from the EFI memory map. Signed-off-by: Ilias Apalodimas Signed-off-by: Sughosh Ganu

[PATCH v9 5/8] efi_loader: remove memory occupied by a ramdisk from EFI memory map

2025-03-17 Thread Sughosh Ganu
16MiB alignment, but since we don't have EFI support for it, limit the alignment to 2MiB. Ensure that the ISO image is 2MiB aligned and remove the region occupied by the image from the EFI memory map. Signed-off-by: Ilias Apalodimas Signed-off-by: Sughosh Ganu --- * Re-word the commit message t

[PATCH v9 3/8] fdt: add support for adding pmem nodes

2025-03-17 Thread Sughosh Ganu
place for DTs. Linux and device trees have support for persistent memory devices. So add a function that can inject a pmem node in a DT, so we can pass information on the ramdisk the OS. Signed-off-by: Masahisa Kojima Signed-off-by: Sughosh Ganu --- Changes since V8: * Re-word the commit messa

[PATCH v9 0/8] Add pmem node for preserving distro ISO's

2025-03-17 Thread Sughosh Ganu
ap efi_loader: remove memory occupied by a ramdisk from EFI memory map Masahisa Kojima (1): fdt: add support for adding pmem nodes Sughosh Ganu (5): efi_loader: remove unused code from copy_fdt() efi_loader: install device-tree on configuration table on every invocation blkmap: store

  1   2   3   4   5   6   7   8   9   10   >