[PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Heinrich Schuchardt
A system may have multiple SATA controller. Removing the controller with the lowest sequence number before probing all SATA controllers makes no sense. In sata_rescan we remove all block devices which are children of SATA controllers. We also have to remove the bootdev devices as they will be crea

[PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
uint64_t is defined as unsigned long long on 32bit ARM. Convert uint64_t values to unsigned long long and use %llX for printing. tools/mkeficapsule.c: In function ‘dump_capsule_auth_header’: tools/mkeficapsule.c:694:66: warning: format ‘%lX’ expects argument of type ‘long unsigned int’

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:32, Sughosh Ganu wrote: > > > > > > > > On Wed, 7 Aug 2024 at

Re: [PATCH v3 8/9] ubi: implement support for LED activity

2024-08-14 Thread Michael Nazzareno Trimarchi
Hi all On Wed, Aug 14, 2024 at 6:34 AM Heiko Schocher wrote: > > Hello Christian, > > On 12.08.24 12:32, Christian Marangi wrote: > > Implement support for LED activity. If the feature is enabled, > > make the defined ACTIVITY LED to signal ubi write operation. > > > > Signed-off-by: Christian Ma

Re: OF_UPSTREAM vs. additional dtbs

2024-08-14 Thread Jan Kiszka
On 13.08.24 14:52, Nishanth Menon wrote: > On 11:16-20240813, Jan Kiszka wrote: >> Hi all, >> >> I'm trying to migrate the TI AM65x IOT2050 boards to OF_UPSTREAM but I'm >> facing issues because I need to still build the u-boot-only overlays. It >> is also a bit weird (but works) having to specify

[RESEND PATCH v2] cmd: led: fix led command usage for the LED_SW_BLINK enabled case

2024-08-14 Thread Mikhail Kshevetskiy
CONFIG_LED_BLINK and CONFIG_LED_SW_BLINK can be defined independently. Led blinking works if any (or both) of them is enabled. Unfortunately the led command help does not display blinking option if only CONFIG_LED_SW_BLINK is enabled. This is definitely wrong. This patch fix an issue. Signed-off-

[RESEND PATCH v2 0/2] spi: dtb parsing fixes

2024-08-14 Thread Mikhail Kshevetskiy
Changes from v1: * patches description was updated Michael Polyntsov (1): spi: soft_spi: Parse cs-gpios only if num-chipselects is not <0> Mikhail Kshevetskiy (1): spi: soft_spi: fix miso gpio property name doc/device-tree-bindings/spi/soft-spi.txt | 5 +++-- drivers/spi/soft_spi.c

[RESEND PATCH v2 1/2] spi: soft_spi: fix miso gpio property name

2024-08-14 Thread Mikhail Kshevetskiy
The patch fix a missprint introduced in commit 2e9fe73a883a ("spi: soft_spi: Support the recommended soft spi properties"). Signed-off-by: Mikhail Kshevetskiy Reviewed-by: Fabio Estevam --- drivers/spi/soft_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/so

[RESEND PATCH v2 2/2] spi: soft_spi: Parse cs-gpios only if num-chipselects is not <0>

2024-08-14 Thread Mikhail Kshevetskiy
From: Michael Polyntsov Some boards don't have chipselect lines for leds so cs-gpios is not specified in the dts leading to probing error. Fix it by making behavior similar to the one in Linux, parse num-chipselects and if it is zero, ignore cs-gpios. Signed-off-by: Michael Polyntsov Signed-off

[RESEND PATCH v4 00/10] mtd: spinand: initial support of ecc engines

2024-08-14 Thread Mikhail Kshevetskiy
This patch series: * sync spinand driver code with linux-6.10 * sync spinand flash support with linux-6.10 * add initial support of ecc engines Up to now only software ecc is supported, but other engines can be add quite easily Changes v2 * update description of some patches Changes v3: *

[RESEND PATCH v4 01/10] mtd: spinand: Use the spi-mem dirmap API

2024-08-14 Thread Mikhail Kshevetskiy
Make use of the spi-mem direct mapping API to let advanced controllers optimize read/write operations when they support direct mapping. This is a port of linux patch 981d1aa0697ce1393e00933f154d181e965703d0 created by Boris Brezillon . Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi

[RESEND PATCH v4 02/10] mtd: spinand: Add a NAND page I/O request type

2024-08-14 Thread Mikhail Kshevetskiy
Use an enum to differentiate the type of I/O (reading or writing a page). Also update the request iterator. This is a port of linux patch 701981cab01696584a12e5f0e7c2ad931a326059 created by Miquel Raynal Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/core.c | 4 ++-- include/linu

[RESEND PATCH v4 03/10] mtd: spinand: add missed add missed MODULE_DEVICE_TABLE()

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 8f227ce81fa..62779dd3e51 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -1267,12

[RESEND PATCH v4 04/10] mtd: spinand: simulate behavior of linux's function spinand_wait()

2024-08-14 Thread Mikhail Kshevetskiy
also call schedule() to allow periodic actions Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/core.c | 35 --- include/linux/mtd/spinand.h | 22 ++ 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/sp

[RESEND PATCH v4 05/10] mtd: spinand: more use of spinand_to_{something} helpers

2024-08-14 Thread Mikhail Kshevetskiy
Use spinand_to_nand() and spinand_to_mtd() helpers instead of nanddev_to_mtd() and direct access to spinand structure fields. Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b

[RESEND PATCH v4 06/10] mtd: spinand: replace enable_ecc variable with disable_ecc and update corresponding logic

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/core.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index b58d9e00907..9629fac3388 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/

[RESEND PATCH v4 07/10] mtd: spinand: minor refactoring

2024-08-14 Thread Mikhail Kshevetskiy
No functional changes, just some refactoring to match better linux kernel driver. changes: * move spinand configuration reading out from spinand_init_cfg_cache() to separate function spinand_read_cfg() * move spinand flash initialization to separate function spinand_init_flash() * move di

[RESEND PATCH v4 08/10] mtd: spinand: more refactoring

2024-08-14 Thread Mikhail Kshevetskiy
changes: * Move spinand_check_ecc_status(), spinand_noecc_ooblayout_ecc(), spinand_noecc_ooblayout_free() and spinand_noecc_ooblayout close to each other. * some code formatting * remove comments not present in linux driver This make code more close to linux-6.10 kernel driver Signed-off

[RESEND PATCH v4 09/10] mtd: spinand: sync supported flashes with linux-6.10

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/Makefile | 4 +- drivers/mtd/nand/spi/alliancememory.c | 155 drivers/mtd/nand/spi/ato.c| 84 +++ drivers/mtd/nand/spi/core.c | 5 +- drivers/mtd/nand/spi/esmt.c |

[RESEND PATCH v4 10/10] mtd: nand: add initial ecc engine support

2024-08-14 Thread Mikhail Kshevetskiy
only spinand on_die ecc is supported for a moment Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/core.c | 130 +++- drivers/mtd/nand/ecc.c | 249 ++ drivers/mtd/nand/spi/core.c | 207 +

[RESEND PATCH v2 0/3] cmd/mtd: add missed featuries

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch series implements following subcommands: * markbad -- mark block as bad (copy of 'nand markbad') * torture

[RESEND PATCH v2 1/3] cmd: mtd: add markbad command support

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch implements 'nand markbad' functionality for mtd command. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfi

[RESEND PATCH v2 2/3] cmd: mtd: add torture command support

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch implements 'nand torture' functionality for mtd command. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfi

[RESEND PATCH v2 3/3] cmd: mtd: add nandtest command support

2024-08-14 Thread Mikhail Kshevetskiy
This patch implements readonly test of nand flashes. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfig | 6 ++ cmd/mtd.c | 203 2 files changed, 209 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 698e0e697f2..db5113e016b 1006

[RESEND PATCH v3 0/9] net: tcp: improve tcp support

2024-08-14 Thread Mikhail Kshevetskiy
U-Boot support of LWIP is not ready for a moment, but we already have some kind of tcp support. Unfrotunately this support is really bad. Some of the known issues: * tcp packet from other connection can break a current one * tcp send sequence always starts from zero * bad tcp options processing

[RESEND PATCH v3 1/9] net/tcp: fix TCP options processing

2024-08-14 Thread Mikhail Kshevetskiy
Current TCP code may miss an option if TCP_O_NOP option was used before it for proper aligning. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tcp.c b/net/tcp.c index b0cc8a1fe3e..3e3118de450 100644 --- a/net/tcp.c +

[RESEND PATCH v3 2/9] net/tcp: fix selective acknowledge

2024-08-14 Thread Mikhail Kshevetskiy
Current code assume that all (except last) packets are of the same size. This is definitely wrong. Replace SACK code with a new one, that does not rely on this assumption. Also this code uses less memory. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 200 +++-

[RESEND PATCH v3 3/9] net/tcp: put connection specific data into a tcp_stream structure

2024-08-14 Thread Mikhail Kshevetskiy
no functional changes Signed-off-by: Mikhail Kshevetskiy --- include/net/tcp.h | 37 +++- net/net.c | 11 ++- net/tcp.c | 231 +++--- net/wget.c| 3 +- 4 files changed, 163 insertions(+), 119 deletions(-) diff --git a/inclu

[RESEND PATCH v3 4/9] net/tcp: add connection info to tcp_stream structure

2024-08-14 Thread Mikhail Kshevetskiy
Changes: * Avoid use net_server_ip in tcp code, use tcp_stream data instead * Ignore packets from other connections if connection already created. This prevents us from connection break caused by other tcp stream. Signed-off-by: Mikhail Kshevetskiy --- include/net.h | 5 +- include/n

[RESEND PATCH v3 5/9] net/tcp: rename ack_edge and seq_init to more common rcv_nxt and irs

2024-08-14 Thread Mikhail Kshevetskiy
Use the names from RFC 9293 Signed-off-by: Mikhail Kshevetskiy --- include/net/tcp.h | 8 net/tcp.c | 32 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index f224d0cae2f..0694af9d5b1 10064

[RESEND PATCH v3 7/9] net/tcp: simplify tcp header filling code

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 70 +-- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/net/tcp.c b/net/tcp.c index 2c34556c26d..7014d5b4f43 100644 --- a/net/tcp.c +++ b/net/tcp.c @@ -527,10 +527,37 @@ void net

[RESEND PATCH v3 6/9] net/tcp: improve tcp framework, use better state machine

2024-08-14 Thread Mikhail Kshevetskiy
Changes: * Fix initial send sequence always zero issue * Use state machine close to RFC 9293. This should make TCP transfers more reliable (now we can upload a huge array of data from the board to external server) * Improve TCP framework a lot. This should make tcp client code much more

[RESEND PATCH v3 8/9] net/tcp: define a fallback value for rcv_wnd size

2024-08-14 Thread Mikhail Kshevetskiy
Some driver implements it's own network packet pool, so PKTBUFSRX is zero. This results in zero-size TCP receive window, so data transfer doesn't work. Avod it by setting a reasonable fallback value. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 6 +- 1 file changed, 5 insertions(+), 1

[RESEND PATCH v3 9/9] net/netcat: add netcat over tcp support

2024-08-14 Thread Mikhail Kshevetskiy
This patch adds downloading/uploading of data with netcat. Client/server mode both supported. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfig | 7 ++ cmd/net.c| 34 +++-- include/net.h| 2 +- include/net/netcat.h | 20 ++ net/Makefile | 1 +

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

2024-08-14 Thread Sughosh Ganu
This is a follow-up from an earlier RFC series [1] for making the LMB and EFI memory allocations work together. This is a non-rfc version with only the LMB part of the patches, for making the LMB memory map global and persistent. This is part one of a set of patches which aim to have the LMB and

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

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

2024-08-14 Thread Sughosh Ganu
The LMB module code is being overhauled to make it's memory map global and persistent. This involves extensive changes to the LMB code. Disable the unit test code temporarily till the changes are in place. These tests will be enabled in a subsequent commit once all the LMB module and the correspond

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

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

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

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

2024-08-14 Thread Sughosh Ganu
The current LMB API's for allocating and reserving memory use a per-caller based memory view. Memory allocated by a caller can then be overwritten by another caller. Make these allocations and reservations persistent using the alloced list data structure. Two alloced lists are declared -- one for

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

2024-08-14 Thread Sughosh Ganu
Allow for resizing of LMB regions if the region attributes match. The current code returns a failure status on detecting an overlapping address. This worked up until now since the LMB calls were not persistent and global -- the LMB memory map was specific and private to a given caller of the LMB AP

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

2024-08-14 Thread Sughosh Ganu
The LMB memory maps are now being maintained through a couple of alloced lists, one for the available(added) memory, and one for the used memory. These lists are not static arrays but can be extended at runtime. Remove the config symbols which were being used to define the size of these lists with

[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
Add separate config symbols for enabling the LMB module for the SPL phase. The LMB module implementation now relies on alloced list data structure which requires heap area to be present. Add specific config symbol for the SPL phase of U-Boot so that this can be enabled on platforms which support a

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

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

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

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

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

2024-08-14 Thread Sughosh Ganu
The LMB module provides API's for allocating and reserving chunks of memory which is then typically used for things like loading images for booting. Reserve the portion of memory that is occupied by the U-Boot image itself, and other parts of memory that might have been marked as reserved in the bo

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

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

2024-08-14 Thread Sughosh Ganu
The memory map maintained by the LMB module is now persistent and global. This memory map is being maintained through the alloced list structure which can be extended at runtime -- there is one list for the available memory, and one for the used memory. Allocate and initialise these lists during th

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

2024-08-14 Thread Sughosh Ganu
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 LMB memory map. The current location of this buffer overlaps with the memory region reserved for the U-Boot image, which is at the top of the usable memory. This worked

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

2024-08-14 Thread Sughosh Ganu
Almost all of the current definitions of arch_lmb_reserve() are doing the same thing. The only exception in a couple of cases is the alignment parameter requirement. Have a generic weak implementation of this function, keeping the highest value of alignment that is being used(16K). Also, instead o

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

2024-08-14 Thread Sughosh Ganu
The spl_board_init() function on sandbox invokes the unit tests. Invoking the tests should be done once the rest of the system has been initialised. Call the spl_board_init() function at the very end, once the rest of the initilisation functions have been called, including the setting up of the LMB

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

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

2024-08-14 Thread Sughosh Ganu
The sandbox iommu driver uses the LMB module to allocate a particular range of memory for the device virtual address(DVA). This used to work earlier since the LMB memory map was caller specific and not global. But with the change to make the LMB allocations global and persistent, adding this memory

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

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

2024-08-14 Thread Sughosh Ganu
The optee_get_reserved_memory() function returns the OP-TEE base address and size. The function gets these values from the FDT. Currently, this function is defined only to be called in the SPL phase. Move this function to a place where it can be invoked from the main U-Boot phase, where it will be

[PATCH v2 26/32] stm32mp: compute ram_top based on the optee base address

2024-08-14 Thread Sughosh Ganu
The value of ram_top address currently gets computed in an indirect manner. The boot_fdt_add_mem_rsv_regions() function gets called first to reserve the memory region occupied by OP-TEE in the LMB memory map. This is followed by a call to the lmb_alloc() API, which returns an address which is below

[PATCH v2 27/32] test: cedit: use allocated address for reading file

2024-08-14 Thread Sughosh Ganu
Instead of a randomly selected address, use an LMB allocated one for reading the file into memory. With the LMB map now being persistent and global, the address used for reading the file might be already allocated as non-overwritable, resulting in a failure. Get a valid address from LMB and then re

[PATCH v2 28/32] test: lmb: tweak the tests for the persistent lmb memory map

2024-08-14 Thread Sughosh Ganu
The LMB memory maps are now persistent, with alloced lists being used to keep track of the available and free memory. Make corresponding changes in the test functions so that the list information can be accessed by the tests for checking against expected values. Also introduce functions to initiali

[PATCH v2 29/32] test: bdinfo: dump the global LMB memory map

2024-08-14 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 V1: * Get the alloced lists through the lmb_get() fu

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Ilias Apalodimas
Hi Simon, On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > Currently this calls efi_alloc() which reserves a page for each > allocation and this can overwrite memory that will be used for reading > images. > > Switch the code to use malloc(), as with other parts of EFI, such as > efi_add_proto

[PATCH v2 30/32] sandbox: adjust load address of couple of tests

2024-08-14 Thread Sughosh Ganu
The TCG event log has now been moved to the start of the memory, and occupies 8KB of memory. Make a corresponding change to the load address in a couple of tests so that it does not overlap with the TCG event log. Signed-off-by: Sughosh Ganu --- Changes since V1: None test/py/tests/test_android

[PATCH v2 31/32] lmb: ut: re-enable unit tests

2024-08-14 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 V1: None configs/sandbox64_defconfig| 4 +++- conf

[PATCH v2 32/32] lmb: add logic to print lmb flag strings

2024-08-14 Thread Sughosh Ganu
Instead of printing the LMB flags as numerical values, print them as strings. This makes it easier to understand what flags are associated with the lmb region. Also make corresponding changes to the bdinfo command's test code. Signed-off-by: Sughosh Ganu --- Changes since V1: New patch lib/lmb.

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Sughosh Ganu
On Wed, 14 Aug 2024 at 12:44, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. > > tools/mkeficapsule.c: In function ‘dump_capsule_auth_header’: > tools/mkeficapsule.c:694:66: w

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Ilias Apalodimas
Hi Heinrich, On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. Why do we need to convert? uint64_t is a fixed width type Thanks /Ilias > > tools/mkef

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Sughosh Ganu
On Wed, 14 Aug 2024 at 17:10, Ilias Apalodimas wrote: > > Hi Heinrich, > > On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt > wrote: > > > > uint64_t is defined as unsigned long long on 32bit ARM. > > Convert uint64_t values to unsigned long long and use %llX for printing. > > Why do we need to

Re: [PATCH v2] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Fabio Estevam
Hi Heiko, On Wed, Aug 14, 2024 at 1:11 AM Heiko Schocher wrote: > Hmm.. yes, setting a default value is a good option, so I would add > a check, if define is not set yet? > > And we should simply let the name "CFG_IMX6_PWM_PER_CLK" ? Yes, that is OK. > If okay, I can make a v3 if you want? Ye

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Ilias Apalodimas
Hi Raymond, On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: > > Port mbedtls with adapted libc header files. > Add mbedtls default config header file. > Optimize mbedtls default config by disabling unused features to > reduce the target size. > Add mbedtls kbuild makefile. > Add Kconfig skeleton

[PATCH v3] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Heiko Schocher
U-Boot 2024.07 drops on aristainetos2 board the following warning: Failed to enable per_clk and bootlogo is not seen on LVDS display. This patch uses old behaviour for systems without clock framework if CONFIG_CLK is not enabled. Fixes: bfc778cb93a3 ("driver: pwm: pwm-imx: get and enabl

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 13:40, Ilias Apalodimas wrote: Hi Heinrich, On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt wrote: uint64_t is defined as unsigned long long on 32bit ARM. Convert uint64_t values to unsigned long long and use %llX for printing. Why do we need to convert? uint64_t is a fixed wi

[PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
uint64_t is defined as unsigned long long on 32-bit ARM. Use PRIX64 for printing uint64_t. This avoid a build failure on 32-bit systems: tools/mkeficapsule.c: In function 'dump_capsule_auth_header': tools/mkeficapsule.c:694:66: warning: format '%lX' expects argument of type 'long unsi

Re: [PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Ilias Apalodimas
Thanks Heinrich On Wed, 14 Aug 2024 at 15:33, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32-bit ARM. > Use PRIX64 for printing uint64_t. > > This avoid a build failure on 32-bit systems: > > tools/mkeficapsule.c: In function 'dump_capsule_auth_header': >

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Tony Dinh
Hi Heinrich, On Wed, Aug 14, 2024 at 2:10 PM Heinrich Schuchardt wrote: > > A system may have multiple SATA controller. Removing the controller with > the lowest sequence number before probing all SATA controllers makes no > sense. > > In sata_rescan we remove all block devices which are children

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Simon Glass
On Wed, 14 Aug 2024 at 01:10, Heinrich Schuchardt wrote: > > A system may have multiple SATA controller. Removing the controller with > the lowest sequence number before probing all SATA controllers makes no > sense. > > In sata_rescan we remove all block devices which are children of SATA > contr

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Simon Glass
Hi Ilias, On Wed, 14 Aug 2024 at 05:03, Ilias Apalodimas wrote: > > Hi Simon, > > On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > > > Currently this calls efi_alloc() which reserves a page for each > > allocation and this can overwrite memory that will be used for reading > > images. > > > >

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Simon Glass
Hi Heinrich, On Wed, 14 Aug 2024 at 01:14, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. > > tools/mkeficapsule.c: In function ‘dump_capsule_auth_header’: > tools/mkeficapsu

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

2024-08-14 Thread Simon Glass
Hi Sughosh, On Wed, 14 Aug 2024 at 02:13, Sughosh Ganu wrote: > > 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, > > > > > > > >

Re: [PATCH v3 00/40] efi: Add a test for EFI bootmeth

2024-08-14 Thread Simon Glass
Hi Ilias, On Mon, 12 Aug 2024 at 07:28, Ilias Apalodimas wrote: > > Hi Simon > > On Sun, 11 Aug 2024 at 17:52, Simon Glass wrote: > > > > The test coverage for the EFI bootmeth is incomplete since it does not > > actually boot the application. > > > > This series creates a simple test for this p

[PATCH 1/2] sandbox: Enable wget command

2024-08-14 Thread Yasuharu Shibata
Enable this so that the tests run. Fix a few warnings in the code so that CI passes. Signed-off-by: Simon Glass Signed-off-by: Yasuharu Shibata --- cmd/Kconfig | 1 + net/wget.c | 7 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 978f44e

[PATCH 2/2] sandbox: fix wget test failure after fixing wget issue

2024-08-14 Thread Yasuharu Shibata
After applying the following patch, wget test on sandbox failed[1]. Commit: cab7867cff ("net: wget: Support retransmission a dropped packet") Here are two reasons why the test is failed and how to fix it: 1. tcp_ack is calculated by the wrong value. tcp_ack needs to be calculated by the rec

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 14:40, Simon Glass wrote: On Wed, 14 Aug 2024 at 01:10, Heinrich Schuchardt wrote: A system may have multiple SATA controller. Removing the controller with the lowest sequence number before probing all SATA controllers makes no sense. In sata_rescan we remove all block devices whi

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 14:40, Simon Glass wrote: Hi Heinrich, On Wed, 14 Aug 2024 at 01:14, Heinrich Schuchardt wrote: uint64_t is defined as unsigned long long on 32bit ARM. Convert uint64_t values to unsigned long long and use %llX for printing. tools/mkeficapsule.c: In function ‘dump_capsule_au

Re: [PATCH v3 00/40] efi: Add a test for EFI bootmeth

2024-08-14 Thread Ilias Apalodimas
Hi Simon, On Wed, 14 Aug 2024 at 15:41, Simon Glass wrote: > > Hi Ilias, > > On Mon, 12 Aug 2024 at 07:28, Ilias Apalodimas > wrote: > > > > Hi Simon > > > > On Sun, 11 Aug 2024 at 17:52, Simon Glass wrote: > > > > > > The test coverage for the EFI bootmeth is incomplete since it does not > >

Re: [PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Mark Kettenis
> From: Heinrich Schuchardt > Date: Wed, 14 Aug 2024 14:33:44 +0200 > > uint64_t is defined as unsigned long long on 32-bit ARM. > Use PRIX64 for printing uint64_t. > > This avoid a build failure on 32-bit systems: > > tools/mkeficapsule.c: In function 'dump_capsule_auth_header': > tool

Re: [PATCH 07/21] Revert "net: wget: Support retransmission a dropped packet"

2024-08-14 Thread Yasuharu Shibata
Dear Simon, Thank you for checking my patch. I sent patch series including enabling wget command for sandbox. https://lore.kernel.org/u-boot/20240814124108.2885-1-yasuharu.shib...@gmail.com/T/#u Best regards, Yasuharu Shibata On Wed, 14 Aug 2024 at 00:12, Simon Glass wrote: > > Hi Yasuharu, >

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Ilias Apalodimas
Hi Simon On Wed, 14 Aug 2024 at 15:40, Simon Glass wrote: > > Hi Ilias, > > On Wed, 14 Aug 2024 at 05:03, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > > > > > Currently this calls efi_alloc() which reserves a page for each > > > allocat

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Raymond Mao
Hi Ilias, On Wed, 14 Aug 2024 at 08:08, Ilias Apalodimas wrote: > Hi Raymond, > > On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: > > > > Port mbedtls with adapted libc header files. > > Add mbedtls default config header file. > > Optimize mbedtls default config by disabling unused features to

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Ilias Apalodimas
On Wed, 14 Aug 2024 at 16:22, Raymond Mao wrote: > > Hi Ilias, > > On Wed, 14 Aug 2024 at 08:08, Ilias Apalodimas > wrote: >> >> Hi Raymond, >> >> On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: >> > >> > Port mbedtls with adapted libc header files. >> > Add mbedtls default config header file.

Re: [PATCH v5 00/27] Integrate MbedTLS v3.6 LTS with U-Boot

2024-08-14 Thread Raymond Mao
Hi Tom, On Fri, 2 Aug 2024 at 11:34, Raymond Mao wrote: > Hi Tom, > > On Thu, 1 Aug 2024 at 16:46, Tom Rini wrote: > >> On Wed, Jul 31, 2024 at 10:25:10AM -0700, Raymond Mao wrote: >> > >> > Integrate MbedTLS v3.6 LTS (currently v3.6.0) with U-Boot. >> > >> > Motivations: >> > >> >

[PATCH] Kconfig: clean up the efi configuration status

2024-08-14 Thread Ilias Apalodimas
The EFI_LOADER and EFI config options are randomly scattered under lib/ making it cumbersome to navigate and enable options, unless you really know what you are doing. On top of that the existing options are in random order instead of a logical one. So let's move things around a bit and present tw

Re: Please pull u-boot-i2c next

2024-08-14 Thread Tom Rini
On Tue, Aug 13, 2024 at 12:44:29PM +0200, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-i2c next > > The following changes since commit f4f845b859266790b97421f0740efce36bc9b8d2: > > Merge patch series "Universal Payload initial series" (2024-08-09 16:03:21 > -0600) > > are

Re: [GIT PULL] Please pull u-boot-imx-master-20240813

2024-08-14 Thread Tom Rini
On Tue, Aug 13, 2024 at 10:54:45AM -0300, Fabio Estevam wrote: > Hi Tom, > > Please pull from u-boot-imx/master, thanks. > > The following changes since commit 06dceeba3d4515ccfbe37b8989ee047a7628aee3: > > Merge tag 'u-boot-rockchip-20240812' of > https://source.denx.de/u-boot/custodians/u-b

Re: [PATCH v2] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 06:07:52AM +0200, Heiko Schocher wrote: > Hello Tom, > > On 13.08.24 18:16, Tom Rini wrote: > > On Tue, Aug 13, 2024 at 03:57:08PM +0200, Heiko Schocher wrote: > > > Hello Fabio, Tom, > > > > > > On 13.08.24 14:27, Fabio Estevam wrote: > > > > Hi Heiko, > > > > > > > > On

Re: [PATCH v3] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 02:10:27PM +0200, Heiko Schocher wrote: > U-Boot 2024.07 drops on aristainetos2 board the following > warning: > > Failed to enable per_clk > > and bootlogo is not seen on LVDS display. > > This patch uses old behaviour for systems without clock framework > if CONF

[PATCH] maintainers: Update list of maintainers for Corstone-1000

2024-08-14 Thread Hugues KAMBA MPIANA
From: Hugues Kamba Mpiana - Add new maintainer: Hugues KAMBA MPIANA - Remove maintainer: Xueliang ZHONG - Update contact information for current maintainer. Signed-off-by: Hugues KAMBA MPIANA --- board/armltd/corstone1000/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

  1   2   >